[PATCH] D146596: [SCEV] Infer no-self-wrap via constant ranges
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 02:23:43 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:4995
+ ConstantRange StepCR = getSignedRange(AR->getStepRecurrence(*this));
+ ConstantRange BECountCR = getUnsignedRange(BECount);
+ unsigned NoOverflowBitWidth =
----------------
I think it would make more sense to use the constant max BECount here, rather than the range of the exact BECount. That should be strictly more powerful and is also more in line with how we infer nuw/nsw on affine addrecs.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146596/new/
https://reviews.llvm.org/D146596
More information about the llvm-commits
mailing list