hotspot/src/share/vm/opto/loopTransform.cpp
changeset 10005 ce4ea81a1329
parent 9955 9dc9ba9c9399
child 10011 e8b38f7b9959
--- a/hotspot/src/share/vm/opto/loopTransform.cpp	Thu Jun 16 13:46:55 2011 -0700
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp	Mon Jun 20 16:45:35 2011 -0700
@@ -83,7 +83,7 @@
 #ifdef ASSERT
   BoolTest::mask bt = cl->loopexit()->test_trip();
   assert(bt == BoolTest::lt || bt == BoolTest::gt ||
-         (bt == BoolTest::ne && !LoopLimitCheck), "canonical test is expected");
+         bt == BoolTest::ne, "canonical test is expected");
 #endif
 
   Node* init_n = cl->init_trip();
@@ -1070,9 +1070,11 @@
   // direction:
   // positive stride use <
   // negative stride use >
+  //
+  // not-equal test is kept for post loop to handle case
+  // when init > limit when stride > 0 (and reverse).
 
   if (pre_end->in(CountedLoopEndNode::TestValue)->as_Bool()->_test._test == BoolTest::ne) {
-    assert(!LoopLimitCheck, "only canonical tests (lt or gt) are expected");
 
     BoolTest::mask new_test = (main_end->stride_con() > 0) ? BoolTest::lt : BoolTest::gt;
     // Modify pre loop end condition