[llvm] [AArch64] Signed comparison using CMN is safe when the subtraction is nsw (PR #141993)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 11:45:15 PDT 2025


topperc wrote:

> Is it possible for a sub node to be made without nsw by mistake?

I guessing the tests that are failing are handwritten without consideration of the `nsw` flag and the test author did not run them through InstCombine to add the flag. Unfortunately, SelectionDAG only propagates the flag from IR and never infers it on any nodes.

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


More information about the llvm-commits mailing list