Skip to content

Commit d00836a

Browse files
committed
!fixup exit early on zero
1 parent e755778 commit d00836a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ evaluatePtrAddRecAtMaxBTCWillNotWrap(const SCEVAddRecExpr *AR,
243243
}
244244
}
245245

246+
if (DerefBytesSCEV->isZero())
247+
return false;
248+
246249
bool IsKnownNonNegative = SE.isKnownNonNegative(Step);
247250
if (!IsKnownNonNegative && !SE.isKnownNegative(Step))
248251
return false;

0 commit comments

Comments
 (0)