Index: src/mips/lithium-mips.cc |
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc |
index 8a349120eb6458dd51579896282dd99fbebcf9a1..e32a44dde7cf72b63f50ca954e358faa0b854715 100644 |
--- a/src/mips/lithium-mips.cc |
+++ b/src/mips/lithium-mips.cc |
@@ -867,6 +867,10 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) { |
LInstruction* instr = current->CompileToLithium(this); |
if (instr != NULL) { |
+ // Associate the hydrogen instruction first, since we may need it for |
+ // the ClobbersRegisters() or ClobbersDoubleRegisters() calls below. |
+ instr->set_hydrogen_value(current); |
+ |
#if DEBUG |
// Make sure that the lithium instruction has either no fixed register |
// constraints in temps or the result OR no uses that are only used at |
@@ -903,7 +907,6 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) { |
if (FLAG_stress_environments && !instr->HasEnvironment()) { |
instr = AssignEnvironment(instr); |
} |
- instr->set_hydrogen_value(current); |
chunk_->AddInstruction(instr, current_block_); |
} |
current_instruction_ = old_current; |