| Index: src/x64/lithium-x64.cc
|
| diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
|
| index b1d77c05081ce361de38be6073bf27144d167fe6..9324fd49c6f32fadcf947ab1de2708e2494933ab 100644
|
| --- a/src/x64/lithium-x64.cc
|
| +++ b/src/x64/lithium-x64.cc
|
| @@ -1644,14 +1644,13 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| } else {
|
| ASSERT(to.IsInteger32());
|
| LOperand* value = UseRegister(instr->value());
|
| - bool needs_check = !instr->value()->type().IsSmi();
|
| - if (needs_check) {
|
| + if (instr->value()->IsValueTaggedSmi()) {
|
| + return DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
|
| + } else {
|
| bool truncating = instr->CanTruncateToInt32();
|
| LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1);
|
| LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp);
|
| return AssignEnvironment(DefineSameAsFirst(res));
|
| - } else {
|
| - return DefineSameAsFirst(new(zone()) LSmiUntag(value, needs_check));
|
| }
|
| }
|
| } else if (from.IsDouble()) {
|
|
|