[llvm] [RISCV] Remove vfmv.s.f and vfmv.f.s lmul pseudo variants (PR #100970)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 28 22:05:09 PDT 2024


================
@@ -126,9 +126,9 @@ define float @vreduce_fwadd_nxv1f32(<vscale x 1 x half> %v, float %s) {
 define float @vreduce_ord_fwadd_nxv1f32(<vscale x 1 x half> %v, float %s) {
 ; CHECK-LABEL: vreduce_ord_fwadd_nxv1f32:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a0, zero, e32, mf2, ta, ma
+; CHECK-NEXT:    vsetvli a0, zero, e32, m1, ta, ma
 ; CHECK-NEXT:    vfmv.s.f v9, fa0
-; CHECK-NEXT:    vsetvli zero, zero, e16, mf4, ta, ma
----------------
lukel97 wrote:

This is the same missing optimisation in RISCVInsertVSETVLI mentioned in https://github.com/llvm/llvm-project/pull/71501/files#r1392985226 which could be handled in a separate patch.

There's a method adjustIncoming which tweaks the LMUL of pseudos that don't demand LMUL to avoid vl toggles, but it only runs in transferBefore i.e. from top to bottom. Because this is the first instruction in the function I think we need to run it bottom to top as well. 

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


More information about the llvm-commits mailing list