Index: src/a64/lithium-a64.cc |
diff --git a/src/a64/lithium-a64.cc b/src/a64/lithium-a64.cc |
index a6a22905e9593ec665958ad0cfb41bc4104f0b02..756bbb98c4981396ba9a20d4005e4d56159d08a5 100644 |
--- a/src/a64/lithium-a64.cc |
+++ b/src/a64/lithium-a64.cc |
@@ -1141,13 +1141,11 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
} |
} else if (to.IsSmi()) { |
LOperand* value = UseRegisterAtStart(instr->value()); |
+ LInstruction* result = DefineAsRegister(new(zone()) LSmiTag(value)); |
if (instr->value()->CheckFlag(HInstruction::kUint32)) { |
- LUint32ToSmi* result = new(zone()) LUint32ToSmi(value); |
- return AssignEnvironment(DefineAsRegister(result)); |
- } else { |
- // This cannot deoptimize because an A64 smi can represent any int32. |
- return DefineAsRegister(new(zone()) LInteger32ToSmi(value)); |
+ result = AssignEnvironment(result); |
} |
+ return result; |
} else { |
ASSERT(to.IsDouble()); |
if (instr->value()->CheckFlag(HInstruction::kUint32)) { |