1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+zvfbfmin,+xsfvfwmaccqqq \
3 ; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK
4 ; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zvfbfmin,+xsfvfwmaccqqq \
5 ; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK
7 declare <vscale x 1 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv1f32.nxv4bf16.nxv1bf16.iXLen(
10 <vscale x 1 x bfloat>,
13 define <vscale x 1 x float> @intrinsic_vfwmacc_4x4x4_tu_f32mf2(<vscale x 1 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 1 x bfloat> %2, iXLen %3) nounwind {
14 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_tu_f32mf2:
15 ; CHECK: # %bb.0: # %entry
16 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
17 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v9, v10
20 %a = call <vscale x 1 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv1f32.nxv4bf16.nxv1bf16.iXLen(
21 <vscale x 1 x float> %0,
22 <vscale x 4 x bfloat> %1,
23 <vscale x 1 x bfloat> %2,
26 ret <vscale x 1 x float> %a
29 define <vscale x 1 x float> @intrinsic_vfwmacc_4x4x4_ta_f32mf2(<vscale x 1 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 1 x bfloat> %2, iXLen %3) nounwind {
30 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_ta_f32mf2:
31 ; CHECK: # %bb.0: # %entry
32 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
33 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v9, v10
36 %a = call <vscale x 1 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv1f32.nxv4bf16.nxv1bf16.iXLen(
37 <vscale x 1 x float> %0,
38 <vscale x 4 x bfloat> %1,
39 <vscale x 1 x bfloat> %2,
42 ret <vscale x 1 x float> %a
45 declare <vscale x 2 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv2f32.nxv4bf16.nxv2bf16.iXLen(
47 <vscale x 4 x bfloat>,
48 <vscale x 2 x bfloat>,
51 define <vscale x 2 x float> @intrinsic_vfwmacc_4x4x4_tu_f32m1(<vscale x 2 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 2 x bfloat> %2, iXLen %3) nounwind {
52 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_tu_f32m1:
53 ; CHECK: # %bb.0: # %entry
54 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
55 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v9, v10
58 %a = call <vscale x 2 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv2f32.nxv4bf16.nxv2bf16.iXLen(
59 <vscale x 2 x float> %0,
60 <vscale x 4 x bfloat> %1,
61 <vscale x 2 x bfloat> %2,
64 ret <vscale x 2 x float> %a
67 define <vscale x 2 x float> @intrinsic_vfwmacc_4x4x4_ta_f32m1(<vscale x 2 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 2 x bfloat> %2, iXLen %3) nounwind {
68 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_ta_f32m1:
69 ; CHECK: # %bb.0: # %entry
70 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
71 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v9, v10
74 %a = call <vscale x 2 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv2f32.nxv4bf16.nxv2bf16.iXLen(
75 <vscale x 2 x float> %0,
76 <vscale x 4 x bfloat> %1,
77 <vscale x 2 x bfloat> %2,
80 ret <vscale x 2 x float> %a
83 declare <vscale x 4 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv4f32.nxv4bf16.nxv4bf16.iXLen(
85 <vscale x 4 x bfloat>,
86 <vscale x 4 x bfloat>,
89 define <vscale x 4 x float> @intrinsic_vfwmacc_4x4x4_tu_f32m2(<vscale x 4 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 4 x bfloat> %2, iXLen %3) nounwind {
90 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_tu_f32m2:
91 ; CHECK: # %bb.0: # %entry
92 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
93 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v10, v11
96 %a = call <vscale x 4 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv4f32.nxv4bf16.nxv4bf16.iXLen(
97 <vscale x 4 x float> %0,
98 <vscale x 4 x bfloat> %1,
99 <vscale x 4 x bfloat> %2,
102 ret <vscale x 4 x float> %a
105 define <vscale x 4 x float> @intrinsic_vfwmacc_4x4x4_ta_f32m2(<vscale x 4 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 4 x bfloat> %2, iXLen %3) nounwind {
106 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_ta_f32m2:
107 ; CHECK: # %bb.0: # %entry
108 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
109 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v10, v11
112 %a = call <vscale x 4 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv4f32.nxv4bf16.nxv4bf16.iXLen(
113 <vscale x 4 x float> %0,
114 <vscale x 4 x bfloat> %1,
115 <vscale x 4 x bfloat> %2,
118 ret <vscale x 4 x float> %a
121 declare <vscale x 8 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv8f32.nxv4bf16.nxv8bf16.iXLen(
122 <vscale x 8 x float>,
123 <vscale x 4 x bfloat>,
124 <vscale x 8 x bfloat>,
127 define <vscale x 8 x float> @intrinsic_vfwmacc_4x4x4_tu_f32m4(<vscale x 8 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 8 x bfloat> %2, iXLen %3) nounwind {
128 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_tu_f32m4:
129 ; CHECK: # %bb.0: # %entry
130 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
131 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v12, v14
134 %a = call <vscale x 8 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv8f32.nxv4bf16.nxv8bf16.iXLen(
135 <vscale x 8 x float> %0,
136 <vscale x 4 x bfloat> %1,
137 <vscale x 8 x bfloat> %2,
140 ret <vscale x 8 x float> %a
143 define <vscale x 8 x float> @intrinsic_vfwmacc_4x4x4_ta_f32m4(<vscale x 8 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 8 x bfloat> %2, iXLen %3) nounwind {
144 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_ta_f32m4:
145 ; CHECK: # %bb.0: # %entry
146 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
147 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v12, v14
150 %a = call <vscale x 8 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv8f32.nxv4bf16.nxv8bf16.iXLen(
151 <vscale x 8 x float> %0,
152 <vscale x 4 x bfloat> %1,
153 <vscale x 8 x bfloat> %2,
156 ret <vscale x 8 x float> %a
159 declare <vscale x 16 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv16f32.nxv4bf16.nxv16bf16.iXLen(
160 <vscale x 16 x float>,
161 <vscale x 4 x bfloat>,
162 <vscale x 16 x bfloat>,
165 define <vscale x 16 x float> @intrinsic_vfwmacc_4x4x4_tu_f32m8(<vscale x 16 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 16 x bfloat> %2, iXLen %3) nounwind {
166 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_tu_f32m8:
167 ; CHECK: # %bb.0: # %entry
168 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
169 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v16, v20
172 %a = call <vscale x 16 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv16f32.nxv4bf16.nxv16bf16.iXLen(
173 <vscale x 16 x float> %0,
174 <vscale x 4 x bfloat> %1,
175 <vscale x 16 x bfloat> %2,
178 ret <vscale x 16 x float> %a
181 define <vscale x 16 x float> @intrinsic_vfwmacc_4x4x4_ta_f32m8(<vscale x 16 x float> %0, <vscale x 4 x bfloat> %1, <vscale x 16 x bfloat> %2, iXLen %3) nounwind {
182 ; CHECK-LABEL: intrinsic_vfwmacc_4x4x4_ta_f32m8:
183 ; CHECK: # %bb.0: # %entry
184 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
185 ; CHECK-NEXT: sf.vfwmacc.4x4x4 v8, v16, v20
188 %a = call <vscale x 16 x float> @llvm.riscv.sf.vfwmacc.4x4x4.nxv16f32.nxv4bf16.nxv16bf16.iXLen(
189 <vscale x 16 x float> %0,
190 <vscale x 4 x bfloat> %1,
191 <vscale x 16 x bfloat> %2,
194 ret <vscale x 16 x float> %a