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/vector-deinterleave-load.ll
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -634,3 +634,19 @@ define {<vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i
634
634
%deinterleaved.results = call {<vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>} @llvm.vector.deinterleave4.nxv32i8(<vscale x 32 x i8> %vec)
635
635
ret {<vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i8>} %deinterleaved.results
636
636
}
637
+
638
+
define { <8 x float>, <8 x float> } @deinterleave_unrelated(<16 x float> %arg) {
639
+
; CHECK-LABEL: deinterleave_unrelated:
640
+
; CHECK: # %bb.0: # %entry
641
+
; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
642
+
; CHECK-NEXT: vfabs.v v12, v8
643
+
; CHECK-NEXT: li a0, 32
644
+
; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
645
+
; CHECK-NEXT: vnsrl.wx v10, v12, a0
646
+
; CHECK-NEXT: vnsrl.wi v8, v12, 0
647
+
; CHECK-NEXT: ret
648
+
entry:
649
+
%abs = call <16 x float> @llvm.fabs(<16 x float> %arg)
650
+
%res = call { <8 x float>, <8 x float> } @llvm.vector.deinterleave2.v16f32(<16 x float> %abs)
Copy file name to clipboardExpand all lines: llvm/test/CodeGen/RISCV/rvv/vector-deinterleave.ll
+58Lines changed: 58 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3744,3 +3744,61 @@ define <vscale x 1 x float> @vector_deinterleave_nxv1f32_nxv8f32_oneactive2(<vsc
3744
3744
%ext = extractvalue {<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>} %res, 5
3745
3745
ret <vscale x 1 x float> %ext
3746
3746
}
3747
+
3748
+
3749
+
define { <8 x float>, <8 x float> } @interleave_deinterleave2(<8 x float> %a, <8 x float> %b) {
3750
+
; V-LABEL: interleave_deinterleave2:
3751
+
; V: # %bb.0: # %entry
3752
+
; V-NEXT: vsetivli zero, 8, e32, m2, ta, ma
3753
+
; V-NEXT: vwaddu.vv v12, v8, v10
3754
+
; V-NEXT: li a0, -1
3755
+
; V-NEXT: vwmaccu.vx v12, a0, v10
3756
+
; V-NEXT: li a0, 32
3757
+
; V-NEXT: vnsrl.wx v10, v12, a0
3758
+
; V-NEXT: vnsrl.wi v8, v12, 0
3759
+
; V-NEXT: ret
3760
+
;
3761
+
; ZIP-LABEL: interleave_deinterleave2:
3762
+
; ZIP: # %bb.0: # %entry
3763
+
; ZIP-NEXT: vsetivli zero, 16, e32, m4, ta, ma
3764
+
; ZIP-NEXT: vmv2r.v v12, v10
3765
+
; ZIP-NEXT: li a0, 32
3766
+
; ZIP-NEXT: ri.vzip2a.vv v16, v8, v12
3767
+
; ZIP-NEXT: vsetivli zero, 8, e32, m2, ta, ma
3768
+
; ZIP-NEXT: vnsrl.wx v10, v16, a0
3769
+
; ZIP-NEXT: vnsrl.wi v8, v16, 0
3770
+
; ZIP-NEXT: ret
3771
+
entry:
3772
+
%0 = call <16 x float> @llvm.vector.interleave2.v16f32(<8 x float> %a, <8 x float> %b)
3773
+
%1 = call { <8 x float>, <8 x float> } @llvm.vector.deinterleave2.v16f32(<16 x float> %0)
3774
+
ret { <8 x float>, <8 x float> } %1
3775
+
}
3776
+
3777
+
define <16 x float> @deinterleave_interleave2(<16 x float> %arg) {
3778
+
; V-LABEL: deinterleave_interleave2:
3779
+
; V: # %bb.0: # %entry
3780
+
; V-NEXT: li a0, 32
3781
+
; V-NEXT: vsetivli zero, 8, e32, m2, ta, ma
3782
+
; V-NEXT: vnsrl.wi v12, v8, 0
3783
+
; V-NEXT: vnsrl.wx v14, v8, a0
3784
+
; V-NEXT: vwaddu.vv v8, v12, v14
3785
+
; V-NEXT: li a0, -1
3786
+
; V-NEXT: vwmaccu.vx v8, a0, v14
3787
+
; V-NEXT: ret
3788
+
;
3789
+
; ZIP-LABEL: deinterleave_interleave2:
3790
+
; ZIP: # %bb.0: # %entry
3791
+
; ZIP-NEXT: vsetivli zero, 8, e32, m2, ta, ma
3792
+
; ZIP-NEXT: vnsrl.wi v12, v8, 0
3793
+
; ZIP-NEXT: li a0, 32
3794
+
; ZIP-NEXT: vnsrl.wx v16, v8, a0
3795
+
; ZIP-NEXT: vsetivli zero, 16, e32, m4, ta, ma
3796
+
; ZIP-NEXT: ri.vzip2a.vv v8, v12, v16
3797
+
; ZIP-NEXT: ret
3798
+
entry:
3799
+
%0 = call { <8 x float>, <8 x float> } @llvm.vector.deinterleave2.v16f32(<16 x float> %arg)
3800
+
%a = extractvalue { <8 x float>, <8 x float> } %0, 0
3801
+
%b = extractvalue { <8 x float>, <8 x float> } %0, 1
3802
+
%res = call <16 x float> @llvm.vector.interleave2.v16f32(<8 x float> %a, <8 x float> %b)
0 commit comments