Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index b1d77c05081ce361de38be6073bf27144d167fe6..d06a6a4063a90f3441c45160a806b3628cd8acb2 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()->type().IsSmi()) { |
+ 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()) { |