[llvm] [Analysis] Teach isDereferenceableAndAlignedInLoop about SCEV predicates (PR #106562)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 19 12:39:05 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()) {
----------------
fhahn wrote:
```suggestion
if (PredConstantMax != ConstantBTC) {
assert(!Preds.empty() && "different predicated max BTC but no predicates");
```
I *think* Preds cannot be empty if we have a different predicated max BTC?
https://github.com/llvm/llvm-project/pull/106562
More information about the llvm-commits
mailing list