diff src/share/vm/opto/loopTransform.cpp @ 3850:6987871cfb9b

7077439: Possible reference through NULL in loopPredicate.cpp:726 Summary: Use cl->is_valid_counted_loop() check. Reviewed-by: never
author kvn
date Wed, 10 Aug 2011 14:06:57 -0700
parents c96c3eb1efae
children da6a29fb0da5
line wrap: on
line diff
--- a/src/share/vm/opto/loopTransform.cpp	Tue Aug 02 18:36:40 2011 +0200
+++ b/src/share/vm/opto/loopTransform.cpp	Wed Aug 10 14:06:57 2011 -0700
@@ -2099,7 +2099,7 @@
   if (!_head->is_CountedLoop())
     return false;     // Dead loop
   CountedLoopNode *cl = _head->as_CountedLoop();
-  if (!cl->loopexit())
+  if (!cl->is_valid_counted_loop())
     return false; // Malformed loop
   if (!phase->is_member(this, phase->get_ctrl(cl->loopexit()->in(CountedLoopEndNode::TestValue))))
     return false;             // Infinite loop
@@ -2255,7 +2255,7 @@
   }
   CountedLoopNode *cl = _head->as_CountedLoop();
 
-  if (!cl->loopexit()) return true; // Ignore various kinds of broken loops
+  if (!cl->is_valid_counted_loop()) return true; // Ignore various kinds of broken loops
 
   // Do nothing special to pre- and post- loops
   if (cl->is_pre_loop() || cl->is_post_loop()) return true;
@@ -2636,7 +2636,7 @@
 
   // Must have constant stride
   CountedLoopNode* head = lpt->_head->as_CountedLoop();
-  if (!head->stride_is_con() || !head->is_normal_loop()) {
+  if (!head->is_valid_counted_loop() || !head->is_normal_loop()) {
     return false;
   }