[llvm] [SCEV] Allow udiv canonicalization of potentially-wrapping AddRecs (PR #169576)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 23:18:04 PST 2025


nikic wrote:

I don't think your proof is right, because it has a `start % step == 0` assumption, in which case the transform is a trivial no-op.

I think this is the right proof: https://alive2.llvm.org/ce/z/iu2tav I'm modelling the addrec as `start + num_steps * step` here.

This shows that the `X < N` condition is not needed.

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


More information about the llvm-commits mailing list