Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index af562624c0bd8226cc3da5230e7483003c3ca9bd..71bacbae651a31e03bd9e376ca54665b2f13319a 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -4633,10 +4633,13 @@ void LCodeGen::DoInteger32ToSmi(LInteger32ToSmi* instr) { |
LOperand* output = instr->result(); |
Register scratch = scratch0(); |
- __ SmiTagCheckOverflow(ToRegister(output), ToRegister(input), scratch); |
+ ASSERT(output->IsRegister()); |
if (!instr->hydrogen()->value()->HasRange() || |
!instr->hydrogen()->value()->range()->IsInSmiRange()) { |
+ __ SmiTagCheckOverflow(ToRegister(output), ToRegister(input), scratch); |
DeoptimizeIf(lt, instr->environment(), scratch, Operand(zero_reg)); |
+ } else { |
+ __ SmiTag(ToRegister(output), ToRegister(input)); |
} |
} |