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
+80Lines changed: 80 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3831,3 +3831,83 @@ define <vscale x 4 x i32> @vasubu_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
3831
3831
%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)
3832
3832
ret <vscale x 4 x i32> %2
3833
3833
}
3834
+
3835
+
define <vscale x 4 x float> @vfmax_vv(<vscale x 4 x float> %a, <vscale x 4 x float> %b, iXLen %vl) {
3836
+
; NOVLOPT-LABEL: vfmax_vv:
3837
+
; NOVLOPT: # %bb.0:
3838
+
; NOVLOPT-NEXT: vsetvli a1, zero, e32, m2, ta, ma
3839
+
; NOVLOPT-NEXT: vfmax.vv v8, v8, v10
3840
+
; NOVLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
3841
+
; NOVLOPT-NEXT: vfadd.vv v8, v8, v10
3842
+
; NOVLOPT-NEXT: ret
3843
+
;
3844
+
; VLOPT-LABEL: vfmax_vv:
3845
+
; VLOPT: # %bb.0:
3846
+
; VLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
3847
+
; VLOPT-NEXT: vfmax.vv v8, v8, v10
3848
+
; VLOPT-NEXT: vfadd.vv v8, v8, v10
3849
+
; VLOPT-NEXT: ret
3850
+
%1 = call <vscale x 4 x float> @llvm.riscv.vfmax.nxv4f32.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> %a, <vscale x 4 x float> %b, iXLen -1)
3851
+
%2 = call <vscale x 4 x float> @llvm.riscv.vfadd.nxv4f32.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> %1, <vscale x 4 x float> %b, iXLen 7, iXLen %vl)
3852
+
ret <vscale x 4 x float> %2
3853
+
}
3854
+
3855
+
define <vscale x 4 x float> @vfmax_vx(<vscale x 4 x float> %a, float%b, iXLen %vl) {
3856
+
; NOVLOPT-LABEL: vfmax_vx:
3857
+
; NOVLOPT: # %bb.0:
3858
+
; NOVLOPT-NEXT: vsetvli a1, zero, e32, m2, ta, ma
3859
+
; NOVLOPT-NEXT: vfmax.vf v10, v8, fa0
3860
+
; NOVLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
3861
+
; NOVLOPT-NEXT: vfadd.vv v8, v10, v8
3862
+
; NOVLOPT-NEXT: ret
3863
+
;
3864
+
; VLOPT-LABEL: vfmax_vx:
3865
+
; VLOPT: # %bb.0:
3866
+
; VLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
3867
+
; VLOPT-NEXT: vfmax.vf v10, v8, fa0
3868
+
; VLOPT-NEXT: vfadd.vv v8, v10, v8
3869
+
; VLOPT-NEXT: ret
3870
+
%1 = call <vscale x 4 x float> @llvm.riscv.vfmax.nxv4f32.f32(<vscale x 4 x float> poison, <vscale x 4 x float> %a, float%b, iXLen -1)
3871
+
%2 = call <vscale x 4 x float> @llvm.riscv.vfadd.nxv4f32.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> %1, <vscale x 4 x float> %a, iXLen 7, iXLen %vl)
3872
+
ret <vscale x 4 x float> %2
3873
+
}
3874
+
3875
+
define <vscale x 4 x float> @vfmin_vv(<vscale x 4 x float> %a, <vscale x 4 x float> %b, iXLen %vl) {
3876
+
; NOVLOPT-LABEL: vfmin_vv:
3877
+
; NOVLOPT: # %bb.0:
3878
+
; NOVLOPT-NEXT: vsetvli a1, zero, e32, m2, ta, ma
3879
+
; NOVLOPT-NEXT: vfmin.vv v8, v8, v10
3880
+
; NOVLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
3881
+
; NOVLOPT-NEXT: vfadd.vv v8, v8, v10
3882
+
; NOVLOPT-NEXT: ret
3883
+
;
3884
+
; VLOPT-LABEL: vfmin_vv:
3885
+
; VLOPT: # %bb.0:
3886
+
; VLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
3887
+
; VLOPT-NEXT: vfmin.vv v8, v8, v10
3888
+
; VLOPT-NEXT: vfadd.vv v8, v8, v10
3889
+
; VLOPT-NEXT: ret
3890
+
%1 = call <vscale x 4 x float> @llvm.riscv.vfmin.nxv4f32.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> %a, <vscale x 4 x float> %b, iXLen -1)
3891
+
%2 = call <vscale x 4 x float> @llvm.riscv.vfadd.nxv4f32.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> %1, <vscale x 4 x float> %b, iXLen 7, iXLen %vl)
3892
+
ret <vscale x 4 x float> %2
3893
+
}
3894
+
3895
+
define <vscale x 4 x float> @vfmin_vx(<vscale x 4 x float> %a, float%b, iXLen %vl) {
3896
+
; NOVLOPT-LABEL: vfmin_vx:
3897
+
; NOVLOPT: # %bb.0:
3898
+
; NOVLOPT-NEXT: vsetvli a1, zero, e32, m2, ta, ma
3899
+
; NOVLOPT-NEXT: vfmin.vf v10, v8, fa0
3900
+
; NOVLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
3901
+
; NOVLOPT-NEXT: vfadd.vv v8, v10, v8
3902
+
; NOVLOPT-NEXT: ret
3903
+
;
3904
+
; VLOPT-LABEL: vfmin_vx:
3905
+
; VLOPT: # %bb.0:
3906
+
; VLOPT-NEXT: vsetvli zero, a0, e32, m2, ta, ma
3907
+
; VLOPT-NEXT: vfmin.vf v10, v8, fa0
3908
+
; VLOPT-NEXT: vfadd.vv v8, v10, v8
3909
+
; VLOPT-NEXT: ret
3910
+
%1 = call <vscale x 4 x float> @llvm.riscv.vfmin.nxv4f32.f32(<vscale x 4 x float> poison, <vscale x 4 x float> %a, float%b, iXLen -1)
3911
+
%2 = call <vscale x 4 x float> @llvm.riscv.vfadd.nxv4f32.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> %1, <vscale x 4 x float> %a, iXLen 7, iXLen %vl)
0 commit comments