You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llvm/test/CodeGen/RISCV/rvv/vp-vector-interleaved-access.ll
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -648,6 +648,51 @@ define void @masked_store_factor4_v2(<vscale x 1 x i1> %mask, <vscale x 1 x i32>
648
648
retvoid
649
649
}
650
650
651
+
define <vscale x 2 x i32> @load_factor2_oneactive(ptr%ptr, i32%evl) {
652
+
; RV32-LABEL: load_factor2_oneactive:
653
+
; RV32: # %bb.0:
654
+
; RV32-NEXT: slli a1, a1, 2
655
+
; RV32-NEXT: srli a1, a1, 1
656
+
; RV32-NEXT: vsetvli zero, a1, e32, m1, ta, ma
657
+
; RV32-NEXT: vlseg2e32.v v7, (a0)
658
+
; RV32-NEXT: ret
659
+
;
660
+
; RV64-LABEL: load_factor2_oneactive:
661
+
; RV64: # %bb.0:
662
+
; RV64-NEXT: slli a1, a1, 34
663
+
; RV64-NEXT: srli a1, a1, 33
664
+
; RV64-NEXT: vsetvli zero, a1, e32, m1, ta, ma
665
+
; RV64-NEXT: vlseg2e32.v v7, (a0)
666
+
; RV64-NEXT: ret
667
+
%rvl = mulnuwi32%evl, 4
668
+
%wide.masked.load = call <vscale x 4 x i32> @llvm.vp.load.nxv4i32.p0(ptr%ptr, <vscale x 4 x i1> splat (i1true), i32%rvl)
669
+
%deinterleaved.results = call { <vscale x 2 x i32>, <vscale x 2 x i32> } @llvm.vector.deinterleave2.nxv4i32(<vscale x 4 x i32> %wide.masked.load)
670
+
%t0 = extractvalue { <vscale x 2 x i32>, <vscale x 2 x i32> } %deinterleaved.results, 1
671
+
ret <vscale x 2 x i32> %t0
672
+
}
673
+
674
+
define <vscale x 2 x i32> @load_factor5_oneactive(ptr%ptr, i32%evl) {
675
+
; RV32-LABEL: load_factor5_oneactive:
676
+
; RV32: # %bb.0:
677
+
; RV32-NEXT: vsetvli zero, a1, e32, m1, ta, ma
678
+
; RV32-NEXT: vlseg5e32.v v5, (a0)
679
+
; RV32-NEXT: ret
680
+
;
681
+
; RV64-LABEL: load_factor5_oneactive:
682
+
; RV64: # %bb.0:
683
+
; RV64-NEXT: slli a1, a1, 32
684
+
; RV64-NEXT: srli a1, a1, 32
685
+
; RV64-NEXT: vsetvli zero, a1, e32, m1, ta, ma
686
+
; RV64-NEXT: vlseg5e32.v v5, (a0)
687
+
; RV64-NEXT: ret
688
+
%rvl = mulnuwi32%evl, 5
689
+
%wide.masked.load = call <vscale x 10 x i32> @llvm.vp.load(ptr%ptr, <vscale x 10 x i1> splat (i1true), i32%rvl)
690
+
%deinterleaved.results = call { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @llvm.vector.deinterleave5(<vscale x 10 x i32> %wide.masked.load)
691
+
%t3 = extractvalue { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } %deinterleaved.results, 3
692
+
ret <vscale x 2 x i32> %t3
693
+
}
694
+
695
+
651
696
; Negative tests
652
697
653
698
define {<vscale x 2 x i32>, <vscale x 2 x i32>} @not_same_mask(<vscale x 2 x i1> %mask0, <vscale x 2 x i1> %mask1, ptr%ptr, i32%evl) {
0 commit comments