[llvm] [RISCV] Lower VP_SELECT constant false to use vmerge.vxm/vmerge.vim (PR #144461)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 10:33:13 PDT 2025


================
@@ -34,10 +34,10 @@ define <vscale x 1 x i8> @masked_load_passthru_nxv1i8(ptr %a, <vscale x 1 x i1>
 ; ZVE32:       # %bb.0:
 ; ZVE32-NEXT:    csrr a1, vlenb
 ; ZVE32-NEXT:    srli a1, a1, 3
-; ZVE32-NEXT:    vsetvli a2, zero, e8, mf4, ta, ma
-; ZVE32-NEXT:    vmv.v.i v8, 0
----------------
mshockwave wrote:

It turns out we should fix RISCVVectorPeephole rather than VL optimizer, here is my solution for this particular VL toggling problem: #144759 

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


More information about the llvm-commits mailing list