Index: src/mips/lithium-mips.cc |
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc |
index 18e89ddd5c047bd2beaf90b67b0678378af060fa..8249391c9a56c3dd76fef41c75a0f3720a4a127f 100644 |
--- a/src/mips/lithium-mips.cc |
+++ b/src/mips/lithium-mips.cc |
@@ -1828,11 +1828,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 = instr->CanTruncateToInt32() ? TempRegister() |
: NULL; |