[llvm] [LV][AArch64] Provide option to use partial reductions by default (PR #216001)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 09:04:12 PDT 2026
================
@@ -983,3 +983,87 @@ exit:
!36 = distinct !{!36, !37, !38}
!37 = !{!"llvm.loop.interleave.count", i32 1}
!38 = !{!"llvm.loop.vectorize.width", i32 4}
+
+;; Using partial reductions by default, in place of a normal add or fadd.
+
+define half @sum_half(ptr %h) {
+;; This previously caused crashes in codegen due to the illegal type.
+; NEON-LABEL: 'sum_half'
+; NEON: Cost of 1 for VF 2: PARTIAL-REDUCE ir<%sum.next> = ir<%sum> + fast reduce.fadd (ir<%l>)
+;
+; SVE-LABEL: 'sum_half'
+; SVE2-LABEL: 'sum_half'
+; SVE2p1-LABEL: 'sum_half'
+; SVE2p3-LABEL: 'sum_half'
+; SME2-LABEL: 'sum_half'
+; I8MM-LABEL: 'sum_half'
----------------
huntergr-arm wrote:
done.
https://github.com/llvm/llvm-project/pull/216001
More information about the llvm-commits
mailing list