[PATCH] D100566: [SCEV] Add a ad-hoc pattern on isImpliedCondBalancedTypes
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 24 13:03:03 PDT 2021
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:10470
+ !StepCst->getValue()->isNegative()) ||
+ AddRec->getNoWrapFlags(SCEV::FlagNUW)) {
+ const auto *NewFoundLHS = cast<SCEVAddRecExpr>(FoundLHS)->getStart();
----------------
This still isn't right: the required nowrap flag depends on the predicate. If you have `NewFoundPred = ICMP_SLE`, then you need nsw. If you have `NewFoundPred = ICMP_ULE`, then you need nuw.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100566/new/
https://reviews.llvm.org/D100566
More information about the llvm-commits
mailing list