[llvm] [DAG][RISCV] Use vp_reduce_fadd/fmul when widening types for FP reductions (PR #105840)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 08:17:23 PDT 2024
================
@@ -958,13 +943,16 @@ declare half @llvm.vector.reduce.fadd.nxv12f16(half, <vscale x 12 x half>)
define half @vreduce_ord_fadd_nxv12f16(<vscale x 12 x half> %v, half %s) {
; CHECK-LABEL: vreduce_ord_fadd_nxv12f16:
; CHECK: # %bb.0:
-; CHECK-NEXT: lui a0, 1048568
-; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
-; CHECK-NEXT: vmv.v.x v11, a0
+; CHECK-NEXT: csrr a0, vlenb
+; CHECK-NEXT: srli a0, a0, 3
+; CHECK-NEXT: slli a1, a0, 2
+; CHECK-NEXT: slli a0, a0, 4
+; CHECK-NEXT: sub a0, a0, a1
----------------
preames wrote:
Same as above, except that the simplified result should also be equal to VLMAX and we're failing to prove that for some reason.
https://github.com/llvm/llvm-project/pull/105840
More information about the llvm-commits
mailing list