Skip to content

Commit

Permalink
[SCEV] Use isAvailableAtLoopEntry in the asserts
Browse files Browse the repository at this point in the history
This is what is supposed to be there.
  • Loading branch information
xortator committed Sep 21, 2021
1 parent 8bc7185 commit cd166fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Analysis/ScalarEvolution.cpp
Expand Up @@ -11836,9 +11836,9 @@ ScalarEvolution::howManyLessThans(const SCEV *LHS, const SCEV *RHS,
// so we get a backedge count of zero.
const SCEV *BECount = nullptr;
auto *OrigStartMinusStride = getMinusSCEV(OrigStart, Stride);
assert(isLoopInvariant(OrigStartMinusStride, L) && "Must be!");
assert(isLoopInvariant(OrigStart, L) && "Must be!");
assert(isLoopInvariant(OrigRHS, L) && "Must be!");
assert(isAvailableAtLoopEntry(OrigStartMinusStride, L) && "Must be!");
assert(isAvailableAtLoopEntry(OrigStart, L) && "Must be!");
assert(isAvailableAtLoopEntry(OrigRHS, L) && "Must be!");
// Can we prove (max(RHS,Start) > Start - Stride?
if (isLoopEntryGuardedByCond(L, Cond, OrigStartMinusStride, OrigStart) &&
isLoopEntryGuardedByCond(L, Cond, OrigStartMinusStride, OrigRHS)) {
Expand Down

0 comments on commit cd166fb

Please sign in to comment.