diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc index 7b321df285..b11c9c232b 100644 --- a/src/mips/lithium-mips.cc +++ b/src/mips/lithium-mips.cc @@ -1844,11 +1844,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;