[llvm] [AArch64] Convert `CSEL(X, 1)` into `CSINC(X, XZR)` in early-ifcvt (PR #162993)

Ricardo Jesus via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 17 07:07:05 PDT 2025


=?utf-8?q?Csan=C3=A1d_Hajd=C3=BA?= <csanad.hajdu at arm.com>,
=?utf-8?q?Csan=C3=A1d_Hajd=C3=BA?= <csanad.hajdu at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/162993 at github.com>


================
@@ -5,10 +5,9 @@ define void @peephole_csel(ptr %dst, i1 %0, i1 %cmp) {
 ; CHECK-LABEL: peephole_csel:
 ; CHECK:       // %bb.0: // %entry
 ; CHECK-NEXT:    tst w2, #0x1
-; CHECK-NEXT:    mov w8, #1 // =0x1
-; CHECK-NEXT:    mov x9, xzr
+; CHECK-NEXT:    mov x8, xzr
 ; CHECK-NEXT:    tst w1, #0x1
-; CHECK-NEXT:    csel x8, x8, x9, eq
+; CHECK-NEXT:    csinc x8, x8, xzr, ne
----------------
rj-jesus wrote:

Hi, do you know why this isn't a CSET?

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


More information about the llvm-commits mailing list