Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index 275c0a267e46659841008c2d4def410c4ec8afc9..2ad484dc2ff05955de8992ddd546cbf314eb6b1d 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -533,7 +533,8 @@ JSTypedLowering::JSTypedLowering(Editor* editor, |
Reduction JSTypedLowering::ReduceSpeculativeNumberAdd(Node* node) { |
JSBinopReduction r(this, node); |
NumberOperationHint hint = NumberOperationHintOf(node->op()); |
- if (hint == NumberOperationHint::kNumberOrOddball && |
+ if ((hint == NumberOperationHint::kNumber || |
+ hint == NumberOperationHint::kNumberOrOddball) && |
r.BothInputsAre(Type::PlainPrimitive()) && |
r.NeitherInputCanBe(Type::StringOrReceiver())) { |
// SpeculativeNumberAdd(x:-string, y:-string) => |
@@ -621,7 +622,8 @@ Reduction JSTypedLowering::ReduceNumberBinop(Node* node) { |
Reduction JSTypedLowering::ReduceSpeculativeNumberBinop(Node* node) { |
JSBinopReduction r(this, node); |
NumberOperationHint hint = NumberOperationHintOf(node->op()); |
- if (hint == NumberOperationHint::kNumberOrOddball && |
+ if ((hint == NumberOperationHint::kNumber || |
+ hint == NumberOperationHint::kNumberOrOddball) && |
r.BothInputsAre(Type::NumberOrOddball())) { |
r.ConvertInputsToNumber(); |
return r.ChangeToPureOperator(r.NumberOpFromSpeculativeNumberOp(), |