Index: runtime/vm/flow_graph_optimizer.cc |
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc |
index 80129fc483e9ad796ec71b348b763ac81c547a70..3b505442a95c3a3973240cb1ddf6beaecbfe801c 100644 |
--- a/runtime/vm/flow_graph_optimizer.cc |
+++ b/runtime/vm/flow_graph_optimizer.cc |
@@ -3259,6 +3259,24 @@ bool FlowGraphOptimizer::TryInlineFloat64x2Method( |
ASSERT(call->ic_data()->HasReceiverClassId(kFloat64x2Cid)); |
ASSERT(call->ic_data()->HasOneTarget()); |
return InlineFloat64x2Getter(call, recognized_kind); |
+ case MethodRecognizer::kFloat64x2Negate: |
+ case MethodRecognizer::kFloat64x2Abs: |
+ case MethodRecognizer::kFloat64x2Sqrt: |
+ case MethodRecognizer::kFloat64x2GetSignMask: { |
+ Definition* left = call->ArgumentAt(0); |
+ // Type check left. |
+ AddCheckClass(left, |
+ ICData::ZoneHandle( |
+ call->ic_data()->AsUnaryClassChecksForArgNr(0)), |
+ call->deopt_id(), |
+ call->env(), |
+ call); |
+ Float64x2ZeroArgInstr* zeroArg = |
+ new Float64x2ZeroArgInstr(recognized_kind, new Value(left), |
+ call->deopt_id()); |
+ ReplaceCall(call, zeroArg); |
+ return true; |
+ } |
default: |
return false; |
} |
@@ -7964,6 +7982,11 @@ void ConstantPropagator::VisitFloat64x2Constructor( |
SetValue(instr, non_constant_); |
} |
+void ConstantPropagator::VisitFloat64x2ZeroArg(Float64x2ZeroArgInstr* instr) { |
+ // TODO(johnmccutchan): Implement constant propagation. |
+ SetValue(instr, non_constant_); |
+} |
+ |
void ConstantPropagator::VisitMathUnary(MathUnaryInstr* instr) { |
const Object& value = instr->value()->definition()->constant_value(); |