1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s
4 define <vscale x 8 x half> @fmla_h_sel(<vscale x 8 x i1> %pred, <vscale x 8 x half> %acc, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2) {
5 ; CHECK-LABEL: fmla_h_sel:
7 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
9 %mul = fmul contract <vscale x 8 x half> %m1, %m2
10 %add = fadd contract <vscale x 8 x half> %acc, %mul
11 %res = select <vscale x 8 x i1> %pred, <vscale x 8 x half> %add, <vscale x 8 x half> %acc
12 ret <vscale x 8 x half> %res
15 define <vscale x 4 x half> @fmla_hx4_sel(<vscale x 4 x i1> %pred, <vscale x 4 x half> %acc, <vscale x 4 x half> %m1, <vscale x 4 x half> %m2) {
16 ; CHECK-LABEL: fmla_hx4_sel:
18 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
20 %mul = fmul contract <vscale x 4 x half> %m1, %m2
21 %add = fadd contract <vscale x 4 x half> %acc, %mul
22 %res = select <vscale x 4 x i1> %pred, <vscale x 4 x half> %add, <vscale x 4 x half> %acc
23 ret <vscale x 4 x half> %res
26 define <vscale x 2 x half> @fmla_hx2_sel(<vscale x 2 x i1> %pred, <vscale x 2 x half> %acc, <vscale x 2 x half> %m1, <vscale x 2 x half> %m2) {
27 ; CHECK-LABEL: fmla_hx2_sel:
29 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
31 %mul = fmul contract <vscale x 2 x half> %m1, %m2
32 %add = fadd contract <vscale x 2 x half> %acc, %mul
33 %res = select <vscale x 2 x i1> %pred, <vscale x 2 x half> %add, <vscale x 2 x half> %acc
34 ret <vscale x 2 x half> %res
37 define <vscale x 4 x float> @fmla_s_sel(<vscale x 4 x i1> %pred, <vscale x 4 x float> %acc, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2) {
38 ; CHECK-LABEL: fmla_s_sel:
40 ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
42 %mul = fmul contract <vscale x 4 x float> %m1, %m2
43 %add = fadd contract <vscale x 4 x float> %acc, %mul
44 %res = select <vscale x 4 x i1> %pred, <vscale x 4 x float> %add, <vscale x 4 x float> %acc
45 ret <vscale x 4 x float> %res
48 define <vscale x 2 x float> @fmla_sx2_sel(<vscale x 2 x i1> %pred, <vscale x 2 x float> %acc, <vscale x 2 x float> %m1, <vscale x 2 x float> %m2) {
49 ; CHECK-LABEL: fmla_sx2_sel:
51 ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
53 %mul = fmul contract <vscale x 2 x float> %m1, %m2
54 %add = fadd contract <vscale x 2 x float> %acc, %mul
55 %res = select <vscale x 2 x i1> %pred, <vscale x 2 x float> %add, <vscale x 2 x float> %acc
56 ret <vscale x 2 x float> %res
59 define <vscale x 2 x double> @fmla_d_sel(<vscale x 2 x i1> %pred, <vscale x 2 x double> %acc, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2) {
60 ; CHECK-LABEL: fmla_d_sel:
62 ; CHECK-NEXT: fmla z0.d, p0/m, z1.d, z2.d
64 %mul = fmul contract <vscale x 2 x double> %m1, %m2
65 %add = fadd contract <vscale x 2 x double> %acc, %mul
66 %res = select <vscale x 2 x i1> %pred, <vscale x 2 x double> %add, <vscale x 2 x double> %acc
67 ret <vscale x 2 x double> %res
70 define <vscale x 8 x half> @fmls_h_sel(<vscale x 8 x i1> %pred, <vscale x 8 x half> %acc, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2) {
71 ; CHECK-LABEL: fmls_h_sel:
73 ; CHECK-NEXT: fmls z0.h, p0/m, z1.h, z2.h
75 %mul = fmul contract <vscale x 8 x half> %m1, %m2
76 %sub = fsub contract <vscale x 8 x half> %acc, %mul
77 %res = select <vscale x 8 x i1> %pred, <vscale x 8 x half> %sub, <vscale x 8 x half> %acc
78 ret <vscale x 8 x half> %res
81 define <vscale x 4 x half> @fmls_hx4_sel(<vscale x 4 x i1> %pred, <vscale x 4 x half> %acc, <vscale x 4 x half> %m1, <vscale x 4 x half> %m2) {
82 ; CHECK-LABEL: fmls_hx4_sel:
84 ; CHECK-NEXT: fmls z0.h, p0/m, z1.h, z2.h
86 %mul = fmul contract <vscale x 4 x half> %m1, %m2
87 %sub = fsub contract <vscale x 4 x half> %acc, %mul
88 %res = select <vscale x 4 x i1> %pred, <vscale x 4 x half> %sub, <vscale x 4 x half> %acc
89 ret <vscale x 4 x half> %res
92 define <vscale x 2 x half> @fmls_hx2_sel(<vscale x 2 x i1> %pred, <vscale x 2 x half> %acc, <vscale x 2 x half> %m1, <vscale x 2 x half> %m2) {
93 ; CHECK-LABEL: fmls_hx2_sel:
95 ; CHECK-NEXT: fmls z0.h, p0/m, z1.h, z2.h
97 %mul = fmul contract <vscale x 2 x half> %m1, %m2
98 %sub = fsub contract <vscale x 2 x half> %acc, %mul
99 %res = select <vscale x 2 x i1> %pred, <vscale x 2 x half> %sub, <vscale x 2 x half> %acc
100 ret <vscale x 2 x half> %res
103 define <vscale x 4 x float> @fmls_s_sel(<vscale x 4 x i1> %pred, <vscale x 4 x float> %acc, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2) {
104 ; CHECK-LABEL: fmls_s_sel:
106 ; CHECK-NEXT: fmls z0.s, p0/m, z1.s, z2.s
108 %mul = fmul contract <vscale x 4 x float> %m1, %m2
109 %sub = fsub contract <vscale x 4 x float> %acc, %mul
110 %res = select <vscale x 4 x i1> %pred, <vscale x 4 x float> %sub, <vscale x 4 x float> %acc
111 ret <vscale x 4 x float> %res
114 define <vscale x 2 x float> @fmls_sx2_sel(<vscale x 2 x i1> %pred, <vscale x 2 x float> %acc, <vscale x 2 x float> %m1, <vscale x 2 x float> %m2) {
115 ; CHECK-LABEL: fmls_sx2_sel:
117 ; CHECK-NEXT: fmls z0.s, p0/m, z1.s, z2.s
119 %mul = fmul contract <vscale x 2 x float> %m1, %m2
120 %sub = fsub contract <vscale x 2 x float> %acc, %mul
121 %res = select <vscale x 2 x i1> %pred, <vscale x 2 x float> %sub, <vscale x 2 x float> %acc
122 ret <vscale x 2 x float> %res
125 define <vscale x 2 x double> @fmls_d_sel(<vscale x 2 x i1> %pred, <vscale x 2 x double> %acc, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2) {
126 ; CHECK-LABEL: fmls_d_sel:
128 ; CHECK-NEXT: fmls z0.d, p0/m, z1.d, z2.d
130 %mul = fmul contract <vscale x 2 x double> %m1, %m2
131 %sub = fsub contract <vscale x 2 x double> %acc, %mul
132 %res = select <vscale x 2 x i1> %pred, <vscale x 2 x double> %sub, <vscale x 2 x double> %acc
133 ret <vscale x 2 x double> %res
136 define <vscale x 8 x half> @fmad_h(<vscale x 8 x half> %m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc) {
137 ; CHECK-LABEL: fmad_h:
139 ; CHECK-NEXT: ptrue p0.h
140 ; CHECK-NEXT: fmad z0.h, p0/m, z1.h, z2.h
142 %mul = fmul contract <vscale x 8 x half> %m1, %m2
143 %res = fadd contract <vscale x 8 x half> %acc, %mul
144 ret <vscale x 8 x half> %res
147 define <vscale x 4 x half> @fmad_hx4(<vscale x 4 x half> %m1, <vscale x 4 x half> %m2, <vscale x 4 x half> %acc) {
148 ; CHECK-LABEL: fmad_hx4:
150 ; CHECK-NEXT: ptrue p0.s
151 ; CHECK-NEXT: fmad z0.h, p0/m, z1.h, z2.h
153 %mul = fmul contract <vscale x 4 x half> %m1, %m2
154 %res = fadd contract <vscale x 4 x half> %acc, %mul
155 ret <vscale x 4 x half> %res
158 define <vscale x 2 x half> @fmad_hx2(<vscale x 2 x half> %m1, <vscale x 2 x half> %m2, <vscale x 2 x half> %acc) {
159 ; CHECK-LABEL: fmad_hx2:
161 ; CHECK-NEXT: ptrue p0.d
162 ; CHECK-NEXT: fmad z0.h, p0/m, z1.h, z2.h
164 %mul = fmul contract <vscale x 2 x half> %m1, %m2
165 %res = fadd contract <vscale x 2 x half> %acc, %mul
166 ret <vscale x 2 x half> %res
169 define <vscale x 4 x float> @fmad_s(<vscale x 4 x float> %m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc) {
170 ; CHECK-LABEL: fmad_s:
172 ; CHECK-NEXT: ptrue p0.s
173 ; CHECK-NEXT: fmad z0.s, p0/m, z1.s, z2.s
175 %mul = fmul contract <vscale x 4 x float> %m1, %m2
176 %res = fadd contract <vscale x 4 x float> %acc, %mul
177 ret <vscale x 4 x float> %res
180 define <vscale x 2 x float> @fmad_sx2(<vscale x 2 x float> %m1, <vscale x 2 x float> %m2, <vscale x 2 x float> %acc) {
181 ; CHECK-LABEL: fmad_sx2:
183 ; CHECK-NEXT: ptrue p0.d
184 ; CHECK-NEXT: fmad z0.s, p0/m, z1.s, z2.s
186 %mul = fmul contract <vscale x 2 x float> %m1, %m2
187 %res = fadd contract <vscale x 2 x float> %acc, %mul
188 ret <vscale x 2 x float> %res
191 define <vscale x 2 x double> @fmad_d(<vscale x 2 x double> %m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc) {
192 ; CHECK-LABEL: fmad_d:
194 ; CHECK-NEXT: ptrue p0.d
195 ; CHECK-NEXT: fmad z0.d, p0/m, z1.d, z2.d
197 %mul = fmul contract <vscale x 2 x double> %m1, %m2
198 %res = fadd contract <vscale x 2 x double> %acc, %mul
199 ret <vscale x 2 x double> %res
202 define <vscale x 8 x half> @fmla_h(<vscale x 8 x half> %acc, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2) {
203 ; CHECK-LABEL: fmla_h:
205 ; CHECK-NEXT: ptrue p0.h
206 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
208 %mul = fmul contract <vscale x 8 x half> %m1, %m2
209 %res = fadd contract <vscale x 8 x half> %acc, %mul
210 ret <vscale x 8 x half> %res
213 define <vscale x 4 x half> @fmla_hx4(<vscale x 4 x half> %acc, <vscale x 4 x half> %m1, <vscale x 4 x half> %m2) {
214 ; CHECK-LABEL: fmla_hx4:
216 ; CHECK-NEXT: ptrue p0.s
217 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
219 %mul = fmul contract <vscale x 4 x half> %m1, %m2
220 %res = fadd contract <vscale x 4 x half> %acc, %mul
221 ret <vscale x 4 x half> %res
224 define <vscale x 2 x half> @fmla_hx2(<vscale x 2 x half> %acc, <vscale x 2 x half> %m1, <vscale x 2 x half> %m2) {
225 ; CHECK-LABEL: fmla_hx2:
227 ; CHECK-NEXT: ptrue p0.d
228 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
230 %mul = fmul contract <vscale x 2 x half> %m1, %m2
231 %res = fadd contract <vscale x 2 x half> %acc, %mul
232 ret <vscale x 2 x half> %res
235 define <vscale x 4 x float> @fmla_s(<vscale x 4 x float> %acc, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2) {
236 ; CHECK-LABEL: fmla_s:
238 ; CHECK-NEXT: ptrue p0.s
239 ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
241 %mul = fmul contract <vscale x 4 x float> %m1, %m2
242 %res = fadd contract <vscale x 4 x float> %acc, %mul
243 ret <vscale x 4 x float> %res
246 define <vscale x 2 x float> @fmla_sx2(<vscale x 2 x float> %acc, <vscale x 2 x float> %m1, <vscale x 2 x float> %m2) {
247 ; CHECK-LABEL: fmla_sx2:
249 ; CHECK-NEXT: ptrue p0.d
250 ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
252 %mul = fmul contract <vscale x 2 x float> %m1, %m2
253 %res = fadd contract <vscale x 2 x float> %acc, %mul
254 ret <vscale x 2 x float> %res
257 define <vscale x 2 x double> @fmla_d(<vscale x 2 x double> %acc, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2) {
258 ; CHECK-LABEL: fmla_d:
260 ; CHECK-NEXT: ptrue p0.d
261 ; CHECK-NEXT: fmla z0.d, p0/m, z1.d, z2.d
263 %mul = fmul contract <vscale x 2 x double> %m1, %m2
264 %res = fadd contract <vscale x 2 x double> %acc, %mul
265 ret <vscale x 2 x double> %res
268 define <vscale x 8 x half> @fmls_h(<vscale x 8 x half> %acc, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2) {
269 ; CHECK-LABEL: fmls_h:
271 ; CHECK-NEXT: ptrue p0.h
272 ; CHECK-NEXT: fmls z0.h, p0/m, z1.h, z2.h
274 %mul = fmul contract <vscale x 8 x half> %m1, %m2
275 %res = fsub contract <vscale x 8 x half> %acc, %mul
276 ret <vscale x 8 x half> %res
279 define <vscale x 4 x half> @fmls_hx4(<vscale x 4 x half> %acc, <vscale x 4 x half> %m1, <vscale x 4 x half> %m2) {
280 ; CHECK-LABEL: fmls_hx4:
282 ; CHECK-NEXT: ptrue p0.s
283 ; CHECK-NEXT: fmls z0.h, p0/m, z1.h, z2.h
285 %mul = fmul contract <vscale x 4 x half> %m1, %m2
286 %res = fsub contract <vscale x 4 x half> %acc, %mul
287 ret <vscale x 4 x half> %res
290 define <vscale x 2 x half> @fmls_hx2(<vscale x 2 x half> %acc, <vscale x 2 x half> %m1, <vscale x 2 x half> %m2) {
291 ; CHECK-LABEL: fmls_hx2:
293 ; CHECK-NEXT: ptrue p0.d
294 ; CHECK-NEXT: fmls z0.h, p0/m, z1.h, z2.h
296 %mul = fmul contract <vscale x 2 x half> %m1, %m2
297 %res = fsub contract <vscale x 2 x half> %acc, %mul
298 ret <vscale x 2 x half> %res
301 define <vscale x 4 x float> @fmls_s(<vscale x 4 x float> %acc, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2) {
302 ; CHECK-LABEL: fmls_s:
304 ; CHECK-NEXT: ptrue p0.s
305 ; CHECK-NEXT: fmls z0.s, p0/m, z1.s, z2.s
307 %mul = fmul contract <vscale x 4 x float> %m1, %m2
308 %res = fsub contract <vscale x 4 x float> %acc, %mul
309 ret <vscale x 4 x float> %res
312 define <vscale x 2 x float> @fmls_sx2(<vscale x 2 x float> %acc, <vscale x 2 x float> %m1, <vscale x 2 x float> %m2) {
313 ; CHECK-LABEL: fmls_sx2:
315 ; CHECK-NEXT: ptrue p0.d
316 ; CHECK-NEXT: fmls z0.s, p0/m, z1.s, z2.s
318 %mul = fmul contract <vscale x 2 x float> %m1, %m2
319 %res = fsub contract <vscale x 2 x float> %acc, %mul
320 ret <vscale x 2 x float> %res
323 define <vscale x 2 x double> @fmls_d(<vscale x 2 x double> %acc, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2) {
324 ; CHECK-LABEL: fmls_d:
326 ; CHECK-NEXT: ptrue p0.d
327 ; CHECK-NEXT: fmls z0.d, p0/m, z1.d, z2.d
329 %mul = fmul contract <vscale x 2 x double> %m1, %m2
330 %res = fsub contract <vscale x 2 x double> %acc, %mul
331 ret <vscale x 2 x double> %res
334 define <vscale x 8 x half> @fmsb_h(<vscale x 8 x half> %m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc) {
335 ; CHECK-LABEL: fmsb_h:
337 ; CHECK-NEXT: ptrue p0.h
338 ; CHECK-NEXT: fmsb z0.h, p0/m, z1.h, z2.h
340 %mul = fmul contract <vscale x 8 x half> %m1, %m2
341 %res = fsub contract <vscale x 8 x half> %acc, %mul
342 ret <vscale x 8 x half> %res
345 define <vscale x 4 x half> @fmsb_hx4(<vscale x 4 x half> %m1, <vscale x 4 x half> %m2, <vscale x 4 x half> %acc) {
346 ; CHECK-LABEL: fmsb_hx4:
348 ; CHECK-NEXT: ptrue p0.s
349 ; CHECK-NEXT: fmsb z0.h, p0/m, z1.h, z2.h
351 %mul = fmul contract <vscale x 4 x half> %m1, %m2
352 %res = fsub contract <vscale x 4 x half> %acc, %mul
353 ret <vscale x 4 x half> %res
356 define <vscale x 2 x half> @fmsb_hx2(<vscale x 2 x half> %m1, <vscale x 2 x half> %m2, <vscale x 2 x half> %acc) {
357 ; CHECK-LABEL: fmsb_hx2:
359 ; CHECK-NEXT: ptrue p0.d
360 ; CHECK-NEXT: fmsb z0.h, p0/m, z1.h, z2.h
362 %mul = fmul contract <vscale x 2 x half> %m1, %m2
363 %res = fsub contract <vscale x 2 x half> %acc, %mul
364 ret <vscale x 2 x half> %res
367 define <vscale x 4 x float> @fmsb_s(<vscale x 4 x float> %m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc) {
368 ; CHECK-LABEL: fmsb_s:
370 ; CHECK-NEXT: ptrue p0.s
371 ; CHECK-NEXT: fmsb z0.s, p0/m, z1.s, z2.s
373 %mul = fmul contract <vscale x 4 x float> %m1, %m2
374 %res = fsub contract <vscale x 4 x float> %acc, %mul
375 ret <vscale x 4 x float> %res
378 define <vscale x 2 x float> @fmsb_sx2(<vscale x 2 x float> %m1, <vscale x 2 x float> %m2, <vscale x 2 x float> %acc) {
379 ; CHECK-LABEL: fmsb_sx2:
381 ; CHECK-NEXT: ptrue p0.d
382 ; CHECK-NEXT: fmsb z0.s, p0/m, z1.s, z2.s
384 %mul = fmul contract <vscale x 2 x float> %m1, %m2
385 %res = fsub contract <vscale x 2 x float> %acc, %mul
386 ret <vscale x 2 x float> %res
389 define <vscale x 2 x double> @fmsb_d(<vscale x 2 x double> %m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc) {
390 ; CHECK-LABEL: fmsb_d:
392 ; CHECK-NEXT: ptrue p0.d
393 ; CHECK-NEXT: fmsb z0.d, p0/m, z1.d, z2.d
395 %mul = fmul contract <vscale x 2 x double> %m1, %m2
396 %res = fsub contract <vscale x 2 x double> %acc, %mul
397 ret <vscale x 2 x double> %res
400 define <vscale x 8 x half> @fnmad_h(<vscale x 8 x half> %m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc) {
401 ; CHECK-LABEL: fnmad_h:
403 ; CHECK-NEXT: ptrue p0.h
404 ; CHECK-NEXT: fnmad z0.h, p0/m, z1.h, z2.h
406 %neg_m1 = fneg contract <vscale x 8 x half> %m1
407 %mul = fmul contract <vscale x 8 x half> %neg_m1, %m2
408 %res = fsub contract <vscale x 8 x half> %mul, %acc
409 ret <vscale x 8 x half> %res
412 define <vscale x 4 x half> @fnmad_hx4(<vscale x 4 x half> %m1, <vscale x 4 x half> %m2, <vscale x 4 x half> %acc) {
413 ; CHECK-LABEL: fnmad_hx4:
415 ; CHECK-NEXT: ptrue p0.s
416 ; CHECK-NEXT: fnmad z0.h, p0/m, z1.h, z2.h
418 %neg_m1 = fneg contract <vscale x 4 x half> %m1
419 %mul = fmul contract <vscale x 4 x half> %neg_m1, %m2
420 %res = fsub contract <vscale x 4 x half> %mul, %acc
421 ret <vscale x 4 x half> %res
424 define <vscale x 2 x half> @fnmad_hx2(<vscale x 2 x half> %m1, <vscale x 2 x half> %m2, <vscale x 2 x half> %acc) {
425 ; CHECK-LABEL: fnmad_hx2:
427 ; CHECK-NEXT: ptrue p0.d
428 ; CHECK-NEXT: fnmad z0.h, p0/m, z1.h, z2.h
430 %neg_m1 = fneg contract <vscale x 2 x half> %m1
431 %mul = fmul contract <vscale x 2 x half> %neg_m1, %m2
432 %res = fsub contract <vscale x 2 x half> %mul, %acc
433 ret <vscale x 2 x half> %res
436 define <vscale x 4 x float> @fnmad_s(<vscale x 4 x float> %m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc) {
437 ; CHECK-LABEL: fnmad_s:
439 ; CHECK-NEXT: ptrue p0.s
440 ; CHECK-NEXT: fnmad z0.s, p0/m, z1.s, z2.s
442 %neg_m1 = fneg contract <vscale x 4 x float> %m1
443 %mul = fmul contract <vscale x 4 x float> %neg_m1, %m2
444 %res = fsub contract <vscale x 4 x float> %mul, %acc
445 ret <vscale x 4 x float> %res
448 define <vscale x 2 x float> @fnmad_sx2(<vscale x 2 x float> %m1, <vscale x 2 x float> %m2, <vscale x 2 x float> %acc) {
449 ; CHECK-LABEL: fnmad_sx2:
451 ; CHECK-NEXT: ptrue p0.d
452 ; CHECK-NEXT: fnmad z0.s, p0/m, z1.s, z2.s
454 %neg_m1 = fneg contract <vscale x 2 x float> %m1
455 %mul = fmul contract <vscale x 2 x float> %neg_m1, %m2
456 %res = fsub contract <vscale x 2 x float> %mul, %acc
457 ret <vscale x 2 x float> %res
460 define <vscale x 2 x double> @fnmad_d(<vscale x 2 x double> %m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc) {
461 ; CHECK-LABEL: fnmad_d:
463 ; CHECK-NEXT: ptrue p0.d
464 ; CHECK-NEXT: fnmad z0.d, p0/m, z1.d, z2.d
466 %neg_m1 = fneg contract <vscale x 2 x double> %m1
467 %mul = fmul contract <vscale x 2 x double> %neg_m1, %m2
468 %res = fsub contract <vscale x 2 x double> %mul, %acc
469 ret <vscale x 2 x double> %res
472 define <vscale x 8 x half> @fnmla_h(<vscale x 8 x half> %acc, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2) {
473 ; CHECK-LABEL: fnmla_h:
475 ; CHECK-NEXT: ptrue p0.h
476 ; CHECK-NEXT: fnmla z0.h, p0/m, z1.h, z2.h
478 %neg_m1 = fneg contract <vscale x 8 x half> %m1
479 %mul = fmul contract <vscale x 8 x half> %neg_m1, %m2
480 %res = fsub contract <vscale x 8 x half> %mul, %acc
481 ret <vscale x 8 x half> %res
484 define <vscale x 4 x half> @fnmla_hx4(<vscale x 4 x half> %acc, <vscale x 4 x half> %m1, <vscale x 4 x half> %m2) {
485 ; CHECK-LABEL: fnmla_hx4:
487 ; CHECK-NEXT: ptrue p0.s
488 ; CHECK-NEXT: fnmla z0.h, p0/m, z1.h, z2.h
490 %neg_m1 = fneg contract <vscale x 4 x half> %m1
491 %mul = fmul contract <vscale x 4 x half> %neg_m1, %m2
492 %res = fsub contract <vscale x 4 x half> %mul, %acc
493 ret <vscale x 4 x half> %res
496 define <vscale x 2 x half> @fnmla_hx2(<vscale x 2 x half> %acc, <vscale x 2 x half> %m1, <vscale x 2 x half> %m2) {
497 ; CHECK-LABEL: fnmla_hx2:
499 ; CHECK-NEXT: ptrue p0.d
500 ; CHECK-NEXT: fnmla z0.h, p0/m, z1.h, z2.h
502 %neg_m1 = fneg contract <vscale x 2 x half> %m1
503 %mul = fmul contract <vscale x 2 x half> %neg_m1, %m2
504 %res = fsub contract <vscale x 2 x half> %mul, %acc
505 ret <vscale x 2 x half> %res
508 define <vscale x 4 x float> @fnmla_s(<vscale x 4 x float> %acc, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2) {
509 ; CHECK-LABEL: fnmla_s:
511 ; CHECK-NEXT: ptrue p0.s
512 ; CHECK-NEXT: fnmla z0.s, p0/m, z1.s, z2.s
514 %neg_m1 = fneg contract <vscale x 4 x float> %m1
515 %mul = fmul contract <vscale x 4 x float> %neg_m1, %m2
516 %res = fsub contract <vscale x 4 x float> %mul, %acc
517 ret <vscale x 4 x float> %res
520 define <vscale x 2 x float> @fnmla_sx2(<vscale x 2 x float> %acc, <vscale x 2 x float> %m1, <vscale x 2 x float> %m2) {
521 ; CHECK-LABEL: fnmla_sx2:
523 ; CHECK-NEXT: ptrue p0.d
524 ; CHECK-NEXT: fnmla z0.s, p0/m, z1.s, z2.s
526 %neg_m1 = fneg contract <vscale x 2 x float> %m1
527 %mul = fmul contract <vscale x 2 x float> %neg_m1, %m2
528 %res = fsub contract <vscale x 2 x float> %mul, %acc
529 ret <vscale x 2 x float> %res
532 define <vscale x 2 x double> @fnmla_d(<vscale x 2 x double> %acc, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2) {
533 ; CHECK-LABEL: fnmla_d:
535 ; CHECK-NEXT: ptrue p0.d
536 ; CHECK-NEXT: fnmla z0.d, p0/m, z1.d, z2.d
538 %neg_m1 = fneg contract <vscale x 2 x double> %m1
539 %mul = fmul contract <vscale x 2 x double> %neg_m1, %m2
540 %res = fsub contract <vscale x 2 x double> %mul, %acc
541 ret <vscale x 2 x double> %res
544 define <vscale x 8 x half> @fnmla_h_reversed(<vscale x 8 x half> %acc, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2) {
545 ; CHECK-LABEL: fnmla_h_reversed:
547 ; CHECK-NEXT: ptrue p0.h
548 ; CHECK-NEXT: fnmla z0.h, p0/m, z1.h, z2.h
550 %mul = fmul contract <vscale x 8 x half> %m1, %m2
551 %add = fadd contract <vscale x 8 x half> %mul, %acc
552 %res = fneg contract nsz <vscale x 8 x half> %add
553 ret <vscale x 8 x half> %res
556 define <vscale x 4 x half> @fnmla_hx4_reversed(<vscale x 4 x half> %acc, <vscale x 4 x half> %m1, <vscale x 4 x half> %m2) {
557 ; CHECK-LABEL: fnmla_hx4_reversed:
559 ; CHECK-NEXT: ptrue p0.s
560 ; CHECK-NEXT: fnmla z0.h, p0/m, z1.h, z2.h
562 %mul = fmul contract <vscale x 4 x half> %m1, %m2
563 %add = fadd contract <vscale x 4 x half> %mul, %acc
564 %res = fneg contract nsz <vscale x 4 x half> %add
565 ret <vscale x 4 x half> %res
568 define <vscale x 2 x half> @fnmla_hx2_reversed(<vscale x 2 x half> %acc, <vscale x 2 x half> %m1, <vscale x 2 x half> %m2) {
569 ; CHECK-LABEL: fnmla_hx2_reversed:
571 ; CHECK-NEXT: ptrue p0.d
572 ; CHECK-NEXT: fnmla z0.h, p0/m, z1.h, z2.h
574 %mul = fmul contract <vscale x 2 x half> %m1, %m2
575 %add = fadd contract <vscale x 2 x half> %mul, %acc
576 %res = fneg contract nsz <vscale x 2 x half> %add
577 ret <vscale x 2 x half> %res
580 define <vscale x 4 x float> @fnmla_s_reversed(<vscale x 4 x float> %acc, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2) {
581 ; CHECK-LABEL: fnmla_s_reversed:
583 ; CHECK-NEXT: ptrue p0.s
584 ; CHECK-NEXT: fnmla z0.s, p0/m, z1.s, z2.s
586 %mul = fmul contract <vscale x 4 x float> %m1, %m2
587 %add = fadd contract <vscale x 4 x float> %mul, %acc
588 %res = fneg contract nsz <vscale x 4 x float> %add
589 ret <vscale x 4 x float> %res
592 define <vscale x 2 x float> @fnmla_sx2_reversed(<vscale x 2 x float> %acc, <vscale x 2 x float> %m1, <vscale x 2 x float> %m2) {
593 ; CHECK-LABEL: fnmla_sx2_reversed:
595 ; CHECK-NEXT: ptrue p0.d
596 ; CHECK-NEXT: fnmla z0.s, p0/m, z1.s, z2.s
598 %mul = fmul contract <vscale x 2 x float> %m1, %m2
599 %add = fadd contract <vscale x 2 x float> %mul, %acc
600 %res = fneg contract nsz <vscale x 2 x float> %add
601 ret <vscale x 2 x float> %res
604 define <vscale x 2 x double> @fnmla_d_reversed(<vscale x 2 x double> %acc, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2) {
605 ; CHECK-LABEL: fnmla_d_reversed:
607 ; CHECK-NEXT: ptrue p0.d
608 ; CHECK-NEXT: fnmla z0.d, p0/m, z1.d, z2.d
610 %mul = fmul contract <vscale x 2 x double> %m1, %m2
611 %add = fadd contract <vscale x 2 x double> %mul, %acc
612 %res = fneg contract nsz <vscale x 2 x double> %add
613 ret <vscale x 2 x double> %res
616 define <vscale x 8 x half> @signed_zeros_negtest_fnmla_h_reversed(<vscale x 8 x half> %acc, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2) {
617 ; CHECK-LABEL: signed_zeros_negtest_fnmla_h_reversed:
619 ; CHECK-NEXT: ptrue p0.h
620 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
621 ; CHECK-NEXT: fneg z0.h, p0/m, z0.h
623 %mul = fmul contract <vscale x 8 x half> %m1, %m2
624 %add = fadd contract <vscale x 8 x half> %mul, %acc
625 %res = fneg contract <vscale x 8 x half> %add
626 ret <vscale x 8 x half> %res
629 define <vscale x 4 x half> @signed_zeros_negtest_fnmla_hx4_reversed(<vscale x 4 x half> %acc, <vscale x 4 x half> %m1, <vscale x 4 x half> %m2) {
630 ; CHECK-LABEL: signed_zeros_negtest_fnmla_hx4_reversed:
632 ; CHECK-NEXT: ptrue p0.s
633 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
634 ; CHECK-NEXT: fneg z0.h, p0/m, z0.h
636 %mul = fmul contract <vscale x 4 x half> %m1, %m2
637 %add = fadd contract <vscale x 4 x half> %mul, %acc
638 %res = fneg contract <vscale x 4 x half> %add
639 ret <vscale x 4 x half> %res
642 define <vscale x 2 x half> @signed_zeros_negtest_fnmla_hx2_reversed(<vscale x 2 x half> %acc, <vscale x 2 x half> %m1, <vscale x 2 x half> %m2) {
643 ; CHECK-LABEL: signed_zeros_negtest_fnmla_hx2_reversed:
645 ; CHECK-NEXT: ptrue p0.d
646 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
647 ; CHECK-NEXT: fneg z0.h, p0/m, z0.h
649 %mul = fmul contract <vscale x 2 x half> %m1, %m2
650 %add = fadd contract <vscale x 2 x half> %mul, %acc
651 %res = fneg contract <vscale x 2 x half> %add
652 ret <vscale x 2 x half> %res
655 define <vscale x 4 x float> @signed_zeros_negtest_fnmla_s_reversed(<vscale x 4 x float> %acc, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2) {
656 ; CHECK-LABEL: signed_zeros_negtest_fnmla_s_reversed:
658 ; CHECK-NEXT: ptrue p0.s
659 ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
660 ; CHECK-NEXT: fneg z0.s, p0/m, z0.s
662 %mul = fmul contract <vscale x 4 x float> %m1, %m2
663 %add = fadd contract <vscale x 4 x float> %mul, %acc
664 %res = fneg contract <vscale x 4 x float> %add
665 ret <vscale x 4 x float> %res
668 define <vscale x 2 x float> @signed_zeros_negtest_fnmla_sx2_reversed(<vscale x 2 x float> %acc, <vscale x 2 x float> %m1, <vscale x 2 x float> %m2) {
669 ; CHECK-LABEL: signed_zeros_negtest_fnmla_sx2_reversed:
671 ; CHECK-NEXT: ptrue p0.d
672 ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
673 ; CHECK-NEXT: fneg z0.s, p0/m, z0.s
675 %mul = fmul contract <vscale x 2 x float> %m1, %m2
676 %add = fadd contract <vscale x 2 x float> %mul, %acc
677 %res = fneg contract <vscale x 2 x float> %add
678 ret <vscale x 2 x float> %res
681 define <vscale x 2 x double> @signed_zeros_negtest_fnmla_d_reversed(<vscale x 2 x double> %acc, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2) {
682 ; CHECK-LABEL: signed_zeros_negtest_fnmla_d_reversed:
684 ; CHECK-NEXT: ptrue p0.d
685 ; CHECK-NEXT: fmla z0.d, p0/m, z1.d, z2.d
686 ; CHECK-NEXT: fneg z0.d, p0/m, z0.d
688 %mul = fmul contract <vscale x 2 x double> %m1, %m2
689 %add = fadd contract <vscale x 2 x double> %mul, %acc
690 %res = fneg contract <vscale x 2 x double> %add
691 ret <vscale x 2 x double> %res
694 define <vscale x 8 x half> @fnmls_h(<vscale x 8 x half> %acc, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2) {
695 ; CHECK-LABEL: fnmls_h:
697 ; CHECK-NEXT: ptrue p0.h
698 ; CHECK-NEXT: fnmls z0.h, p0/m, z1.h, z2.h
700 %mul = fmul contract <vscale x 8 x half> %m1, %m2
701 %res = fsub contract <vscale x 8 x half> %mul, %acc
702 ret <vscale x 8 x half> %res
705 define <vscale x 4 x half> @fnmls_hx4(<vscale x 4 x half> %acc, <vscale x 4 x half> %m1, <vscale x 4 x half> %m2) {
706 ; CHECK-LABEL: fnmls_hx4:
708 ; CHECK-NEXT: ptrue p0.s
709 ; CHECK-NEXT: fnmls z0.h, p0/m, z1.h, z2.h
711 %mul = fmul contract <vscale x 4 x half> %m1, %m2
712 %res = fsub contract <vscale x 4 x half> %mul, %acc
713 ret <vscale x 4 x half> %res
716 define <vscale x 2 x half> @fnmls_hx2(<vscale x 2 x half> %acc, <vscale x 2 x half> %m1, <vscale x 2 x half> %m2) {
717 ; CHECK-LABEL: fnmls_hx2:
719 ; CHECK-NEXT: ptrue p0.d
720 ; CHECK-NEXT: fnmls z0.h, p0/m, z1.h, z2.h
722 %mul = fmul contract <vscale x 2 x half> %m1, %m2
723 %res = fsub contract <vscale x 2 x half> %mul, %acc
724 ret <vscale x 2 x half> %res
727 define <vscale x 4 x float> @fnmls_s(<vscale x 4 x float> %acc, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2) {
728 ; CHECK-LABEL: fnmls_s:
730 ; CHECK-NEXT: ptrue p0.s
731 ; CHECK-NEXT: fnmls z0.s, p0/m, z1.s, z2.s
733 %mul = fmul contract <vscale x 4 x float> %m1, %m2
734 %res = fsub contract <vscale x 4 x float> %mul, %acc
735 ret <vscale x 4 x float> %res
738 define <vscale x 2 x float> @fnmls_sx2(<vscale x 2 x float> %acc, <vscale x 2 x float> %m1, <vscale x 2 x float> %m2) {
739 ; CHECK-LABEL: fnmls_sx2:
741 ; CHECK-NEXT: ptrue p0.d
742 ; CHECK-NEXT: fnmls z0.s, p0/m, z1.s, z2.s
744 %mul = fmul contract <vscale x 2 x float> %m1, %m2
745 %res = fsub contract <vscale x 2 x float> %mul, %acc
746 ret <vscale x 2 x float> %res
749 define <vscale x 2 x double> @fnmls_d(<vscale x 2 x double> %acc, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2) {
750 ; CHECK-LABEL: fnmls_d:
752 ; CHECK-NEXT: ptrue p0.d
753 ; CHECK-NEXT: fnmls z0.d, p0/m, z1.d, z2.d
755 %mul = fmul contract <vscale x 2 x double> %m1, %m2
756 %res = fsub contract <vscale x 2 x double> %mul, %acc
757 ret <vscale x 2 x double> %res
760 define <vscale x 8 x half> @fnmsb_h(<vscale x 8 x half> %m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc) {
761 ; CHECK-LABEL: fnmsb_h:
763 ; CHECK-NEXT: ptrue p0.h
764 ; CHECK-NEXT: fnmsb z0.h, p0/m, z1.h, z2.h
766 %mul = fmul contract <vscale x 8 x half> %m1, %m2
767 %res = fsub contract <vscale x 8 x half> %mul, %acc
768 ret <vscale x 8 x half> %res
771 define <vscale x 4 x half> @fnmsb_hx4(<vscale x 4 x half> %m1, <vscale x 4 x half> %m2, <vscale x 4 x half> %acc) {
772 ; CHECK-LABEL: fnmsb_hx4:
774 ; CHECK-NEXT: ptrue p0.s
775 ; CHECK-NEXT: fnmsb z0.h, p0/m, z1.h, z2.h
777 %mul = fmul contract <vscale x 4 x half> %m1, %m2
778 %res = fsub contract <vscale x 4 x half> %mul, %acc
779 ret <vscale x 4 x half> %res
782 define <vscale x 2 x half> @fnmsb_hx2(<vscale x 2 x half> %m1, <vscale x 2 x half> %m2, <vscale x 2 x half> %acc) {
783 ; CHECK-LABEL: fnmsb_hx2:
785 ; CHECK-NEXT: ptrue p0.d
786 ; CHECK-NEXT: fnmsb z0.h, p0/m, z1.h, z2.h
788 %mul = fmul contract <vscale x 2 x half> %m1, %m2
789 %res = fsub contract <vscale x 2 x half> %mul, %acc
790 ret <vscale x 2 x half> %res
793 define <vscale x 4 x float> @fnmsb_s(<vscale x 4 x float> %m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc) {
794 ; CHECK-LABEL: fnmsb_s:
796 ; CHECK-NEXT: ptrue p0.s
797 ; CHECK-NEXT: fnmsb z0.s, p0/m, z1.s, z2.s
799 %mul = fmul contract <vscale x 4 x float> %m1, %m2
800 %res = fsub contract <vscale x 4 x float> %mul, %acc
801 ret <vscale x 4 x float> %res
804 define <vscale x 2 x float> @fnmsb_sx2(<vscale x 2 x float> %m1, <vscale x 2 x float> %m2, <vscale x 2 x float> %acc) {
805 ; CHECK-LABEL: fnmsb_sx2:
807 ; CHECK-NEXT: ptrue p0.d
808 ; CHECK-NEXT: fnmsb z0.s, p0/m, z1.s, z2.s
810 %mul = fmul contract <vscale x 2 x float> %m1, %m2
811 %res = fsub contract <vscale x 2 x float> %mul, %acc
812 ret <vscale x 2 x float> %res
815 define <vscale x 2 x double> @fnmsb_d(<vscale x 2 x double> %m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc) {
816 ; CHECK-LABEL: fnmsb_d:
818 ; CHECK-NEXT: ptrue p0.d
819 ; CHECK-NEXT: fnmsb z0.d, p0/m, z1.d, z2.d
821 %mul = fmul contract <vscale x 2 x double> %m1, %m2
822 %res = fsub contract <vscale x 2 x double> %mul, %acc
823 ret <vscale x 2 x double> %res
827 define <vscale x 8 x half> @fadd_h_sel(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x i1> %mask) {
828 ; CHECK-LABEL: fadd_h_sel:
830 ; CHECK-NEXT: fadd z0.h, p0/m, z0.h, z1.h
832 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %b, <vscale x 8 x half> zeroinitializer
833 %fadd = fadd nsz <vscale x 8 x half> %a, %sel
834 ret <vscale x 8 x half> %fadd
837 define <vscale x 4 x float> @fadd_s_sel(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x i1> %mask) {
838 ; CHECK-LABEL: fadd_s_sel:
840 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, z1.s
842 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %b, <vscale x 4 x float> zeroinitializer
843 %fadd = fadd nsz <vscale x 4 x float> %a, %sel
844 ret <vscale x 4 x float> %fadd
847 define <vscale x 2 x double> @fadd_d_sel(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x i1> %mask) {
848 ; CHECK-LABEL: fadd_d_sel:
850 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, z1.d
852 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %b, <vscale x 2 x double> zeroinitializer
853 %fadd = fadd nsz <vscale x 2 x double> %a, %sel
854 ret <vscale x 2 x double> %fadd
857 define <vscale x 8 x half> @fsub_h_sel(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x i1> %mask) {
858 ; CHECK-LABEL: fsub_h_sel:
860 ; CHECK-NEXT: fsub z0.h, p0/m, z0.h, z1.h
862 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %b, <vscale x 8 x half> zeroinitializer
863 %fsub = fsub <vscale x 8 x half> %a, %sel
864 ret <vscale x 8 x half> %fsub
867 define <vscale x 4 x float> @fsub_s_sel(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x i1> %mask) {
868 ; CHECK-LABEL: fsub_s_sel:
870 ; CHECK-NEXT: fsub z0.s, p0/m, z0.s, z1.s
872 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %b, <vscale x 4 x float> zeroinitializer
873 %fsub = fsub <vscale x 4 x float> %a, %sel
874 ret <vscale x 4 x float> %fsub
877 define <vscale x 2 x double> @fsub_d_sel(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x i1> %mask) {
878 ; CHECK-LABEL: fsub_d_sel:
880 ; CHECK-NEXT: fsub z0.d, p0/m, z0.d, z1.d
882 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %b, <vscale x 2 x double> zeroinitializer
883 %fsub = fsub <vscale x 2 x double> %a, %sel
884 ret <vscale x 2 x double> %fsub
889 define <vscale x 8 x half> @fadd_h_sel_negzero(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x i1> %mask) {
890 ; CHECK-LABEL: fadd_h_sel_negzero:
892 ; CHECK-NEXT: fadd z0.h, p0/m, z0.h, z1.h
894 %nz = fneg <vscale x 8 x half> zeroinitializer
895 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %b, <vscale x 8 x half> %nz
896 %fadd = fadd <vscale x 8 x half> %a, %sel
897 ret <vscale x 8 x half> %fadd
900 define <vscale x 4 x float> @fadd_s_sel_negzero(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x i1> %mask) {
901 ; CHECK-LABEL: fadd_s_sel_negzero:
903 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, z1.s
905 %nz = fneg <vscale x 4 x float> zeroinitializer
906 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %b, <vscale x 4 x float> %nz
907 %fadd = fadd <vscale x 4 x float> %a, %sel
908 ret <vscale x 4 x float> %fadd
911 define <vscale x 2 x double> @fadd_d_sel_negzero(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x i1> %mask) {
912 ; CHECK-LABEL: fadd_d_sel_negzero:
914 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, z1.d
916 %nz = fneg <vscale x 2 x double> zeroinitializer
917 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %b, <vscale x 2 x double> %nz
918 %fadd = fadd <vscale x 2 x double> %a, %sel
919 ret <vscale x 2 x double> %fadd
922 define <vscale x 8 x half> @fsub_h_sel_negzero(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x i1> %mask) {
923 ; CHECK-LABEL: fsub_h_sel_negzero:
925 ; CHECK-NEXT: fsub z0.h, p0/m, z0.h, z1.h
927 %nz = fneg <vscale x 8 x half> zeroinitializer
928 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %b, <vscale x 8 x half> %nz
929 %fsub = fsub nsz <vscale x 8 x half> %a, %sel
930 ret <vscale x 8 x half> %fsub
933 define <vscale x 4 x float> @fsub_s_sel_negzero(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x i1> %mask) {
934 ; CHECK-LABEL: fsub_s_sel_negzero:
936 ; CHECK-NEXT: fsub z0.s, p0/m, z0.s, z1.s
938 %nz = fneg <vscale x 4 x float> zeroinitializer
939 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %b, <vscale x 4 x float> %nz
940 %fsub = fsub nsz <vscale x 4 x float> %a, %sel
941 ret <vscale x 4 x float> %fsub
944 define <vscale x 2 x double> @fsub_d_sel_negzero(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x i1> %mask) {
945 ; CHECK-LABEL: fsub_d_sel_negzero:
947 ; CHECK-NEXT: fsub z0.d, p0/m, z0.d, z1.d
949 %nz = fneg <vscale x 2 x double> zeroinitializer
950 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %b, <vscale x 2 x double> %nz
951 %fsub = fsub nsz <vscale x 2 x double> %a, %sel
952 ret <vscale x 2 x double> %fsub
956 define <vscale x 8 x half> @fadd_sel_fmul_h(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %mask) {
957 ; CHECK-LABEL: fadd_sel_fmul_h:
959 ; CHECK-NEXT: fmul z1.h, z1.h, z2.h
960 ; CHECK-NEXT: mov z2.h, #0 // =0x0
961 ; CHECK-NEXT: sel z1.h, p0, z1.h, z2.h
962 ; CHECK-NEXT: fadd z0.h, z0.h, z1.h
964 %fmul = fmul <vscale x 8 x half> %b, %c
965 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %fmul, <vscale x 8 x half> zeroinitializer
966 %fadd = fadd contract <vscale x 8 x half> %a, %sel
967 ret <vscale x 8 x half> %fadd
970 define <vscale x 4 x float> @fadd_sel_fmul_s(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %mask) {
971 ; CHECK-LABEL: fadd_sel_fmul_s:
973 ; CHECK-NEXT: fmul z1.s, z1.s, z2.s
974 ; CHECK-NEXT: mov z2.s, #0 // =0x0
975 ; CHECK-NEXT: sel z1.s, p0, z1.s, z2.s
976 ; CHECK-NEXT: fadd z0.s, z0.s, z1.s
978 %fmul = fmul <vscale x 4 x float> %b, %c
979 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %fmul, <vscale x 4 x float> zeroinitializer
980 %fadd = fadd contract <vscale x 4 x float> %a, %sel
981 ret <vscale x 4 x float> %fadd
984 define <vscale x 2 x double> @fadd_sel_fmul_d(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %mask) {
985 ; CHECK-LABEL: fadd_sel_fmul_d:
987 ; CHECK-NEXT: fmul z1.d, z1.d, z2.d
988 ; CHECK-NEXT: mov z2.d, #0 // =0x0
989 ; CHECK-NEXT: sel z1.d, p0, z1.d, z2.d
990 ; CHECK-NEXT: fadd z0.d, z0.d, z1.d
992 %fmul = fmul <vscale x 2 x double> %b, %c
993 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %fmul, <vscale x 2 x double> zeroinitializer
994 %fadd = fadd contract <vscale x 2 x double> %a, %sel
995 ret <vscale x 2 x double> %fadd
998 define <vscale x 8 x half> @fsub_sel_fmul_h(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %mask) {
999 ; CHECK-LABEL: fsub_sel_fmul_h:
1001 ; CHECK-NEXT: fmls z0.h, p0/m, z1.h, z2.h
1003 %fmul = fmul <vscale x 8 x half> %b, %c
1004 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %fmul, <vscale x 8 x half> zeroinitializer
1005 %fsub = fsub contract <vscale x 8 x half> %a, %sel
1006 ret <vscale x 8 x half> %fsub
1009 define <vscale x 4 x float> @fsub_sel_fmul_s(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %mask) {
1010 ; CHECK-LABEL: fsub_sel_fmul_s:
1012 ; CHECK-NEXT: fmls z0.s, p0/m, z1.s, z2.s
1014 %fmul = fmul <vscale x 4 x float> %b, %c
1015 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %fmul, <vscale x 4 x float> zeroinitializer
1016 %fsub = fsub contract <vscale x 4 x float> %a, %sel
1017 ret <vscale x 4 x float> %fsub
1020 define <vscale x 2 x double> @fsub_sel_fmul_d(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %mask) {
1021 ; CHECK-LABEL: fsub_sel_fmul_d:
1023 ; CHECK-NEXT: fmls z0.d, p0/m, z1.d, z2.d
1025 %fmul = fmul <vscale x 2 x double> %b, %c
1026 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %fmul, <vscale x 2 x double> zeroinitializer
1027 %fsub = fsub contract <vscale x 2 x double> %a, %sel
1028 ret <vscale x 2 x double> %fsub
1031 define <vscale x 8 x half> @fadd_sel_fmul_h_nsz(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %mask) {
1032 ; CHECK-LABEL: fadd_sel_fmul_h_nsz:
1034 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
1036 %fmul = fmul <vscale x 8 x half> %b, %c
1037 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %fmul, <vscale x 8 x half> zeroinitializer
1038 %fadd = fadd nsz contract <vscale x 8 x half> %a, %sel
1039 ret <vscale x 8 x half> %fadd
1042 define <vscale x 4 x float> @fadd_sel_fmul_s_nsz(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %mask) {
1043 ; CHECK-LABEL: fadd_sel_fmul_s_nsz:
1045 ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
1047 %fmul = fmul <vscale x 4 x float> %b, %c
1048 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %fmul, <vscale x 4 x float> zeroinitializer
1049 %fadd = fadd nsz contract <vscale x 4 x float> %a, %sel
1050 ret <vscale x 4 x float> %fadd
1053 define <vscale x 2 x double> @fadd_sel_fmul_d_nsz(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %mask) {
1054 ; CHECK-LABEL: fadd_sel_fmul_d_nsz:
1056 ; CHECK-NEXT: fmla z0.d, p0/m, z1.d, z2.d
1058 %fmul = fmul <vscale x 2 x double> %b, %c
1059 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %fmul, <vscale x 2 x double> zeroinitializer
1060 %fadd = fadd nsz contract <vscale x 2 x double> %a, %sel
1061 ret <vscale x 2 x double> %fadd
1064 define <vscale x 8 x half> @fsub_sel_fmul_h_nsz(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %mask) {
1065 ; CHECK-LABEL: fsub_sel_fmul_h_nsz:
1067 ; CHECK-NEXT: fmls z0.h, p0/m, z1.h, z2.h
1069 %fmul = fmul <vscale x 8 x half> %b, %c
1070 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %fmul, <vscale x 8 x half> zeroinitializer
1071 %fsub = fsub nsz contract <vscale x 8 x half> %a, %sel
1072 ret <vscale x 8 x half> %fsub
1075 define <vscale x 4 x float> @fsub_sel_fmul_s_nsz(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %mask) {
1076 ; CHECK-LABEL: fsub_sel_fmul_s_nsz:
1078 ; CHECK-NEXT: fmls z0.s, p0/m, z1.s, z2.s
1080 %fmul = fmul <vscale x 4 x float> %b, %c
1081 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %fmul, <vscale x 4 x float> zeroinitializer
1082 %fsub = fsub nsz contract <vscale x 4 x float> %a, %sel
1083 ret <vscale x 4 x float> %fsub
1086 define <vscale x 2 x double> @fsub_sel_fmul_d_nsz(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %mask) {
1087 ; CHECK-LABEL: fsub_sel_fmul_d_nsz:
1089 ; CHECK-NEXT: fmls z0.d, p0/m, z1.d, z2.d
1091 %fmul = fmul <vscale x 2 x double> %b, %c
1092 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %fmul, <vscale x 2 x double> zeroinitializer
1093 %fsub = fsub nsz contract <vscale x 2 x double> %a, %sel
1094 ret <vscale x 2 x double> %fsub
1098 define <vscale x 8 x half> @fadd_sel_fmul_h_negzero(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %mask) {
1099 ; CHECK-LABEL: fadd_sel_fmul_h_negzero:
1101 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
1103 %fmul = fmul <vscale x 8 x half> %b, %c
1104 %nz = fneg <vscale x 8 x half> zeroinitializer
1105 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %fmul, <vscale x 8 x half> %nz
1106 %fadd = fadd contract <vscale x 8 x half> %a, %sel
1107 ret <vscale x 8 x half> %fadd
1110 define <vscale x 4 x float> @fadd_sel_fmul_s_negzero(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %mask) {
1111 ; CHECK-LABEL: fadd_sel_fmul_s_negzero:
1113 ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
1115 %fmul = fmul <vscale x 4 x float> %b, %c
1116 %nz = fneg <vscale x 4 x float> zeroinitializer
1117 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %fmul, <vscale x 4 x float> %nz
1118 %fadd = fadd contract <vscale x 4 x float> %a, %sel
1119 ret <vscale x 4 x float> %fadd
1122 define <vscale x 2 x double> @fadd_sel_fmul_d_negzero(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %mask) {
1123 ; CHECK-LABEL: fadd_sel_fmul_d_negzero:
1125 ; CHECK-NEXT: fmla z0.d, p0/m, z1.d, z2.d
1127 %fmul = fmul <vscale x 2 x double> %b, %c
1128 %nz = fneg <vscale x 2 x double> zeroinitializer
1129 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %fmul, <vscale x 2 x double> %nz
1130 %fadd = fadd contract <vscale x 2 x double> %a, %sel
1131 ret <vscale x 2 x double> %fadd
1134 define <vscale x 8 x half> @fsub_sel_fmul_h_negzero(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %mask) {
1135 ; CHECK-LABEL: fsub_sel_fmul_h_negzero:
1137 ; CHECK-NEXT: mov w8, #32768 // =0x8000
1138 ; CHECK-NEXT: fmul z1.h, z1.h, z2.h
1139 ; CHECK-NEXT: mov z2.h, w8
1140 ; CHECK-NEXT: sel z1.h, p0, z1.h, z2.h
1141 ; CHECK-NEXT: fsub z0.h, z0.h, z1.h
1143 %fmul = fmul <vscale x 8 x half> %b, %c
1144 %nz = fneg <vscale x 8 x half> zeroinitializer
1145 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %fmul, <vscale x 8 x half> %nz
1146 %fsub = fsub contract <vscale x 8 x half> %a, %sel
1147 ret <vscale x 8 x half> %fsub
1150 define <vscale x 4 x float> @fsub_sel_fmul_s_negzero(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %mask) {
1151 ; CHECK-LABEL: fsub_sel_fmul_s_negzero:
1153 ; CHECK-NEXT: mov w8, #-2147483648 // =0x80000000
1154 ; CHECK-NEXT: fmul z1.s, z1.s, z2.s
1155 ; CHECK-NEXT: mov z2.s, w8
1156 ; CHECK-NEXT: sel z1.s, p0, z1.s, z2.s
1157 ; CHECK-NEXT: fsub z0.s, z0.s, z1.s
1159 %fmul = fmul <vscale x 4 x float> %b, %c
1160 %nz = fneg <vscale x 4 x float> zeroinitializer
1161 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %fmul, <vscale x 4 x float> %nz
1162 %fsub = fsub contract <vscale x 4 x float> %a, %sel
1163 ret <vscale x 4 x float> %fsub
1166 define <vscale x 2 x double> @fsub_sel_fmul_d_negzero(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %mask) {
1167 ; CHECK-LABEL: fsub_sel_fmul_d_negzero:
1169 ; CHECK-NEXT: mov x8, #-9223372036854775808 // =0x8000000000000000
1170 ; CHECK-NEXT: fmul z1.d, z1.d, z2.d
1171 ; CHECK-NEXT: mov z2.d, x8
1172 ; CHECK-NEXT: sel z1.d, p0, z1.d, z2.d
1173 ; CHECK-NEXT: fsub z0.d, z0.d, z1.d
1175 %fmul = fmul <vscale x 2 x double> %b, %c
1176 %nz = fneg <vscale x 2 x double> zeroinitializer
1177 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %fmul, <vscale x 2 x double> %nz
1178 %fsub = fsub contract <vscale x 2 x double> %a, %sel
1179 ret <vscale x 2 x double> %fsub
1184 define <vscale x 8 x half> @fadd_sel_fmul_h_negzero_nsz(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %mask) {
1185 ; CHECK-LABEL: fadd_sel_fmul_h_negzero_nsz:
1187 ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
1189 %fmul = fmul <vscale x 8 x half> %b, %c
1190 %nz = fneg <vscale x 8 x half> zeroinitializer
1191 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %fmul, <vscale x 8 x half> %nz
1192 %fadd = fadd nsz contract <vscale x 8 x half> %a, %sel
1193 ret <vscale x 8 x half> %fadd
1196 define <vscale x 4 x float> @fadd_sel_fmul_s_negzero_nsz(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %mask) {
1197 ; CHECK-LABEL: fadd_sel_fmul_s_negzero_nsz:
1199 ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
1201 %fmul = fmul <vscale x 4 x float> %b, %c
1202 %nz = fneg <vscale x 4 x float> zeroinitializer
1203 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %fmul, <vscale x 4 x float> %nz
1204 %fadd = fadd nsz contract <vscale x 4 x float> %a, %sel
1205 ret <vscale x 4 x float> %fadd
1208 define <vscale x 2 x double> @fadd_sel_fmul_d_negzero_nsz(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %mask) {
1209 ; CHECK-LABEL: fadd_sel_fmul_d_negzero_nsz:
1211 ; CHECK-NEXT: fmla z0.d, p0/m, z1.d, z2.d
1213 %fmul = fmul <vscale x 2 x double> %b, %c
1214 %nz = fneg <vscale x 2 x double> zeroinitializer
1215 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %fmul, <vscale x 2 x double> %nz
1216 %fadd = fadd nsz contract <vscale x 2 x double> %a, %sel
1217 ret <vscale x 2 x double> %fadd
1220 define <vscale x 8 x half> @fsub_sel_fmul_h_negzero_nsz(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %mask) {
1221 ; CHECK-LABEL: fsub_sel_fmul_h_negzero_nsz:
1223 ; CHECK-NEXT: fmls z0.h, p0/m, z1.h, z2.h
1225 %fmul = fmul <vscale x 8 x half> %b, %c
1226 %nz = fneg <vscale x 8 x half> zeroinitializer
1227 %sel = select <vscale x 8 x i1> %mask, <vscale x 8 x half> %fmul, <vscale x 8 x half> %nz
1228 %fsub = fsub nsz contract <vscale x 8 x half> %a, %sel
1229 ret <vscale x 8 x half> %fsub
1232 define <vscale x 4 x float> @fsub_sel_fmul_s_negzero_nsz(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %mask) {
1233 ; CHECK-LABEL: fsub_sel_fmul_s_negzero_nsz:
1235 ; CHECK-NEXT: fmls z0.s, p0/m, z1.s, z2.s
1237 %fmul = fmul <vscale x 4 x float> %b, %c
1238 %nz = fneg <vscale x 4 x float> zeroinitializer
1239 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %fmul, <vscale x 4 x float> %nz
1240 %fsub = fsub nsz contract <vscale x 4 x float> %a, %sel
1241 ret <vscale x 4 x float> %fsub
1244 define <vscale x 2 x double> @fsub_sel_fmul_d_negzero_nsz(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %mask) {
1245 ; CHECK-LABEL: fsub_sel_fmul_d_negzero_nsz:
1247 ; CHECK-NEXT: fmls z0.d, p0/m, z1.d, z2.d
1249 %fmul = fmul <vscale x 2 x double> %b, %c
1250 %nz = fneg <vscale x 2 x double> zeroinitializer
1251 %sel = select <vscale x 2 x i1> %mask, <vscale x 2 x double> %fmul, <vscale x 2 x double> %nz
1252 %fsub = fsub nsz contract <vscale x 2 x double> %a, %sel
1253 ret <vscale x 2 x double> %fsub
1258 ; Verify combine requires contract fast-math flag.
1259 define <vscale x 4 x float> @fadd_sel_fmul_no_contract_s(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %mask) {
1260 ; CHECK-LABEL: fadd_sel_fmul_no_contract_s:
1262 ; CHECK-NEXT: fmul z1.s, z1.s, z2.s
1263 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, z1.s
1265 %fmul = fmul <vscale x 4 x float> %b, %c
1266 %sel = select <vscale x 4 x i1> %mask, <vscale x 4 x float> %fmul, <vscale x 4 x float> zeroinitializer
1267 %fadd = fadd nsz <vscale x 4 x float> %a, %sel
1268 ret <vscale x 4 x float> %fadd
1271 define <vscale x 8 x half> @fma_sel_h_different_arg_order(<vscale x 8 x i1> %pred, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc) {
1272 ; CHECK-LABEL: fma_sel_h_different_arg_order:
1274 ; CHECK-NEXT: fmla z2.h, p0/m, z0.h, z1.h
1275 ; CHECK-NEXT: mov z0.d, z2.d
1277 %mul.add = call <vscale x 8 x half> @llvm.fma.nxv8f16(<vscale x 8 x half> %m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc)
1278 %masked.mul.add = select <vscale x 8 x i1> %pred, <vscale x 8 x half> %mul.add, <vscale x 8 x half> %acc
1279 ret <vscale x 8 x half> %masked.mul.add
1282 define <vscale x 4 x float> @fma_sel_s_different_arg_order(<vscale x 4 x i1> %pred, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc) {
1283 ; CHECK-LABEL: fma_sel_s_different_arg_order:
1285 ; CHECK-NEXT: fmla z2.s, p0/m, z0.s, z1.s
1286 ; CHECK-NEXT: mov z0.d, z2.d
1288 %mul.add = call <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float> %m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc)
1289 %masked.mul.add = select <vscale x 4 x i1> %pred, <vscale x 4 x float> %mul.add, <vscale x 4 x float> %acc
1290 ret <vscale x 4 x float> %masked.mul.add
1293 define <vscale x 2 x double> @fma_sel_d_different_arg_order(<vscale x 2 x i1> %pred, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc) {
1294 ; CHECK-LABEL: fma_sel_d_different_arg_order:
1296 ; CHECK-NEXT: fmla z2.d, p0/m, z0.d, z1.d
1297 ; CHECK-NEXT: mov z0.d, z2.d
1299 %mul.add = call <vscale x 2 x double> @llvm.fma.nxv2f64(<vscale x 2 x double> %m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc)
1300 %masked.mul.add = select <vscale x 2 x i1> %pred, <vscale x 2 x double> %mul.add, <vscale x 2 x double> %acc
1301 ret <vscale x 2 x double> %masked.mul.add
1304 define <vscale x 8 x half> @fnma_sel_h_different_arg_order(<vscale x 8 x i1> %pred, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc) {
1305 ; CHECK-LABEL: fnma_sel_h_different_arg_order:
1307 ; CHECK-NEXT: fmls z2.h, p0/m, z0.h, z1.h
1308 ; CHECK-NEXT: mov z0.d, z2.d
1310 %neg_m1 = fneg contract <vscale x 8 x half> %m1
1311 %mul.add = call <vscale x 8 x half> @llvm.fma.nxv8f16(<vscale x 8 x half> %neg_m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc)
1312 %masked.mul.add = select <vscale x 8 x i1> %pred, <vscale x 8 x half> %mul.add, <vscale x 8 x half> %acc
1313 ret <vscale x 8 x half> %masked.mul.add
1316 define <vscale x 4 x float> @fnma_sel_s_different_arg_order(<vscale x 4 x i1> %pred, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc) {
1317 ; CHECK-LABEL: fnma_sel_s_different_arg_order:
1319 ; CHECK-NEXT: fmls z2.s, p0/m, z0.s, z1.s
1320 ; CHECK-NEXT: mov z0.d, z2.d
1322 %neg_m1 = fneg contract <vscale x 4 x float> %m1
1323 %mul.add = call <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float> %neg_m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc)
1324 %masked.mul.add = select <vscale x 4 x i1> %pred, <vscale x 4 x float> %mul.add, <vscale x 4 x float> %acc
1325 ret <vscale x 4 x float> %masked.mul.add
1328 define <vscale x 2 x double> @fnma_sel_d_different_arg_order(<vscale x 2 x i1> %pred, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc) {
1329 ; CHECK-LABEL: fnma_sel_d_different_arg_order:
1331 ; CHECK-NEXT: fmls z2.d, p0/m, z0.d, z1.d
1332 ; CHECK-NEXT: mov z0.d, z2.d
1334 %neg_m1 = fneg contract <vscale x 2 x double> %m1
1335 %mul.add = call <vscale x 2 x double> @llvm.fma.nxv2f64(<vscale x 2 x double> %neg_m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc)
1336 %masked.mul.add = select <vscale x 2 x i1> %pred, <vscale x 2 x double> %mul.add, <vscale x 2 x double> %acc
1337 ret <vscale x 2 x double> %masked.mul.add
1340 declare <vscale x 8 x half> @llvm.fma.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>)
1341 declare <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>)
1342 declare <vscale x 2 x double> @llvm.fma.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>)