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