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 d3becdbc9dd2ec4ebb682b0be52de5dcd918fa2a..db2d8cb08c7813f944a31f5ac7c8fc98ec7fb244 100644 |
--- a/src/compiler/x64/instruction-selector-x64.cc |
+++ b/src/compiler/x64/instruction-selector-x64.cc |
@@ -366,7 +366,15 @@ static void VisitBinop(InstructionSelector* selector, Node* node, |
void InstructionSelector::VisitWord32And(Node* node) { |
- VisitBinop(this, node, kX64And32); |
+ X64OperandGenerator g(this); |
+ Uint32BinopMatcher m(node); |
+ if (m.right().Is(0xff)) { |
+ Emit(kX64Movzxbl, g.DefineAsRegister(node), g.Use(m.left().node())); |
+ } else if (m.right().Is(0xffff)) { |
+ Emit(kX64Movzxwl, g.DefineAsRegister(node), g.Use(m.left().node())); |
+ } else { |
+ VisitBinop(this, node, kX64And32); |
+ } |
} |