Chromium Code Reviews| 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 7c72587ab69e1ad7e20707ae57bc070e9326ed2e..646d914b2eae7954483782d8444445edc712f690 100644 |
| --- a/src/compiler/x64/instruction-selector-x64.cc |
| +++ b/src/compiler/x64/instruction-selector-x64.cc |
| @@ -1250,6 +1250,22 @@ bool ZeroExtendsWord32ToWord64(Node* node) { |
| return false; |
| } |
| } |
| + case IrOpcode::kLoad: { |
| + // The movzxbl/movsxbl/movzxwl/movsxwl operations implicitly zero-extend |
| + // to 64-bit on x64, |
| + // so the zero-extension is a no-op. |
| + LoadRepresentation load_rep = LoadRepresentationOf(node->op()); |
| + ArchOpcode opcode = GetLoadOpcode(load_rep); |
|
Benedikt Meurer
2016/10/17 08:20:42
How about pattern matching the representation inst
|
| + switch (opcode) { |
| + case kX64Movzxbl: |
| + case kX64Movsxbl: |
| + case kX64Movzxwl: |
| + case kX64Movsxwl: |
| + return true; |
| + default: |
| + return false; |
| + } |
| + } |
| default: |
| return false; |
| } |
| @@ -1265,6 +1281,7 @@ void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { |
| // zero-extension is a no-op. |
| return EmitIdentity(node); |
| } |
| + |
|
titzer
2016/10/17 08:13:35
Spurious whitespace change.
|
| Emit(kX64Movl, g.DefineAsRegister(node), g.Use(value)); |
| } |