Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 8f7a28fbed915c22a7c4f76b0879b76b623a652d..8435a3c2a1320b1e90ee0fe726f34cdad9a54f0f 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1682,7 +1682,11 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
if (from.IsTagged()) { |
if (to.IsDouble()) { |
LOperand* value = UseRegister(instr->value()); |
- LNumberUntagD* res = new(zone()) LNumberUntagD(value); |
+ // Temp register only necessary for minus zero check. |
+ LOperand* temp = instr->deoptimize_on_minus_zero() |
+ ? TempRegister() |
+ : NULL; |
+ LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp); |
return AssignEnvironment(DefineAsRegister(res)); |
} else { |
ASSERT(to.IsInteger32()); |