[PATCH] D126503: [SCEV] Use fact that B >u 0 for A <u B in applyLoopGuards.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 27 04:55:35 PDT 2022
fhahn added a comment.
> @mkazantsev wrote:
> Will it still work if `c1` and `c2` are checked in the loop?
Do you mean `RHS` & `LHS`? I'm not sure if a check in the loop would help us restrict the trip count, are you thinking about any case in particular?
> To me it looks like there is some piece of logic is missing in `isImpliedCondition`.
I don't think we use `isImpliedCond` after constructing the SCEV expression for the backedge taken count and we also do not use it (at least with context) during SCEV construction. The `UMax` here helps to determine that the `RHS - 1` won't wrap around, which in terms allows simplifying the BTC in some cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126503/new/
https://reviews.llvm.org/D126503
More information about the llvm-commits
mailing list