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 4c213793f71a59fb313bdca64886a8832d5da0b5..0e4016e6cc3f800a09664bd335780e245cabbc3c 100644 |
--- a/src/compiler/x64/instruction-selector-x64.cc |
+++ b/src/compiler/x64/instruction-selector-x64.cc |
@@ -2155,32 +2155,7 @@ void InstructionSelector::VisitWord32Equal(Node* const node) { |
FlagsContinuation cont = FlagsContinuation::ForSet(kEqual, node); |
Int32BinopMatcher m(user); |
if (m.right().Is(0)) { |
- Node* value = m.left().node(); |
- |
- // Try to combine with comparisons against 0 by simply inverting the branch. |
- while (CanCover(user, value) && value->opcode() == IrOpcode::kWord32Equal) { |
- Int32BinopMatcher m(value); |
- if (m.right().Is(0)) { |
- user = value; |
- value = m.left().node(); |
- cont.Negate(); |
- } else { |
- break; |
- } |
- } |
- |
- // Try to combine the branch with a comparison. |
- if (CanCover(user, value)) { |
- switch (value->opcode()) { |
- case IrOpcode::kInt32Sub: |
- return VisitWordCompare(this, value, kX64Cmp32, &cont); |
- case IrOpcode::kWord32And: |
- return VisitWordCompare(this, value, kX64Test32, &cont); |
- default: |
- break; |
- } |
- } |
- return VisitCompareZero(this, value, kX64Cmp32, &cont); |
+ return VisitWordCompareZero(this, m.node(), m.left().node(), &cont); |
} |
VisitWordCompare(this, node, kX64Cmp32, &cont); |
} |