| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index b01f840c63140aff23c46f227798c2592a52db22..059aa13322adb4dde769c9be9cf594fac8133cb4 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -5007,15 +5007,19 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
|
|
|
| Register input_reg = ToRegister(input);
|
|
|
| - DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr);
|
| -
|
| - // Optimistically untag the input.
|
| - // If the input is a HeapObject, SmiUntag will set the carry flag.
|
| - __ SmiUntag(input_reg, SetCC);
|
| - // Branch to deferred code if the input was tagged.
|
| - // The deferred code will take care of restoring the tag.
|
| - __ b(cs, deferred->entry());
|
| - __ bind(deferred->exit());
|
| + if (instr->hydrogen()->value()->representation().IsSmi()) {
|
| + __ SmiUntag(input_reg);
|
| + } else {
|
| + DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr);
|
| +
|
| + // Optimistically untag the input.
|
| + // If the input is a HeapObject, SmiUntag will set the carry flag.
|
| + __ SmiUntag(input_reg, SetCC);
|
| + // Branch to deferred code if the input was tagged.
|
| + // The deferred code will take care of restoring the tag.
|
| + __ b(cs, deferred->entry());
|
| + __ bind(deferred->exit());
|
| + }
|
| }
|
|
|
|
|
|
|