Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 6dadef0873e6e762a679bedbc78da380298ac03e..164ee553daa0fd409d8e786882c1bb576a254fb2 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -4695,10 +4695,13 @@ void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
void LCodeGen::DoInteger32ToSmi(LInteger32ToSmi* instr) { |
LOperand* input = instr->value(); |
LOperand* output = instr->result(); |
- __ SmiTag(ToRegister(output), ToRegister(input), SetCC); |
+ ASSERT(output->IsRegister()); |
if (!instr->hydrogen()->value()->HasRange() || |
!instr->hydrogen()->value()->range()->IsInSmiRange()) { |
+ __ SmiTag(ToRegister(output), ToRegister(input), SetCC); |
DeoptimizeIf(vs, instr->environment()); |
+ } else { |
+ __ SmiTag(ToRegister(output), ToRegister(input)); |
} |
} |