[llvm] [ConstraintElim] Decompose `sub nsw` (PR #118219)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 1 09:10:33 PST 2024


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

LGTM. As the constraint systems works in terms of abstract (non-wrapping) arithmetic here, fact that `a -nsw b` is not the same as `a +nsw (-1 * b)` shouldn't matter.

I strongly suspect that it's possible to construct cases where our current decomposition implementation incorrectly handles the case where constant coefficients overflow, though this is not specific to this case.

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


More information about the llvm-commits mailing list