diff -r 81134def991d -r 88fce7eea1f6 src/hotspot/share/opto/loopopts.cpp --- a/src/hotspot/share/opto/loopopts.cpp Tue Sep 24 20:16:13 2019 -0700 +++ b/src/hotspot/share/opto/loopopts.cpp Mon Sep 23 16:49:09 2019 +0200 @@ -1443,6 +1443,20 @@ // Such nodes should only have ProjNodes as outs, e.g. IfNode // should only have IfTrueNode and IfFalseNode (4985384). x_ctrl = find_non_split_ctrl(x_ctrl); + + IdealLoopTree* x_loop = get_loop(x_ctrl); + Node* x_head = x_loop->_head; + if (x_head->is_Loop() && (x_head->is_OuterStripMinedLoop() || x_head->as_Loop()->is_strip_mined()) && is_dominator(n_ctrl, x_head)) { + // Anti dependence analysis is sometimes too + // conservative: a store in the outer strip mined loop + // can prevent a load from floating out of the outer + // strip mined loop but the load may not be referenced + // from the safepoint: loop strip mining verification + // code reports a problem in that case. Make sure the + // load is not moved in the outer strip mined loop in + // that case. + x_ctrl = x_head->as_Loop()->skip_strip_mined()->in(LoopNode::EntryControl); + } assert(dom_depth(n_ctrl) <= dom_depth(x_ctrl), "n is later than its clone"); x->set_req(0, x_ctrl);