[PATCH] D141850: [SCEV] Preserve divisibility and min/max information in applyLoopGuards
Alon Kom via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 6 05:08:08 PST 2023
alonkom marked an inline comment as done.
alonkom added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:15191
+ case CmpInst::ICMP_SLT: {
+ auto ModifiedRHS = getMinusSCEV(RHS, getOne(RHS->getType()));
+ ModifiedRHS =
----------------
mkazantsev wrote:
> How do you account for `RHS` being `SINT_MIN` and similar cases here?
I wonder how this worked before my patch.
if we have assume (N < SINT_MIN) then the following SCEV was generated:
smin(N, SINT_MIN - 1) which would overflow.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141850/new/
https://reviews.llvm.org/D141850
More information about the llvm-commits
mailing list