[PATCH] D89381: [SCEV] Use nw flag and symbolic iteration count to sharpen ranges of AddRecs
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 22:50:19 PDT 2020
mkazantsev added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:5744
+ };
+ if (isKnownPositive(Step) && isKnownPredicate(LEPred, Start, End)) {
+ if (!ProveBetween(LEPred))
----------------
efriedma wrote:
> At first I wasn't sure what `isKnownPredicate(LEPred, Start, End))` was checking, but then I figured out it's accounting for the possibility of crossing INT_MAX/UINT_MAX, since nw doesn't exclude that. I think an alternate way of satisfying this condition would be to check for nsw/nuw.
>
>
`nuw/nsw` checks should be, in different ways, already incorporated inside of `isKnownPredicate`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89381/new/
https://reviews.llvm.org/D89381
More information about the llvm-commits
mailing list