[llvm] [polly] [ConstraintElimination] Use SCEV ranges information for Loop counter (PR #91457)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 13:33:46 PDT 2024
v01dXYZ wrote:
A little fact, LLVM also computes the BTC when the `add` is not marked explicity with both `nuw nsw` to compute the NUW/NSW flag when creating the SCEV expression. Reminder for myself, look at `proveNoWrapViaConstantRanges()`, use `AR->hasNoSelfWrap()` to find an upper bound for the AR, which is absolutely equivalent to upper bound the BTC. ( `computeMaxBECountForLT` `howManyLessThans/howManyGreaterThans` ?).
It seems SCEV don't use the NSW/NUW info when computing BTC which is a little bit suprising (when having a start greater than the end I expect it to have a range looking like `[start, start+1)` ie `BTC == 0` but it's rather `[start, TYPE_MAX)`.
https://github.com/llvm/llvm-project/pull/91457
More information about the llvm-commits
mailing list