[PATCH] D103991: [SCEV] Move mustprogress based no-self-wrap logic so it applies to all exit conditions
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 18 09:02:22 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:8335
+ if (AR->getLoop() == L && AR->isAffine() && StrideC &&
+ StrideC->getAPInt().isPowerOf2()) {
+ auto Flags = AR->getNoWrapFlags();
----------------
Also check that the NW flag isn't already set?
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:11844
return loopIsFiniteByAssumption(L);
};
----------------
Maybe you want to extract canAsusmeNoSelfWrap as a static function and reuse? You repeat the same conditions in the new code, just without the comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103991/new/
https://reviews.llvm.org/D103991
More information about the llvm-commits
mailing list