< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java

Print this page
rev 52509 : [mq]: graal2

@@ -59,10 +59,11 @@
     private boolean oneOff;
     private AbstractBeginNode body;
     private IfNode ifNode;
 
     CountedLoopInfo(LoopEx loop, InductionVariable iv, IfNode ifNode, ValueNode end, boolean oneOff, AbstractBeginNode body) {
+        assert iv.direction() != null;
         this.loop = loop;
         this.iv = iv;
         this.end = end;
         this.oneOff = oneOff;
         this.body = body;

@@ -155,10 +156,11 @@
                 return 0;
             }
             range = endValue - iv.constantInit();
             absStride = iv.constantStride();
         } else {
+            assert iv.direction() == Direction.Down;
             if (initValue < endValue) {
                 return 0;
             }
             range = iv.constantInit() - endValue;
             absStride = -iv.constantStride();
< prev index next >