Index: src/mips64/lithium-mips64.cc |
diff --git a/src/mips64/lithium-mips64.cc b/src/mips64/lithium-mips64.cc |
index 1f5f5784778936f0fb25aa3b1628e7c0b3ee3608..326ac8a7949a77d09c210638109621a82a3c3a45 100644 |
--- a/src/mips64/lithium-mips64.cc |
+++ b/src/mips64/lithium-mips64.cc |
@@ -1307,8 +1307,10 @@ LInstruction* LChunkBuilder::DoDivI(HDiv* instr) { |
ASSERT(instr->right()->representation().Equals(instr->representation())); |
LOperand* dividend = UseRegister(instr->left()); |
LOperand* divisor = UseRegister(instr->right()); |
+ LOperand* temp = instr->CheckFlag(HInstruction::kAllUsesTruncatingToInt32) |
+ ? NULL : TempRegister(); |
LInstruction* result = |
- DefineAsRegister(new(zone()) LDivI(dividend, divisor)); |
+ DefineAsRegister(new(zone()) LDivI(dividend, divisor, temp)); |
if (instr->CheckFlag(HValue::kCanBeDivByZero) || |
instr->CheckFlag(HValue::kBailoutOnMinusZero) || |
(instr->CheckFlag(HValue::kCanOverflow) && |