Index: src/compiler/mips/instruction-selector-mips.cc |
diff --git a/src/compiler/mips/instruction-selector-mips.cc b/src/compiler/mips/instruction-selector-mips.cc |
index 9df0af6cb989f264532ea4e228bc77c9ffcdecf4..eda96ab8119efa37c1bcfe9e700d7879bdf35988 100644 |
--- a/src/compiler/mips/instruction-selector-mips.cc |
+++ b/src/compiler/mips/instruction-selector-mips.cc |
@@ -294,6 +294,18 @@ void InstructionSelector::VisitWord32Or(Node* node) { |
void InstructionSelector::VisitWord32Xor(Node* node) { |
+ Int32BinopMatcher m(node); |
+ if (m.left().IsWord32Or() && CanCover(node, m.left().node()) && |
+ m.right().Is(-1)) { |
+ Int32BinopMatcher mleft(m.left().node()); |
+ if (!mleft.right().HasValue()) { |
+ MipsOperandGenerator g(this); |
+ Emit(kMipsNor, g.DefineAsRegister(node), |
+ g.UseRegister(mleft.left().node()), |
+ g.UseRegister(mleft.right().node())); |
+ return; |
+ } |
+ } |
VisitBinop(this, node, kMipsXor); |
} |