| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index c93c3cfe253dfc7abd6bcfcb7500e92b68beffc4..7e7c63a6a7668ed55db70f3a74f3ec32916fe725 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -1997,8 +1997,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;
|
| }
|
|
|