Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index f216a8e094d409bc80c5b492bd27744ab08d94f9..3e165b477d860dda09c8b5e4389260d583926bf7 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -861,6 +861,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 |
@@ -897,7 +901,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; |