Index: src/compiler/arm64/instruction-selector-arm64.cc |
diff --git a/src/compiler/arm64/instruction-selector-arm64.cc b/src/compiler/arm64/instruction-selector-arm64.cc |
index 03dfd73a73a76f1111ad8988901f1a77b397f76c..f025bf2f427f7f8eb2b076a19c10af899cf61fe7 100644 |
--- a/src/compiler/arm64/instruction-selector-arm64.cc |
+++ b/src/compiler/arm64/instruction-selector-arm64.cc |
@@ -1877,6 +1877,14 @@ void InstructionSelector::VisitWord32Equal(Node* const node) { |
case IrOpcode::kWord32And: |
return VisitWordCompare(this, value, kArm64Tst32, &cont, true, |
kLogical32Imm); |
+ case IrOpcode::kWord32Equal: { |
+ // Word32Equal(Word32Equal(x, y), 0) => Word32Compare(x, y, ne). |
+ Int32BinopMatcher mequal(value); |
+ node->ReplaceInput(0, mequal.left().node()); |
+ node->ReplaceInput(1, mequal.right().node()); |
+ cont.Negate(); |
+ return VisitWord32Compare(this, node, &cont); |
+ } |
default: |
break; |
} |