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 bd23dfd17e2a6fc9d7a85181df26f2c8a46a55c3..3cd62f69ee4a86c899a8f5798e2841cdb54c1a8c 100644 |
--- a/src/compiler/arm64/instruction-selector-arm64.cc |
+++ b/src/compiler/arm64/instruction-selector-arm64.cc |
@@ -184,7 +184,7 @@ void InstructionSelector::VisitLoad(Node* node) { |
if (g.CanBeImmediate(index, kLoadStoreImm)) { |
Emit(opcode | AddressingModeField::encode(kMode_MRI), result, |
g.UseRegister(base), g.UseImmediate(index)); |
- } else if (g.CanBeImmediate(index, kLoadStoreImm)) { |
+ } else if (g.CanBeImmediate(base, kLoadStoreImm)) { |
Emit(opcode | AddressingModeField::encode(kMode_MRI), result, |
g.UseRegister(index), g.UseImmediate(base)); |
} else { |