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/vl-opt-instrs.ll
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2925,3 +2925,48 @@ define <vscale x 4 x i32> @vid.v(<vscale x 4 x i32> %c, iXLen %vl) {
2925
2925
%2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %c, iXLen %vl)
2926
2926
ret <vscale x 4 x i32> %2
2927
2927
}
2928
+
2929
+
define <vscale x 4 x i32> @vsmul_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
2930
+
; NOVLOPT-LABEL: vsmul_vv:
2931
+
; NOVLOPT: # %bb.0:
2932
+
; NOVLOPT-NEXT: csrwi vxrm, 0
2933
+
; NOVLOPT-NEXT: vsetvli a1, zero, e32, m2, ta, ma
2934
+
; NOVLOPT-NEXT: vsmul.vv v8, v8, v10
2935
+
; NOVLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
2936
+
; NOVLOPT-NEXT: vadd.vv v8, v8, v10
2937
+
; NOVLOPT-NEXT: ret
2938
+
;
2939
+
; VLOPT-LABEL: vsmul_vv:
2940
+
; VLOPT: # %bb.0:
2941
+
; VLOPT-NEXT: csrwi vxrm, 0
2942
+
; VLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
2943
+
; VLOPT-NEXT: vsmul.vv v8, v8, v10
2944
+
; VLOPT-NEXT: vadd.vv v8, v8, v10
2945
+
; VLOPT-NEXT: ret
2946
+
%1 = call <vscale x 4 x i32> @llvm.riscv.vsmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen 0, iXLen -1)
2947
+
%2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
2948
+
ret <vscale x 4 x i32> %2
2949
+
}
2950
+
2951
+
define <vscale x 4 x i32> @vsmul_vx(<vscale x 4 x i32> %a, i32%b, iXLen %vl) {
2952
+
; NOVLOPT-LABEL: vsmul_vx:
2953
+
; NOVLOPT: # %bb.0:
2954
+
; NOVLOPT-NEXT: csrwi vxrm, 0
2955
+
; NOVLOPT-NEXT: vsetvli a2, zero, e32, m2, ta, ma
2956
+
; NOVLOPT-NEXT: vsmul.vx v10, v8, a0
2957
+
; NOVLOPT-NEXT: vsetvli zero, a1, e32, m2, ta, ma
2958
+
; NOVLOPT-NEXT: vadd.vv v8, v10, v8
2959
+
; NOVLOPT-NEXT: ret
2960
+
;
2961
+
; VLOPT-LABEL: vsmul_vx:
2962
+
; VLOPT: # %bb.0:
2963
+
; VLOPT-NEXT: csrwi vxrm, 0
2964
+
; VLOPT-NEXT: vsetvli zero, a1, e32, m2, ta, ma
2965
+
; VLOPT-NEXT: vsmul.vx v10, v8, a0
2966
+
; VLOPT-NEXT: vadd.vv v8, v10, v8
2967
+
; VLOPT-NEXT: ret
2968
+
%1 = call <vscale x 4 x i32> @llvm.riscv.vsmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32%b, iXLen 0, iXLen -1)
2969
+
%2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
0 commit comments