1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zvfh,+v -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s
7 declare <1 x half> @llvm.experimental.constrained.fmul.v1f16(<1 x half>, <1 x half>, metadata, metadata)
8 define <1 x half> @vfmul_vv_v1f16(<1 x half> %va, <1 x half> %vb) strictfp {
9 ; CHECK-LABEL: vfmul_vv_v1f16:
10 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
12 ; CHECK-NEXT: vfmul.vv v8, v8, v9
15 %vc = call <1 x half> @llvm.experimental.constrained.fmul.v1f16(<1 x half> %va, <1 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
19 define <1 x half> @vfmul_vf_v1f16(<1 x half> %va, half %b) strictfp {
20 ; CHECK-LABEL: vfmul_vf_v1f16:
22 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
23 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
25 %head = insertelement <1 x half> poison, half %b, i32 0
26 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
27 %vc = call <1 x half> @llvm.experimental.constrained.fmul.v1f16(<1 x half> %va, <1 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
31 declare <2 x half> @llvm.experimental.constrained.fmul.v2f16(<2 x half>, <2 x half>, metadata, metadata)
32 define <2 x half> @vfmul_vv_v2f16(<2 x half> %va, <2 x half> %vb) strictfp {
33 ; CHECK-LABEL: vfmul_vv_v2f16:
34 ; CHECK: # %bb.0: # %entry
35 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
36 ; CHECK-NEXT: vfmul.vv v8, v8, v9
39 %vc = call <2 x half> @llvm.experimental.constrained.fmul.v2f16(<2 x half> %va, <2 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
43 define <2 x half> @vfmul_vf_v2f16(<2 x half> %va, half %b) strictfp {
44 ; CHECK-LABEL: vfmul_vf_v2f16:
46 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
47 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
49 %head = insertelement <2 x half> poison, half %b, i32 0
50 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
51 %vc = call <2 x half> @llvm.experimental.constrained.fmul.v2f16(<2 x half> %va, <2 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
55 declare <4 x half> @llvm.experimental.constrained.fmul.v4f16(<4 x half>, <4 x half>, metadata, metadata)
56 define <4 x half> @vfmul_vv_v4f16(<4 x half> %va, <4 x half> %vb) strictfp {
57 ; CHECK-LABEL: vfmul_vv_v4f16:
58 ; CHECK: # %bb.0: # %entry
59 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
60 ; CHECK-NEXT: vfmul.vv v8, v8, v9
63 %vc = call <4 x half> @llvm.experimental.constrained.fmul.v4f16(<4 x half> %va, <4 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
67 define <4 x half> @vfmul_vf_v4f16(<4 x half> %va, half %b) strictfp {
68 ; CHECK-LABEL: vfmul_vf_v4f16:
70 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
71 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
73 %head = insertelement <4 x half> poison, half %b, i32 0
74 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
75 %vc = call <4 x half> @llvm.experimental.constrained.fmul.v4f16(<4 x half> %va, <4 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
79 declare <8 x half> @llvm.experimental.constrained.fmul.v8f16(<8 x half>, <8 x half>, metadata, metadata)
80 define <8 x half> @vfmul_vv_v8f16(<8 x half> %va, <8 x half> %vb) strictfp {
81 ; CHECK-LABEL: vfmul_vv_v8f16:
82 ; CHECK: # %bb.0: # %entry
83 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
84 ; CHECK-NEXT: vfmul.vv v8, v8, v9
87 %vc = call <8 x half> @llvm.experimental.constrained.fmul.v8f16(<8 x half> %va, <8 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
91 define <8 x half> @vfmul_vf_v8f16(<8 x half> %va, half %b) strictfp {
92 ; CHECK-LABEL: vfmul_vf_v8f16:
94 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
95 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
97 %head = insertelement <8 x half> poison, half %b, i32 0
98 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
99 %vc = call <8 x half> @llvm.experimental.constrained.fmul.v8f16(<8 x half> %va, <8 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
103 declare <16 x half> @llvm.experimental.constrained.fmul.v16f16(<16 x half>, <16 x half>, metadata, metadata)
104 define <16 x half> @vfmul_vv_v16f16(<16 x half> %va, <16 x half> %vb) strictfp {
105 ; CHECK-LABEL: vfmul_vv_v16f16:
106 ; CHECK: # %bb.0: # %entry
107 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
108 ; CHECK-NEXT: vfmul.vv v8, v8, v10
111 %vc = call <16 x half> @llvm.experimental.constrained.fmul.v16f16(<16 x half> %va, <16 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
115 define <16 x half> @vfmul_vf_v16f16(<16 x half> %va, half %b) strictfp {
116 ; CHECK-LABEL: vfmul_vf_v16f16:
118 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
119 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
121 %head = insertelement <16 x half> poison, half %b, i32 0
122 %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer
123 %vc = call <16 x half> @llvm.experimental.constrained.fmul.v16f16(<16 x half> %va, <16 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
127 declare <32 x half> @llvm.experimental.constrained.fmul.v32f16(<32 x half>, <32 x half>, metadata, metadata)
128 define <32 x half> @vfmul_vv_v32f16(<32 x half> %va, <32 x half> %vb) strictfp {
129 ; CHECK-LABEL: vfmul_vv_v32f16:
130 ; CHECK: # %bb.0: # %entry
131 ; CHECK-NEXT: li a0, 32
132 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
133 ; CHECK-NEXT: vfmul.vv v8, v8, v12
136 %vc = call <32 x half> @llvm.experimental.constrained.fmul.v32f16(<32 x half> %va, <32 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
140 define <32 x half> @vfmul_vf_v32f16(<32 x half> %va, half %b) strictfp {
141 ; CHECK-LABEL: vfmul_vf_v32f16:
143 ; CHECK-NEXT: li a0, 32
144 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
145 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
147 %head = insertelement <32 x half> poison, half %b, i32 0
148 %splat = shufflevector <32 x half> %head, <32 x half> poison, <32 x i32> zeroinitializer
149 %vc = call <32 x half> @llvm.experimental.constrained.fmul.v32f16(<32 x half> %va, <32 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
153 declare <1 x float> @llvm.experimental.constrained.fmul.v1f32(<1 x float>, <1 x float>, metadata, metadata)
154 define <1 x float> @vfmul_vv_v1f32(<1 x float> %va, <1 x float> %vb) strictfp {
155 ; CHECK-LABEL: vfmul_vv_v1f32:
156 ; CHECK: # %bb.0: # %entry
157 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
158 ; CHECK-NEXT: vfmul.vv v8, v8, v9
161 %vc = call <1 x float> @llvm.experimental.constrained.fmul.v1f32(<1 x float> %va, <1 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
165 define <1 x float> @vfmul_vf_v1f32(<1 x float> %va, float %b) strictfp {
166 ; CHECK-LABEL: vfmul_vf_v1f32:
168 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
169 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
171 %head = insertelement <1 x float> poison, float %b, i32 0
172 %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer
173 %vc = call <1 x float> @llvm.experimental.constrained.fmul.v1f32(<1 x float> %va, <1 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
177 declare <2 x float> @llvm.experimental.constrained.fmul.v2f32(<2 x float>, <2 x float>, metadata, metadata)
178 define <2 x float> @vfmul_vv_v2f32(<2 x float> %va, <2 x float> %vb) strictfp {
179 ; CHECK-LABEL: vfmul_vv_v2f32:
180 ; CHECK: # %bb.0: # %entry
181 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
182 ; CHECK-NEXT: vfmul.vv v8, v8, v9
185 %vc = call <2 x float> @llvm.experimental.constrained.fmul.v2f32(<2 x float> %va, <2 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
189 define <2 x float> @vfmul_vf_v2f32(<2 x float> %va, float %b) strictfp {
190 ; CHECK-LABEL: vfmul_vf_v2f32:
192 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
193 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
195 %head = insertelement <2 x float> poison, float %b, i32 0
196 %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer
197 %vc = call <2 x float> @llvm.experimental.constrained.fmul.v2f32(<2 x float> %va, <2 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
201 declare <4 x float> @llvm.experimental.constrained.fmul.v4f32(<4 x float>, <4 x float>, metadata, metadata)
202 define <4 x float> @vfmul_vv_v4f32(<4 x float> %va, <4 x float> %vb) strictfp {
203 ; CHECK-LABEL: vfmul_vv_v4f32:
204 ; CHECK: # %bb.0: # %entry
205 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
206 ; CHECK-NEXT: vfmul.vv v8, v8, v9
209 %vc = call <4 x float> @llvm.experimental.constrained.fmul.v4f32(<4 x float> %va, <4 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
213 define <4 x float> @vfmul_vf_v4f32(<4 x float> %va, float %b) strictfp {
214 ; CHECK-LABEL: vfmul_vf_v4f32:
216 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
217 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
219 %head = insertelement <4 x float> poison, float %b, i32 0
220 %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer
221 %vc = call <4 x float> @llvm.experimental.constrained.fmul.v4f32(<4 x float> %va, <4 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
225 declare <8 x float> @llvm.experimental.constrained.fmul.v8f32(<8 x float>, <8 x float>, metadata, metadata)
226 define <8 x float> @vfmul_vv_v8f32(<8 x float> %va, <8 x float> %vb) strictfp {
227 ; CHECK-LABEL: vfmul_vv_v8f32:
228 ; CHECK: # %bb.0: # %entry
229 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
230 ; CHECK-NEXT: vfmul.vv v8, v8, v10
233 %vc = call <8 x float> @llvm.experimental.constrained.fmul.v8f32(<8 x float> %va, <8 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
237 define <8 x float> @vfmul_vf_v8f32(<8 x float> %va, float %b) strictfp {
238 ; CHECK-LABEL: vfmul_vf_v8f32:
240 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
241 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
243 %head = insertelement <8 x float> poison, float %b, i32 0
244 %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer
245 %vc = call <8 x float> @llvm.experimental.constrained.fmul.v8f32(<8 x float> %va, <8 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
249 declare <16 x float> @llvm.experimental.constrained.fmul.v16f32(<16 x float>, <16 x float>, metadata, metadata)
250 define <16 x float> @vfmul_vv_v16f32(<16 x float> %va, <16 x float> %vb) strictfp {
251 ; CHECK-LABEL: vfmul_vv_v16f32:
252 ; CHECK: # %bb.0: # %entry
253 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
254 ; CHECK-NEXT: vfmul.vv v8, v8, v12
257 %vc = call <16 x float> @llvm.experimental.constrained.fmul.v16f32(<16 x float> %va, <16 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
261 define <16 x float> @vfmul_vf_v16f32(<16 x float> %va, float %b) strictfp {
262 ; CHECK-LABEL: vfmul_vf_v16f32:
264 ; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, ma
265 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
267 %head = insertelement <16 x float> poison, float %b, i32 0
268 %splat = shufflevector <16 x float> %head, <16 x float> poison, <16 x i32> zeroinitializer
269 %vc = call <16 x float> @llvm.experimental.constrained.fmul.v16f32(<16 x float> %va, <16 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
273 declare <1 x double> @llvm.experimental.constrained.fmul.v1f64(<1 x double>, <1 x double>, metadata, metadata)
274 define <1 x double> @vfmul_vv_v1f64(<1 x double> %va, <1 x double> %vb) strictfp {
275 ; CHECK-LABEL: vfmul_vv_v1f64:
276 ; CHECK: # %bb.0: # %entry
277 ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma
278 ; CHECK-NEXT: vfmul.vv v8, v8, v9
281 %vc = call <1 x double> @llvm.experimental.constrained.fmul.v1f64(<1 x double> %va, <1 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
285 define <1 x double> @vfmul_vf_v1f64(<1 x double> %va, double %b) strictfp {
286 ; CHECK-LABEL: vfmul_vf_v1f64:
288 ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma
289 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
291 %head = insertelement <1 x double> poison, double %b, i32 0
292 %splat = shufflevector <1 x double> %head, <1 x double> poison, <1 x i32> zeroinitializer
293 %vc = call <1 x double> @llvm.experimental.constrained.fmul.v1f64(<1 x double> %va, <1 x double> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
297 declare <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double>, <2 x double>, metadata, metadata)
298 define <2 x double> @vfmul_vv_v2f64(<2 x double> %va, <2 x double> %vb) strictfp {
299 ; CHECK-LABEL: vfmul_vv_v2f64:
300 ; CHECK: # %bb.0: # %entry
301 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
302 ; CHECK-NEXT: vfmul.vv v8, v8, v9
305 %vc = call <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double> %va, <2 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
309 define <2 x double> @vfmul_vf_v2f64(<2 x double> %va, double %b) strictfp {
310 ; CHECK-LABEL: vfmul_vf_v2f64:
312 ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
313 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
315 %head = insertelement <2 x double> poison, double %b, i32 0
316 %splat = shufflevector <2 x double> %head, <2 x double> poison, <2 x i32> zeroinitializer
317 %vc = call <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double> %va, <2 x double> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
321 declare <4 x double> @llvm.experimental.constrained.fmul.v4f64(<4 x double>, <4 x double>, metadata, metadata)
322 define <4 x double> @vfmul_vv_v4f64(<4 x double> %va, <4 x double> %vb) strictfp {
323 ; CHECK-LABEL: vfmul_vv_v4f64:
324 ; CHECK: # %bb.0: # %entry
325 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
326 ; CHECK-NEXT: vfmul.vv v8, v8, v10
329 %vc = call <4 x double> @llvm.experimental.constrained.fmul.v4f64(<4 x double> %va, <4 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
333 define <4 x double> @vfmul_vf_v4f64(<4 x double> %va, double %b) strictfp {
334 ; CHECK-LABEL: vfmul_vf_v4f64:
336 ; CHECK-NEXT: vsetivli zero, 4, e64, m2, ta, ma
337 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
339 %head = insertelement <4 x double> poison, double %b, i32 0
340 %splat = shufflevector <4 x double> %head, <4 x double> poison, <4 x i32> zeroinitializer
341 %vc = call <4 x double> @llvm.experimental.constrained.fmul.v4f64(<4 x double> %va, <4 x double> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
345 declare <8 x double> @llvm.experimental.constrained.fmul.v8f64(<8 x double>, <8 x double>, metadata, metadata)
346 define <8 x double> @vfmul_vv_v8f64(<8 x double> %va, <8 x double> %vb) strictfp {
347 ; CHECK-LABEL: vfmul_vv_v8f64:
348 ; CHECK: # %bb.0: # %entry
349 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
350 ; CHECK-NEXT: vfmul.vv v8, v8, v12
353 %vc = call <8 x double> @llvm.experimental.constrained.fmul.v8f64(<8 x double> %va, <8 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
357 define <8 x double> @vfmul_vf_v8f64(<8 x double> %va, double %b) strictfp {
358 ; CHECK-LABEL: vfmul_vf_v8f64:
360 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
361 ; CHECK-NEXT: vfmul.vf v8, v8, fa0
363 %head = insertelement <8 x double> poison, double %b, i32 0
364 %splat = shufflevector <8 x double> %head, <8 x double> poison, <8 x i32> zeroinitializer
365 %vc = call <8 x double> @llvm.experimental.constrained.fmul.v8f64(<8 x double> %va, <8 x double> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")