[llvm] [AArch64] Optimize lowering of i1 vector reduction (PR #187912)

David Green via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 11 01:00:06 PDT 2026


================
@@ -208,10 +209,11 @@ define i1 @combine_setcc_ne_vecreduce_and_v16i1(<16 x i8> %a) {
 ; CHECK-LABEL: combine_setcc_ne_vecreduce_and_v16i1:
 ; CHECK:       // %bb.0:
 ; CHECK-NEXT:    cmtst v0.16b, v0.16b, v0.16b
-; CHECK-NEXT:    mov w8, #1 // =0x1
-; CHECK-NEXT:    uminv b0, v0.16b
-; CHECK-NEXT:    fmov w9, s0
-; CHECK-NEXT:    bic w0, w8, w9
+; CHECK-NEXT:    ext v1.16b, v0.16b, v0.16b, #8
----------------
davemgreen wrote:

This is addp if the result is != 0? It seems OK here, but let us know if it looks wrong https://alive2.llvm.org/ce/z/4Gvpqo.

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


More information about the llvm-commits mailing list