# HG changeset patch # User neliasso # Date 1551359038 -3600 # Thu Feb 28 14:03:58 2019 +0100 # Node ID 36dd0b27bf57695c2c0a258ff91fc1ee5af08204 # Parent 56089cf6152c41cbca3848bcb8796fcccbbe8c3a 8219448: split-if update_uses accesses stale idom data Reviewed-by: diff --git a/src/hotspot/share/opto/split_if.cpp b/src/hotspot/share/opto/split_if.cpp --- a/src/hotspot/share/opto/split_if.cpp +++ b/src/hotspot/share/opto/split_if.cpp @@ -523,7 +523,9 @@ } _igvn.remove_dead_node(new_iff); // Lazy replace IDOM info with the region's dominator - lazy_replace( iff, region_dom ); + lazy_replace(iff, region_dom); + lazy_update(region, region_dom); // idom must be update before handle_uses, the replacement is done after + region->set_req(0, NULL); // Break the self-cycle. Required for lazy_update to work on region // Now make the original merge point go dead, by handling all its uses. small_cache region_cache; @@ -566,8 +568,7 @@ --k; } // End of while merge point has phis - assert(region->outcnt() == 1, "Only self reference should remain"); // Just Self on the Region - region->set_req(0, NULL); // Break the self-cycle + assert(region->outcnt() == 0, "Should be empty now"); // Any leftover bits in the splitting block must not have depended on local // Phi inputs (these have already been split-up). Hence it's safe to hoist