[llvm] [BasicAA] Account for wrapping when using abs(Scale*V0 + (-Scale)*V1) >= abs(Scale) (PR #137755)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 00:32:09 PDT 2025


https://github.com/nikic approved this pull request.

LGTM

Approximate proof: https://alive2.llvm.org/ce/z/hTla9G This is not quite correct for the non-IsNegated case (src2), but I think we'd only hit that in cases where NSW is dropped earlier already (https://github.com/llvm/llvm-project/blob/a9ece2dc68e623ebdfdbf7431dac2150a87b2717/llvm/lib/Analysis/BasicAliasAnalysis.cpp#L1872-L1874).

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


More information about the llvm-commits mailing list