Index: src/crankshaft/mips/lithium-codegen-mips.cc |
diff --git a/src/crankshaft/mips/lithium-codegen-mips.cc b/src/crankshaft/mips/lithium-codegen-mips.cc |
index a82b262dbbbb86c172ec81cdb8bfb5672ef11528..d2a3ccdbfb5be04bcdfa78ea7be86c1bdf42fef7 100644 |
--- a/src/crankshaft/mips/lithium-codegen-mips.cc |
+++ b/src/crankshaft/mips/lithium-codegen-mips.cc |
@@ -1854,21 +1854,21 @@ void LCodeGen::DoAddI(LAddI* instr) { |
__ Addu(ToRegister(result), ToRegister(left), ToOperand(right)); |
} |
} else { // can_overflow. |
- Register overflow = scratch0(); |
Register scratch = scratch1(); |
+ Label no_overflow; |
if (right->IsStackSlot()) { |
Register right_reg = EmitLoadRegister(right, scratch); |
- __ AdduAndCheckForOverflow(ToRegister(result), |
- ToRegister(left), |
- right_reg, |
- overflow); // Reg at also used as scratch. |
+ __ AdduAndCheckForOverflow(ToRegister(result), ToRegister(left), |
+ right_reg, nullptr, |
+ &no_overflow); // Reg at also used as scratch. |
} else { |
DCHECK(right->IsRegister() || right->IsConstantOperand()); |
__ AdduAndCheckForOverflow(ToRegister(result), ToRegister(left), |
- ToOperand(right), overflow, scratch); |
+ ToOperand(right), nullptr, &no_overflow, |
+ scratch); |
} |
- DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, overflow, |
- Operand(zero_reg)); |
+ DeoptimizeIf(al, instr); |
+ __ bind(&no_overflow); |
} |
} |