[llvm] [RISCV] Keep same SEW/LMUL ratio if possible in forward transfer (PR #69788)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 09:21:12 PDT 2023
================
@@ -342,14 +342,14 @@ define half @vpreduce_ord_fadd_nxv64f16(half %s, <vscale x 64 x half> %v, <vscal
; ZVFHMIN-NEXT: vsetvli a4, zero, e16, m4, ta, ma
; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
-; ZVFHMIN-NEXT: vsetivli zero, 1, e32, m1, ta, ma
+; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
; ZVFHMIN-NEXT: vfmv.s.f v8, fa5
; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
; ZVFHMIN-NEXT: vfredosum.vs v8, v24, v8, v0.t
; ZVFHMIN-NEXT: vfmv.f.s fa5, v8
; ZVFHMIN-NEXT: fcvt.h.s fa5, fa5
; ZVFHMIN-NEXT: fcvt.s.h fa5, fa5
-; ZVFHMIN-NEXT: vsetivli zero, 1, e32, m1, ta, ma
+; ZVFHMIN-NEXT: vsetivli zero, 1, e32, m8, ta, ma
----------------
preames wrote:
Just to flag this - this points out that we're changing LMUL without considering whether having the same ratio is enough to actually emit the vl preserving form. I'm noting this for the record, but I do not think this is a practical problem.
https://github.com/llvm/llvm-project/pull/69788
More information about the llvm-commits
mailing list