mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
It's easy to handle SLE/SGE when the loop has a unit stride.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60748 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2924,8 +2924,12 @@ bool ScalarEvolutionsImpl::potentialInfiniteLoop(SCEV *Stride, SCEV *RHS,
|
||||
if (!R)
|
||||
return true;
|
||||
|
||||
if (isSigned)
|
||||
if (isSigned) {
|
||||
if (SC->getValue()->isOne())
|
||||
return R->getValue()->isMaxValue(true);
|
||||
|
||||
return true; // XXX: because we don't have an sdiv scev.
|
||||
}
|
||||
|
||||
// If negative, it wraps around every iteration, but we don't care about that.
|
||||
APInt S = SC->getValue()->getValue().abs();
|
||||
|
Reference in New Issue
Block a user