AZero13 c19e900ce8
[AArch64] Signed comparison using CMN is safe when the subtraction is nsw (#141993)
nsw means no signed wrap, and 0 - INT_MIN is a signed wrap.

Now, this is going to be a point I need to get out of the way:

So is it okay to always transform a > -b into cmn if it is a signed
comparison, even if b is INT_MIN because -INT_MIN is undefined, at least
in C, because unless fwrapv is specified, opt puts nsw on signed integer
operations, allowing for more folds anyway.
2025-06-12 21:02:51 +01:00
..
2025-06-05 11:09:20 -07:00