[llvm] [Analysis] Teach isDereferenceableAndAlignedInLoop about SCEV predicates (PR #106562)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 01:20:28 PDT 2024
================
@@ -13748,8 +13760,26 @@ static void PrintLoopInfo(raw_ostream &OS, ScalarEvolution *SE,
for (const auto *P : Preds)
P->print(OS, 4);
}
+ Preds.clear();
+ auto *PredConstantMax =
+ SE->getPredicatedConstantMaxBackedgeTakenCount(L, Preds);
+ if (PredConstantMax != ConstantBTC || !Preds.empty()) {
----------------
david-arm wrote:
That makes sense, but I just used the code above that as inspiration for my change:
```
SmallVector<const SCEVPredicate *, 4> Preds;
auto *PBT = SE->getPredicatedBackedgeTakenCount(L, Preds);
if (PBT != BTC || !Preds.empty()) {
```
In this case I may as well fix both cases!
https://github.com/llvm/llvm-project/pull/106562
More information about the llvm-commits
mailing list