changeset 51261:70ccca2e60aa

8204927: ZGC: assert(phase->idom(head) == head->in(LoopNode::EntryControl)) failed Summary: Update idom Reviewed-by: roland
author neliasso
date Fri, 15 Jun 2018 13:57:37 +0200
parents 9fdfe5ca0e5e
children 83b1a52f187c
files src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Tue Jun 19 10:57:13 2018 +0200
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Fri Jun 15 13:57:37 2018 +0200
@@ -1181,8 +1181,14 @@
           if (is_strip_mined && (i == LoopNode::EntryControl)) {
             assert(region->in(i)->is_OuterStripMinedLoop(), "");
             igvn.replace_input_of(region->in(i), i, out_ctrl);
+            phase->set_idom(region->in(i), out_ctrl, phase->dom_depth(out_ctrl));
           } else if (ctrl == region->in(i)) {
             igvn.replace_input_of(region, i, out_ctrl);
+            // Only update the idom if is the loop entry we are updating
+            // - A loop backedge doesn't change the idom
+            if (region->is_Loop() && i == LoopNode::EntryControl) {
+              phase->set_idom(region, out_ctrl, phase->dom_depth(out_ctrl));
+            }
           } else {
             Node* iff = region->in(i)->in(0);
             igvn.replace_input_of(iff, 0, out_ctrl);