Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index 2fa4eb4fae72c7e54a9769b4f0451980ba1a708b..7272007a4768dc1e434781f155e334785749f21a 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -514,6 +514,14 @@ Reduction JSTypedLowering::ReduceJSSubtract(Node* node) { |
Reduction JSTypedLowering::ReduceJSMultiply(Node* node) { |
JSBinopReduction r(this, node); |
BinaryOperationHints::Hint feedback = r.GetNumberBinaryOperationFeedback(); |
+ if (feedback == BinaryOperationHints::kNumberOrOddball && |
+ r.BothInputsAre(Type::PlainPrimitive())) { |
+ // JSMultiply(x:plain-primitive, |
+ // y:plain-primitive) => NumberMultiply(ToNumber(x), ToNumber(y)) |
+ r.ConvertInputsToNumber(); |
+ return r.ChangeToPureOperator(simplified()->NumberMultiply(), |
+ Type::Number()); |
+ } |
if (feedback != BinaryOperationHints::kAny) { |
return r.ChangeToSpeculativeOperator( |
simplified()->SpeculativeNumberMultiply(feedback), Type::Number()); |