File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/loop Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -615,7 +615,11 @@ public boolean counterNeverOverflows() {
615
615
if (loop .loopBegin ().canNeverOverflow ()) {
616
616
return true ;
617
617
}
618
- if (!isLimitIncluded && getLimitCheckedIV ().isConstantStride () && Loop .absStrideIsOne (getLimitCheckedIV ())) {
618
+ return ivCanNeverOverflow (getLimitCheckedIV ());
619
+ }
620
+
621
+ public boolean ivCanNeverOverflow (InductionVariable iv ) {
622
+ if (!isLimitIncluded && iv .isConstantStride () && Loop .absStrideIsOne (iv )) {
619
623
return true ;
620
624
}
621
625
if (loop .loopBegin ().isProtectedNonOverflowingUnsigned ()) {
@@ -670,7 +674,7 @@ public boolean counterNeverOverflows() {
670
674
*/
671
675
// @formatter:on
672
676
IntegerStamp endStamp = (IntegerStamp ) getTripCountLimit ().stamp (NodeView .DEFAULT );
673
- ValueNode strideNode = getLimitCheckedIV () .strideNode ();
677
+ ValueNode strideNode = iv .strideNode ();
674
678
IntegerStamp strideStamp = (IntegerStamp ) strideNode .stamp (NodeView .DEFAULT );
675
679
IntegerHelper integerHelper = getCounterIntegerHelper ();
676
680
if (getDirection () == InductionVariable .Direction .Up ) {
You can’t perform that action at this time.
0 commit comments