--- old/src/hotspot/share/opto/loopopts.cpp 2018-05-17 10:33:07.532102024 +0200 +++ new/src/hotspot/share/opto/loopopts.cpp 2018-05-17 10:33:01.553117718 +0200 @@ -1665,6 +1665,17 @@ continue; } + if (mode == IgnoreStripMined && idx == 0) { + LoopNode *head = loop->_head->as_Loop(); + if (head->is_strip_mined() && is_dominator(head->outer_loop_exit(), prev)) { + // That node is outside the inner loop, leave it outside the + // outer loop as well to not confuse verification code. + assert(!loop->_parent->is_member(use_loop), "should be out of the outer loop"); + _igvn.replace_input_of(use, 0, head->outer_loop_exit()); + continue; + } + } + while(!outer_loop->is_member(get_loop(cfg))) { prev = cfg; cfg = cfg->_idx >= new_counter ? cfg->in(2) : idom(cfg);