[llvm] [DA] Rewrite the formula in the Strong SIV test (PR #179665)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 21 07:20:20 PST 2026
nikic wrote:
I'll also add that in the context of this test, I don't think that whether we have at-use nsw information or not is really going to be practically relevant. The test is only going to succeed if a and BTC are constant or have sufficiently small constant upper bounds -- aka exactly the situation where SCEV will be able to determine whether wrapping occurs based on simple range analysis that does not rely on IR flags. In my range-based formulation above, SCEV doesn't even bother checking the nowrap flags, it will explicitly check the wrapping behavior based on the step/BTC ranges.
For this test, I think you'll want to express it in the simplest way that works -- the precise way it is expressed is unlikely to affect practical analysis power.
As to whether DA can use at-use SCEV, I *think* it's possible in principle, but requires care. But as said before, I don't think it will make a meaningful difference in this context, so I don't think we need to get hung up about it.
https://github.com/llvm/llvm-project/pull/179665
More information about the llvm-commits
mailing list