[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
================
@@ -147,9 +147,11 @@ define i1 @combine_setcc_eq_vecreduce_and_v16i1(<16 x i8> %a) {
; CHECK-LABEL: combine_setcc_eq_vecreduce_and_v16i1:
; CHECK: // %bb.0:
; CHECK-NEXT: cmeq v0.16b, v0.16b, #0
-; CHECK-NEXT: uminv b0, v0.16b
-; CHECK-NEXT: fmov w8, s0
-; CHECK-NEXT: and w0, w8, #0x1
+; CHECK-NEXT: ext v1.16b, v0.16b, v0.16b, #8
----------------
davemgreen wrote:
Can we use an v2i64 addp here too, if we compare against -2? I think that works if the lanes are all 1's.
https://github.com/llvm/llvm-project/pull/187912
More information about the llvm-commits
mailing list