Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index 4ecea705cfd1f40359bb34a1a849d1a7297de32e..3b0eaabcd41a706cf82ca751ff69d0cbc6a7cf34 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -1909,11 +1909,12 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
ASSERT(to.IsInteger32()); |
LOperand* value = NULL; |
LInstruction* res = NULL; |
- if (instr->value()->type().IsSmi()) { |
- value = UseRegisterAtStart(instr->value()); |
+ HValue* val = instr->value(); |
+ if (val->type().IsSmi() || val->representation().IsSmi()) { |
+ value = UseRegisterAtStart(val); |
res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); |
} else { |
- value = UseRegister(instr->value()); |
+ value = UseRegister(val); |
LOperand* temp1 = TempRegister(); |
LOperand* temp2 = FixedTemp(d11); |
res = DefineSameAsFirst(new(zone()) LTaggedToI(value, |