Index: src/hydrogen-dce.cc |
diff --git a/src/hydrogen-dce.cc b/src/hydrogen-dce.cc |
index 4ad32d2e4c8968d03781e5bf67e618ef6b14fb2d..0e7253d5a4869d44ee137129bd4c037eb8774dfd 100644 |
--- a/src/hydrogen-dce.cc |
+++ b/src/hydrogen-dce.cc |
@@ -118,7 +118,9 @@ void HDeadCodeEliminationPhase::RemoveDeadInstructions() { |
HPhi* phi = worklist.RemoveLast(); |
HBasicBlock* block = phi->block(); |
phi->DeleteAndReplaceWith(NULL); |
- block->RecordDeletedPhi(phi->merged_index()); |
+ if (phi->HasMergedIndex()) { |
+ block->RecordDeletedPhi(phi->merged_index()); |
+ } |
} |
} |