| 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 69f13cfb020dfc801fde1d4beabda76aef254d26..fd838e5d28acbc22549d17c659ef4d0db85d5c6d 100644
|
| --- a/src/compiler/x64/instruction-selector-x64.cc
|
| +++ b/src/compiler/x64/instruction-selector-x64.cc
|
| @@ -655,6 +655,16 @@ void InstructionSelector::VisitInt64Add(Node* node) {
|
| }
|
|
|
|
|
| +void InstructionSelector::VisitInt64AddWithOverflow(Node* node) {
|
| + if (Node* ovf = NodeProperties::FindProjection(node, 1)) {
|
| + FlagsContinuation cont(kOverflow, ovf);
|
| + VisitBinop(this, node, kX64Add, &cont);
|
| + }
|
| + FlagsContinuation cont;
|
| + VisitBinop(this, node, kX64Add, &cont);
|
| +}
|
| +
|
| +
|
| void InstructionSelector::VisitInt32Sub(Node* node) {
|
| X64OperandGenerator g(this);
|
| Int32BinopMatcher m(node);
|
| @@ -685,6 +695,16 @@ void InstructionSelector::VisitInt64Sub(Node* node) {
|
| }
|
|
|
|
|
| +void InstructionSelector::VisitInt64SubWithOverflow(Node* node) {
|
| + if (Node* ovf = NodeProperties::FindProjection(node, 1)) {
|
| + FlagsContinuation cont(kOverflow, ovf);
|
| + return VisitBinop(this, node, kX64Sub, &cont);
|
| + }
|
| + FlagsContinuation cont;
|
| + VisitBinop(this, node, kX64Sub, &cont);
|
| +}
|
| +
|
| +
|
| namespace {
|
|
|
| void VisitMul(InstructionSelector* selector, Node* node, ArchOpcode opcode) {
|
| @@ -1497,6 +1517,12 @@ void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch,
|
| case IrOpcode::kInt32SubWithOverflow:
|
| cont.OverwriteAndNegateIfEqual(kOverflow);
|
| return VisitBinop(this, node, kX64Sub32, &cont);
|
| + case IrOpcode::kInt64AddWithOverflow:
|
| + cont.OverwriteAndNegateIfEqual(kOverflow);
|
| + return VisitBinop(this, node, kX64Add, &cont);
|
| + case IrOpcode::kInt64SubWithOverflow:
|
| + cont.OverwriteAndNegateIfEqual(kOverflow);
|
| + return VisitBinop(this, node, kX64Sub, &cont);
|
| default:
|
| break;
|
| }
|
|
|