Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index 3fb07bc2c1207b0d912c7784a673d9162c57bda5..86d5d2b329024b72bfb0cf9acde1ce7e78763537 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -2014,8 +2014,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; |
} |