[PATCH] D103118: [SCEV] Compute exit counts for unsigned IVs using mustprogress semantics
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 3 13:59:31 PDT 2021
efriedma added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:11398
+ if (getURemExpr(MaxVal, Stride) != StrideMinusOne)
+ return false;
+
----------------
Could you just check that Stride is a power of 2 here? This seems overly complicated.
Could you separate out checking "there must be some value of LHS that forces the loop to exit" from "the IV can't wrap"? We can use the former to compute a max backedge taken count even if we can't prove the IV doesn't wrap.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103118/new/
https://reviews.llvm.org/D103118
More information about the llvm-commits
mailing list