Index: src/compiler/ia32/instruction-selector-ia32.cc |
diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc |
index a42367512de17de5ec58084f3baa2d137937c03e..747b47bf99eef518d224a08f2b631158cdb82665 100644 |
--- a/src/compiler/ia32/instruction-selector-ia32.cc |
+++ b/src/compiler/ia32/instruction-selector-ia32.cc |
@@ -1407,6 +1407,9 @@ void VisitWordCompareZero(InstructionSelector* selector, Node* user, |
case IrOpcode::kInt32SubWithOverflow: |
cont->OverwriteAndNegateIfEqual(kOverflow); |
return VisitBinop(selector, node, kIA32Sub, cont); |
+ case IrOpcode::kInt32MulWithOverflow: |
+ cont->OverwriteAndNegateIfEqual(kOverflow); |
+ return VisitBinop(selector, node, kIA32Imul, cont); |
default: |
break; |
} |
@@ -1531,6 +1534,14 @@ void InstructionSelector::VisitInt32SubWithOverflow(Node* node) { |
VisitBinop(this, node, kIA32Sub, &cont); |
} |
+void InstructionSelector::VisitInt32MulWithOverflow(Node* node) { |
+ if (Node* ovf = NodeProperties::FindProjection(node, 1)) { |
+ FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); |
+ return VisitBinop(this, node, kIA32Imul, &cont); |
+ } |
+ FlagsContinuation cont; |
+ VisitBinop(this, node, kIA32Imul, &cont); |
+} |
void InstructionSelector::VisitFloat32Equal(Node* node) { |
FlagsContinuation cont = FlagsContinuation::ForSet(kUnorderedEqual, node); |