Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 6f4d3e309f49a43dc5b4ff789eec3ee3fd8a93e5..e224fba9b67d833e9c93eda7edbd424756660de3 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -4725,12 +4725,16 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) { |
LOperand* input = instr->value(); |
ASSERT(input->IsRegister()); |
ASSERT(input->Equals(instr->result())); |
- |
Register input_reg = ToRegister(input); |
- DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr); |
- __ JumpIfNotSmi(input_reg, deferred->entry()); |
- __ SmiToInteger32(input_reg, input_reg); |
- __ bind(deferred->exit()); |
+ |
+ if (instr->hydrogen()->value()->representation().IsSmi()) { |
+ __ SmiToInteger32(input_reg, input_reg); |
+ } else { |
+ DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr); |
+ __ JumpIfNotSmi(input_reg, deferred->entry()); |
+ __ SmiToInteger32(input_reg, input_reg); |
+ __ bind(deferred->exit()); |
+ } |
} |