[llvm] [AArch64] Use isKnownNonZero to optimize eligible compares to cmn (PR #96349)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 07:58:12 PDT 2024
================
@@ -258,3 +258,34 @@ define i32 @neg_range_int(i32 %a, i32 %b, i32 %c) {
ret i32 %retval.0
}
+; (b > -3 || a < -(c | 1))
+define i32 @neg_range_int_cmn(i32 %a, i32 %b, i32 %c) {
----------------
davemgreen wrote:
I think you can add simpler test cases that do not involve ccmp.
Are you sure this is valid to transform?
https://github.com/llvm/llvm-project/pull/96349
More information about the llvm-commits
mailing list