| Index: src/compiler/x64/instruction-selector-x64.cc
|
| diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc
|
| index 07b28d3fc8f890520b8429771c0731aca1c93dc1..676483c978a5f230d4fbe976eccfdf172973a5fa 100644
|
| --- a/src/compiler/x64/instruction-selector-x64.cc
|
| +++ b/src/compiler/x64/instruction-selector-x64.cc
|
| @@ -848,7 +848,6 @@ void VisitMul(InstructionSelector* selector, Node* node, ArchOpcode opcode) {
|
| }
|
| }
|
|
|
| -
|
| void VisitMulHigh(InstructionSelector* selector, Node* node,
|
| ArchOpcode opcode) {
|
| X64OperandGenerator g(selector);
|
| @@ -897,12 +896,20 @@ void InstructionSelector::VisitInt32Mul(Node* node) {
|
| VisitMul(this, node, kX64Imul32);
|
| }
|
|
|
| +void InstructionSelector::VisitInt32MulWithOverflow(Node* node) {
|
| + // TODO(mvstanton): Use Int32ScaleMatcher somehow.
|
| + if (Node* ovf = NodeProperties::FindProjection(node, 1)) {
|
| + FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf);
|
| + return VisitBinop(this, node, kX64Imul32, &cont);
|
| + }
|
| + FlagsContinuation cont;
|
| + VisitBinop(this, node, kX64Imul32, &cont);
|
| +}
|
|
|
| void InstructionSelector::VisitInt64Mul(Node* node) {
|
| VisitMul(this, node, kX64Imul);
|
| }
|
|
|
| -
|
| void InstructionSelector::VisitInt32MulHigh(Node* node) {
|
| VisitMulHigh(this, node, kX64ImulHigh32);
|
| }
|
| @@ -1776,6 +1783,9 @@ void VisitWordCompareZero(InstructionSelector* selector, Node* user,
|
| case IrOpcode::kInt32SubWithOverflow:
|
| cont->OverwriteAndNegateIfEqual(kOverflow);
|
| return VisitBinop(selector, node, kX64Sub32, cont);
|
| + case IrOpcode::kInt32MulWithOverflow:
|
| + cont->OverwriteAndNegateIfEqual(kOverflow);
|
| + return VisitBinop(selector, node, kX64Imul32, cont);
|
| case IrOpcode::kInt64AddWithOverflow:
|
| cont->OverwriteAndNegateIfEqual(kOverflow);
|
| return VisitBinop(selector, node, kX64Add, cont);
|
|
|