Index: src/mips/lithium-mips.cc |
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc |
index fb94bc3bdf24a7639d241603207ba2a5fdf1a5ca..ba7346fd84ca3236ddc1b9a8d94f5647865c18f8 100644 |
--- a/src/mips/lithium-mips.cc |
+++ b/src/mips/lithium-mips.cc |
@@ -1934,8 +1934,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
} else if (to.IsSmi()) { |
HValue* val = instr->value(); |
LOperand* value = UseRegister(val); |
- LInstruction* result = |
- DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); |
+ LInstruction* result = val->CheckFlag(HInstruction::kUint32) |
+ ? DefineSameAsFirst(new(zone()) LUint32ToSmi(value)) |
+ : DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); |
if (val->HasRange() && val->range()->IsInSmiRange()) { |
return result; |
} |