[llvm] [DA] Add tests for nsw doesn't hold on entier iteration (PR #162281)

Ehsan Amiri via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 21 09:13:20 PST 2025


amehsan wrote:

> > * The example `A[i*i - 1]` doesn't make much sense to me since I believe that DA doesn't support quadratic or higher degree addrecs for the foreseeable future (or possibly ever). Also you may want to pay attention to how SCEV represents such higher degree expressions. It doesn't hold the multiplications explicitly (though I don't know what it implies for DA).
> 
> I agree that this is not a practically interesting example, but the point is this: we don't need monotonicity for proving correctness of a given test. We just need existance of nowrap flags.

To be clear, here I am using a test that requires solving a quadratic equation. Sure. We don't have this in DA and we don't want it. The point is that, even for non-monotonic functions we can devise a test and prove its corretness if needed.

https://github.com/llvm/llvm-project/pull/162281


More information about the llvm-commits mailing list