File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/loop Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -636,8 +636,8 @@ public boolean ivCanNeverOverflow(InductionVariable iv) {
636
636
if (iv .isConstantInit () && isConstantMaxTripCount () && iv .isConstantStride ()) {
637
637
try {
638
638
final int bits = IntegerStamp .getBits (iv .valueNode ().stamp (NodeView .DEFAULT ));
639
- long tripCountMinus1 = LoopUtility .subtractExact ( bits , LoopUtility . tripCountSignedExact (this ), 1 );
640
- long stripTimesTripCount = LoopUtility .multiplyExact (bits , iv .constantStride (), tripCountMinus1 );
639
+ final long signedTripCount = LoopUtility .tripCountSignedExact (this );
640
+ final long stripTimesTripCount = LoopUtility .multiplyExact (bits , iv .constantStride (), signedTripCount );
641
641
@ SuppressWarnings ("unused" )
642
642
long extremum = LoopUtility .addExact (bits , stripTimesTripCount , iv .initNode ().asJavaConstant ().asLong ());
643
643
return true ;
You can’t perform that action at this time.
0 commit comments