[PATCH] D89847: [SCEV] Drop cached ranges of AddRecs after flag update
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 02:11:31 PST 2020
fhahn added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:5520
+ if (AddRec->getNoWrapFlags(Flags) != Flags) {
+ assert(AddRec->getNoWrapFlags(Flags) <= Flags && "Pessimizing AddRec flags?");
+ AddRec->setNoWrapFlags(Flags);
----------------
mkazantsev wrote:
> mkazantsev wrote:
> > I realized it's not the right way to check it since the assert may never fail.
> Actually, `setNoWrapFlags` does not drop previous flags, so this assert is just pointless. I'll remove it.
Ah right it already encodes this safety check. I guess it's not worth worrying about it here then, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89847/new/
https://reviews.llvm.org/D89847
More information about the llvm-commits
mailing list