[llvm] [RISCV] Rewrite deinterleave load as vlse optimization as DAG combine (PR #150049)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 25 10:22:50 PDT 2025


================
@@ -16,8 +16,10 @@ define <8 x i8> @load_factor2(ptr %ptr) {
 define <8 x i8> @load_factor3(ptr %ptr) {
 ; CHECK-LABEL: load_factor3:
 ; CHECK:       # %bb.0:
+; CHECK-NEXT:    addi a0, a0, 2
+; CHECK-NEXT:    li a1, 3
 ; CHECK-NEXT:    vsetivli zero, 8, e8, mf2, ta, ma
-; CHECK-NEXT:    vlseg3e8.v v6, (a0)
+; CHECK-NEXT:    vlse8.v v8, (a0), a1
 ; CHECK-NEXT:    ret
     %1 = call { <8 x i8>, <8 x i8>, <8 x i8> } @llvm.riscv.seg3.load.mask.v8i8.i64(ptr %ptr, <8 x i1> splat (i1 true), i64 8)
----------------
mshockwave wrote:

non-blocking: I think many of these tests were meant to exercise the path that utilize all segments, but due to some copy-paste error it only extracts a single segment. So we probably should add tests to cover that path (all segments) for the sake of better coverage.

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


More information about the llvm-commits mailing list