[llvm] [SDAG][LegalizeType] Implement result vector widening for VECTOR_DEINTERLEAVE (PR #203105)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 22:03:13 PDT 2026
================
@@ -208,6 +208,32 @@ define {<2 x i32>, <2 x i32>, <2 x i32>} @vector_deinterleave3_v2i32_v6i32(<6 x
ret {<2 x i32>, <2 x i32>, <2 x i32>} %res
}
+define {<3 x i32>, <3 x i32>, <3 x i32>} @vector_deinterleave3_v3i32_v9i32(<9 x i32> %v) nounwind {
+; CHECK-LABEL: vector_deinterleave3_v3i32_v9i32:
+; CHECK: # %bb.0:
+; CHECK-NEXT: addi sp, sp, -16
+; CHECK-NEXT: csrr a0, vlenb
+; CHECK-NEXT: slli a0, a0, 2
+; CHECK-NEXT: sub sp, sp, a0
+; CHECK-NEXT: vsetivli zero, 4, e32, m4, ta, ma
+; CHECK-NEXT: vslidedown.vi v12, v8, 8
+; CHECK-NEXT: vsetivli zero, 4, e32, m2, ta, ma
+; CHECK-NEXT: vslidedown.vi v10, v8, 4
+; CHECK-NEXT: vmv1r.v v9, v10
+; CHECK-NEXT: vmv2r.v v10, v12
+; CHECK-NEXT: addi a0, sp, 16
+; CHECK-NEXT: vs4r.v v8, (a0)
----------------
lukel97 wrote:
Is this correct for VLEN=256?
V8 is [0,1,2,3], V10 is [4,5,6,7] and V12 is [8,x,x,x]
At VLEN=128 when assembled together you get [0,1,2,3,4,5,6,7,8,...] in v8m4
But for VLEN256 I think this is [0,1,2,3,x,x,x,x,4,5,6,7,x,x,x,x,8,...]
https://github.com/llvm/llvm-project/pull/203105
More information about the llvm-commits
mailing list