< prev index next >

src/share/vm/opto/loopTransform.cpp

Print this page

        

@@ -3172,10 +3172,15 @@
   Node* offset = NULL;
   if (!match_fill_loop(lpt, store, store_value, shift, offset)) {
     return false;
   }
 
+  Node* exit = head->loopexit()->proj_out(0);
+  if (exit == NULL) {
+    return false;
+  }
+
 #ifndef PRODUCT
   if (TraceLoopOpts) {
     tty->print("ArrayFill    ");
     lpt->dump_head();
   }

@@ -3279,11 +3284,10 @@
     }
   }
 */
 
   // Redirect the old control and memory edges that are outside the loop.
-  Node* exit = head->loopexit()->proj_out(0);
   // Sometimes the memory phi of the head is used as the outgoing
   // state of the loop.  It's safe in this case to replace it with the
   // result_mem.
   _igvn.replace_node(store->in(MemNode::Memory), result_mem);
   lazy_replace(exit, result_ctrl);
< prev index next >