1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfhmin,+zvfhmin,+v -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfhmin,+zvfhmin,+v -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 declare <vscale x 1 x half> @llvm.experimental.constrained.fadd.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, metadata, metadata)
12 define <vscale x 1 x half> @vfadd_vv_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb) strictfp {
13 ; ZVFH-LABEL: vfadd_vv_nxv1f16:
14 ; ZVFH: # %bb.0: # %entry
15 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
16 ; ZVFH-NEXT: vfadd.vv v8, v8, v9
19 ; ZVFHMIN-LABEL: vfadd_vv_nxv1f16:
20 ; ZVFHMIN: # %bb.0: # %entry
21 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
22 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
23 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
24 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
25 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v10
26 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
27 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
30 %vc = call <vscale x 1 x half> @llvm.experimental.constrained.fadd.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
31 ret <vscale x 1 x half> %vc
34 define <vscale x 1 x half> @vfadd_vf_nxv1f16(<vscale x 1 x half> %va, half %b) strictfp {
35 ; ZVFH-LABEL: vfadd_vf_nxv1f16:
37 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
38 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
41 ; ZVFHMIN-LABEL: vfadd_vf_nxv1f16:
43 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
44 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
45 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
46 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
47 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
48 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
49 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
50 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
51 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v8
52 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
53 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
55 %head = insertelement <vscale x 1 x half> poison, half %b, i32 0
56 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
57 %vc = call <vscale x 1 x half> @llvm.experimental.constrained.fadd.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
58 ret <vscale x 1 x half> %vc
61 declare <vscale x 2 x half> @llvm.experimental.constrained.fadd.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, metadata, metadata)
62 define <vscale x 2 x half> @vfadd_vv_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb) strictfp {
63 ; ZVFH-LABEL: vfadd_vv_nxv2f16:
64 ; ZVFH: # %bb.0: # %entry
65 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
66 ; ZVFH-NEXT: vfadd.vv v8, v8, v9
69 ; ZVFHMIN-LABEL: vfadd_vv_nxv2f16:
70 ; ZVFHMIN: # %bb.0: # %entry
71 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
72 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
73 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
74 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
75 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v10
76 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
77 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
80 %vc = call <vscale x 2 x half> @llvm.experimental.constrained.fadd.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
81 ret <vscale x 2 x half> %vc
84 define <vscale x 2 x half> @vfadd_vf_nxv2f16(<vscale x 2 x half> %va, half %b) strictfp {
85 ; ZVFH-LABEL: vfadd_vf_nxv2f16:
87 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
88 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
91 ; ZVFHMIN-LABEL: vfadd_vf_nxv2f16:
93 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
94 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m1, ta, ma
95 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
96 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
97 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
98 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
99 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
100 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
101 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v8
102 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
103 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
105 %head = insertelement <vscale x 2 x half> poison, half %b, i32 0
106 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
107 %vc = call <vscale x 2 x half> @llvm.experimental.constrained.fadd.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
108 ret <vscale x 2 x half> %vc
111 declare <vscale x 4 x half> @llvm.experimental.constrained.fadd.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, metadata, metadata)
112 define <vscale x 4 x half> @vfadd_vv_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb) strictfp {
113 ; ZVFH-LABEL: vfadd_vv_nxv4f16:
114 ; ZVFH: # %bb.0: # %entry
115 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
116 ; ZVFH-NEXT: vfadd.vv v8, v8, v9
119 ; ZVFHMIN-LABEL: vfadd_vv_nxv4f16:
120 ; ZVFHMIN: # %bb.0: # %entry
121 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
122 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
123 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
124 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
125 ; ZVFHMIN-NEXT: vfadd.vv v10, v12, v10
126 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
127 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
130 %vc = call <vscale x 4 x half> @llvm.experimental.constrained.fadd.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
131 ret <vscale x 4 x half> %vc
134 define <vscale x 4 x half> @vfadd_vf_nxv4f16(<vscale x 4 x half> %va, half %b) strictfp {
135 ; ZVFH-LABEL: vfadd_vf_nxv4f16:
137 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
138 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
141 ; ZVFHMIN-LABEL: vfadd_vf_nxv4f16:
143 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
144 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
145 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
146 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
147 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
148 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
149 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
150 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
151 ; ZVFHMIN-NEXT: vfadd.vv v10, v10, v12
152 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
153 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
155 %head = insertelement <vscale x 4 x half> poison, half %b, i32 0
156 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
157 %vc = call <vscale x 4 x half> @llvm.experimental.constrained.fadd.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
158 ret <vscale x 4 x half> %vc
161 declare <vscale x 8 x half> @llvm.experimental.constrained.fadd.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, metadata, metadata)
162 define <vscale x 8 x half> @vfadd_vv_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb) strictfp {
163 ; ZVFH-LABEL: vfadd_vv_nxv8f16:
164 ; ZVFH: # %bb.0: # %entry
165 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
166 ; ZVFH-NEXT: vfadd.vv v8, v8, v10
169 ; ZVFHMIN-LABEL: vfadd_vv_nxv8f16:
170 ; ZVFHMIN: # %bb.0: # %entry
171 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
172 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
173 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
174 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
175 ; ZVFHMIN-NEXT: vfadd.vv v12, v16, v12
176 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
177 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
180 %vc = call <vscale x 8 x half> @llvm.experimental.constrained.fadd.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
181 ret <vscale x 8 x half> %vc
184 define <vscale x 8 x half> @vfadd_vf_nxv8f16(<vscale x 8 x half> %va, half %b) strictfp {
185 ; ZVFH-LABEL: vfadd_vf_nxv8f16:
187 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
188 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
191 ; ZVFHMIN-LABEL: vfadd_vf_nxv8f16:
193 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
194 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
195 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
196 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
197 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
198 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
199 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
200 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
201 ; ZVFHMIN-NEXT: vfadd.vv v12, v12, v16
202 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
203 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
205 %head = insertelement <vscale x 8 x half> poison, half %b, i32 0
206 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
207 %vc = call <vscale x 8 x half> @llvm.experimental.constrained.fadd.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
208 ret <vscale x 8 x half> %vc
211 declare <vscale x 16 x half> @llvm.experimental.constrained.fadd.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, metadata, metadata)
212 define <vscale x 16 x half> @vfadd_vv_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb) strictfp {
213 ; ZVFH-LABEL: vfadd_vv_nxv16f16:
214 ; ZVFH: # %bb.0: # %entry
215 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
216 ; ZVFH-NEXT: vfadd.vv v8, v8, v12
219 ; ZVFHMIN-LABEL: vfadd_vv_nxv16f16:
220 ; ZVFHMIN: # %bb.0: # %entry
221 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
222 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
223 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
224 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
225 ; ZVFHMIN-NEXT: vfadd.vv v16, v24, v16
226 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
227 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
230 %vc = call <vscale x 16 x half> @llvm.experimental.constrained.fadd.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
231 ret <vscale x 16 x half> %vc
234 define <vscale x 16 x half> @vfadd_vf_nxv16f16(<vscale x 16 x half> %va, half %b) strictfp {
235 ; ZVFH-LABEL: vfadd_vf_nxv16f16:
237 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
238 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
241 ; ZVFHMIN-LABEL: vfadd_vf_nxv16f16:
243 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
244 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
245 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
246 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
247 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
248 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
249 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
250 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
251 ; ZVFHMIN-NEXT: vfadd.vv v16, v16, v24
252 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
253 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
255 %head = insertelement <vscale x 16 x half> poison, half %b, i32 0
256 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
257 %vc = call <vscale x 16 x half> @llvm.experimental.constrained.fadd.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
258 ret <vscale x 16 x half> %vc
261 declare <vscale x 32 x half> @llvm.experimental.constrained.fadd.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, metadata, metadata)
262 define <vscale x 32 x half> @vfadd_vv_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb) strictfp {
263 ; ZVFH-LABEL: vfadd_vv_nxv32f16:
264 ; ZVFH: # %bb.0: # %entry
265 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
266 ; ZVFH-NEXT: vfadd.vv v8, v8, v16
269 ; ZVFHMIN-LABEL: vfadd_vv_nxv32f16:
270 ; ZVFHMIN: # %bb.0: # %entry
271 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
272 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
273 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v8
274 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
275 ; ZVFHMIN-NEXT: vfadd.vv v24, v0, v24
276 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
277 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v24
278 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
279 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
280 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
281 ; ZVFHMIN-NEXT: vfadd.vv v16, v16, v24
282 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
283 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
286 %vc = call <vscale x 32 x half> @llvm.experimental.constrained.fadd.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
287 ret <vscale x 32 x half> %vc
290 define <vscale x 32 x half> @vfadd_vf_nxv32f16(<vscale x 32 x half> %va, half %b) strictfp {
291 ; ZVFH-LABEL: vfadd_vf_nxv32f16:
293 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
294 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
297 ; ZVFHMIN-LABEL: vfadd_vf_nxv32f16:
299 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
300 ; ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
301 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
302 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
303 ; ZVFHMIN-NEXT: vfncvt.f.f.w v24, v16
304 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
305 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v24
306 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
307 ; ZVFHMIN-NEXT: vfadd.vv v16, v16, v0
308 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
309 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
310 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v24
311 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
312 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
313 ; ZVFHMIN-NEXT: vfadd.vv v16, v24, v16
314 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
315 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
317 %head = insertelement <vscale x 32 x half> poison, half %b, i32 0
318 %splat = shufflevector <vscale x 32 x half> %head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
319 %vc = call <vscale x 32 x half> @llvm.experimental.constrained.fadd.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
320 ret <vscale x 32 x half> %vc
323 declare <vscale x 1 x float> @llvm.experimental.constrained.fadd.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, metadata, metadata)
324 define <vscale x 1 x float> @vfadd_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb) strictfp {
325 ; CHECK-LABEL: vfadd_vv_nxv1f32:
326 ; CHECK: # %bb.0: # %entry
327 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
328 ; CHECK-NEXT: vfadd.vv v8, v8, v9
331 %vc = call <vscale x 1 x float> @llvm.experimental.constrained.fadd.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
332 ret <vscale x 1 x float> %vc
335 define <vscale x 1 x float> @vfadd_vf_nxv1f32(<vscale x 1 x float> %va, float %b) strictfp {
336 ; CHECK-LABEL: vfadd_vf_nxv1f32:
338 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
339 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
341 %head = insertelement <vscale x 1 x float> poison, float %b, i32 0
342 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
343 %vc = call <vscale x 1 x float> @llvm.experimental.constrained.fadd.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
344 ret <vscale x 1 x float> %vc
347 declare <vscale x 2 x float> @llvm.experimental.constrained.fadd.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, metadata, metadata)
348 define <vscale x 2 x float> @vfadd_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb) strictfp {
349 ; CHECK-LABEL: vfadd_vv_nxv2f32:
350 ; CHECK: # %bb.0: # %entry
351 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
352 ; CHECK-NEXT: vfadd.vv v8, v8, v9
355 %vc = call <vscale x 2 x float> @llvm.experimental.constrained.fadd.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
356 ret <vscale x 2 x float> %vc
359 define <vscale x 2 x float> @vfadd_vf_nxv2f32(<vscale x 2 x float> %va, float %b) strictfp {
360 ; CHECK-LABEL: vfadd_vf_nxv2f32:
362 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
363 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
365 %head = insertelement <vscale x 2 x float> poison, float %b, i32 0
366 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
367 %vc = call <vscale x 2 x float> @llvm.experimental.constrained.fadd.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
368 ret <vscale x 2 x float> %vc
371 declare <vscale x 4 x float> @llvm.experimental.constrained.fadd.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, metadata, metadata)
372 define <vscale x 4 x float> @vfadd_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb) strictfp {
373 ; CHECK-LABEL: vfadd_vv_nxv4f32:
374 ; CHECK: # %bb.0: # %entry
375 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
376 ; CHECK-NEXT: vfadd.vv v8, v8, v10
379 %vc = call <vscale x 4 x float> @llvm.experimental.constrained.fadd.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
380 ret <vscale x 4 x float> %vc
383 define <vscale x 4 x float> @vfadd_vf_nxv4f32(<vscale x 4 x float> %va, float %b) strictfp {
384 ; CHECK-LABEL: vfadd_vf_nxv4f32:
386 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
387 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
389 %head = insertelement <vscale x 4 x float> poison, float %b, i32 0
390 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
391 %vc = call <vscale x 4 x float> @llvm.experimental.constrained.fadd.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
392 ret <vscale x 4 x float> %vc
395 declare <vscale x 8 x float> @llvm.experimental.constrained.fadd.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, metadata, metadata)
396 define <vscale x 8 x float> @vfadd_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb) strictfp {
397 ; CHECK-LABEL: vfadd_vv_nxv8f32:
398 ; CHECK: # %bb.0: # %entry
399 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
400 ; CHECK-NEXT: vfadd.vv v8, v8, v12
403 %vc = call <vscale x 8 x float> @llvm.experimental.constrained.fadd.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
404 ret <vscale x 8 x float> %vc
407 define <vscale x 8 x float> @vfadd_vf_nxv8f32(<vscale x 8 x float> %va, float %b) strictfp {
408 ; CHECK-LABEL: vfadd_vf_nxv8f32:
410 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
411 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
413 %head = insertelement <vscale x 8 x float> poison, float %b, i32 0
414 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
415 %vc = call <vscale x 8 x float> @llvm.experimental.constrained.fadd.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
416 ret <vscale x 8 x float> %vc
419 declare <vscale x 16 x float> @llvm.experimental.constrained.fadd.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, metadata, metadata)
420 define <vscale x 16 x float> @vfadd_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb) strictfp {
421 ; CHECK-LABEL: vfadd_vv_nxv16f32:
422 ; CHECK: # %bb.0: # %entry
423 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
424 ; CHECK-NEXT: vfadd.vv v8, v8, v16
427 %vc = call <vscale x 16 x float> @llvm.experimental.constrained.fadd.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
428 ret <vscale x 16 x float> %vc
431 define <vscale x 16 x float> @vfadd_vf_nxv16f32(<vscale x 16 x float> %va, float %b) strictfp {
432 ; CHECK-LABEL: vfadd_vf_nxv16f32:
434 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
435 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
437 %head = insertelement <vscale x 16 x float> poison, float %b, i32 0
438 %splat = shufflevector <vscale x 16 x float> %head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
439 %vc = call <vscale x 16 x float> @llvm.experimental.constrained.fadd.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
440 ret <vscale x 16 x float> %vc
443 declare <vscale x 1 x double> @llvm.experimental.constrained.fadd.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, metadata, metadata)
444 define <vscale x 1 x double> @vfadd_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb) strictfp {
445 ; CHECK-LABEL: vfadd_vv_nxv1f64:
446 ; CHECK: # %bb.0: # %entry
447 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
448 ; CHECK-NEXT: vfadd.vv v8, v8, v9
451 %vc = call <vscale x 1 x double> @llvm.experimental.constrained.fadd.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
452 ret <vscale x 1 x double> %vc
455 define <vscale x 1 x double> @vfadd_vf_nxv1f64(<vscale x 1 x double> %va, double %b) strictfp {
456 ; CHECK-LABEL: vfadd_vf_nxv1f64:
458 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
459 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
461 %head = insertelement <vscale x 1 x double> poison, double %b, i32 0
462 %splat = shufflevector <vscale x 1 x double> %head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
463 %vc = call <vscale x 1 x double> @llvm.experimental.constrained.fadd.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
464 ret <vscale x 1 x double> %vc
467 declare <vscale x 2 x double> @llvm.experimental.constrained.fadd.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, metadata, metadata)
468 define <vscale x 2 x double> @vfadd_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb) strictfp {
469 ; CHECK-LABEL: vfadd_vv_nxv2f64:
470 ; CHECK: # %bb.0: # %entry
471 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
472 ; CHECK-NEXT: vfadd.vv v8, v8, v10
475 %vc = call <vscale x 2 x double> @llvm.experimental.constrained.fadd.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
476 ret <vscale x 2 x double> %vc
479 define <vscale x 2 x double> @vfadd_vf_nxv2f64(<vscale x 2 x double> %va, double %b) strictfp {
480 ; CHECK-LABEL: vfadd_vf_nxv2f64:
482 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
483 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
485 %head = insertelement <vscale x 2 x double> poison, double %b, i32 0
486 %splat = shufflevector <vscale x 2 x double> %head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
487 %vc = call <vscale x 2 x double> @llvm.experimental.constrained.fadd.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
488 ret <vscale x 2 x double> %vc
491 declare <vscale x 4 x double> @llvm.experimental.constrained.fadd.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, metadata, metadata)
492 define <vscale x 4 x double> @vfadd_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb) strictfp {
493 ; CHECK-LABEL: vfadd_vv_nxv4f64:
494 ; CHECK: # %bb.0: # %entry
495 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
496 ; CHECK-NEXT: vfadd.vv v8, v8, v12
499 %vc = call <vscale x 4 x double> @llvm.experimental.constrained.fadd.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
500 ret <vscale x 4 x double> %vc
503 define <vscale x 4 x double> @vfadd_vf_nxv4f64(<vscale x 4 x double> %va, double %b) strictfp {
504 ; CHECK-LABEL: vfadd_vf_nxv4f64:
506 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
507 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
509 %head = insertelement <vscale x 4 x double> poison, double %b, i32 0
510 %splat = shufflevector <vscale x 4 x double> %head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
511 %vc = call <vscale x 4 x double> @llvm.experimental.constrained.fadd.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
512 ret <vscale x 4 x double> %vc
515 declare <vscale x 8 x double> @llvm.experimental.constrained.fadd.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, metadata, metadata)
516 define <vscale x 8 x double> @vfadd_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb) strictfp {
517 ; CHECK-LABEL: vfadd_vv_nxv8f64:
518 ; CHECK: # %bb.0: # %entry
519 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
520 ; CHECK-NEXT: vfadd.vv v8, v8, v16
523 %vc = call <vscale x 8 x double> @llvm.experimental.constrained.fadd.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.ignore")
524 ret <vscale x 8 x double> %vc
527 define <vscale x 8 x double> @vfadd_vf_nxv8f64(<vscale x 8 x double> %va, double %b) strictfp {
528 ; CHECK-LABEL: vfadd_vf_nxv8f64:
530 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
531 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
533 %head = insertelement <vscale x 8 x double> poison, double %b, i32 0
534 %splat = shufflevector <vscale x 8 x double> %head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
535 %vc = call <vscale x 8 x double> @llvm.experimental.constrained.fadd.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %splat, metadata !"round.dynamic", metadata !"fpexcept.ignore")
536 ret <vscale x 8 x double> %vc