< prev index next >

src/hotspot/share/opto/loopopts.cpp

Print this page

        

@@ -1416,10 +1416,23 @@
 
               // Don't allow the control input to be a CFG splitting node.
               // 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);
+              if (x_loop->_head->is_OuterStripMinedLoop() && is_dominator(n_ctrl, x_loop->_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_loop->_head->in(LoopNode::EntryControl);
+              }
               assert(dom_depth(n_ctrl) <= dom_depth(x_ctrl), "n is later than its clone");
 
               x->set_req(0, x_ctrl);
             }
             register_new_node(x, x_ctrl);
< prev index next >