8194993: Loop Strip Mining has some leftover debugging code
authorroland
Mon, 15 Jan 2018 09:21:49 +0100
changeset 48528 b329894ee5a2
parent 48527 0769bb301c7a
child 48529 6a5e7a575830
8194993: Loop Strip Mining has some leftover debugging code Summary: Removed debugging code. Reviewed-by: thartmann
src/hotspot/share/opto/loopnode.cpp
--- a/src/hotspot/share/opto/loopnode.cpp	Mon Jan 15 09:19:53 2018 +0100
+++ b/src/hotspot/share/opto/loopnode.cpp	Mon Jan 15 09:21:49 2018 +0100
@@ -1393,9 +1393,14 @@
           Node* uu = fast_out(j);
           if (uu->is_Phi()) {
             Node* be = uu->in(LoopNode::LoopBackControl);
-            while (be->is_Store() && old_new[be->_idx] != NULL) {
-              ShouldNotReachHere();
-              be = be->in(MemNode::Memory);
+            if (be->is_Store() && old_new[be->_idx] != NULL) {
+              assert(false, "store on the backedge + sunk stores: unsupported");
+              // drop outer loop
+              IfNode* outer_le = outer_loop_end();
+              Node* iff = igvn->transform(new IfNode(outer_le->in(0), outer_le->in(1), outer_le->_prob, outer_le->_fcnt));
+              igvn->replace_node(outer_le, iff);
+              inner_cl->clear_strip_mined();
+              return;
             }
             if (be == last || be == first->in(MemNode::Memory)) {
               assert(phi == NULL, "only one phi");
@@ -1448,10 +1453,7 @@
           // Or fix the outer loop fix to include
           // that chain of stores.
           Node* be = phi->in(LoopNode::LoopBackControl);
-          while (be->is_Store() && old_new[be->_idx] != NULL) {
-            ShouldNotReachHere();
-            be = be->in(MemNode::Memory);
-          }
+          assert(!(be->is_Store() && old_new[be->_idx] != NULL), "store on the backedge + sunk stores: unsupported");
           if (be == first->in(MemNode::Memory)) {
             if (be == phi->in(LoopNode::LoopBackControl)) {
               igvn->replace_input_of(phi, LoopNode::LoopBackControl, last);