1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible-sve < %s | FileCheck %s
3 ; RUN: llc -mattr=+sme -force-streaming-compatible-sve < %s | FileCheck %s
5 target triple = "aarch64-unknown-linux-gnu"
11 define <4 x half> @fmaxnm_v4f16(<4 x half> %op1, <4 x half> %op2) {
12 ; CHECK-LABEL: fmaxnm_v4f16:
14 ; CHECK-NEXT: ptrue p0.h, vl4
15 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
16 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
17 ; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, z1.h
18 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
20 %res = call <4 x half> @llvm.maxnum.v4f16(<4 x half> %op1, <4 x half> %op2)
24 define <8 x half> @fmaxnm_v8f16(<8 x half> %op1, <8 x half> %op2) {
25 ; CHECK-LABEL: fmaxnm_v8f16:
27 ; CHECK-NEXT: ptrue p0.h, vl8
28 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
29 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
30 ; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, z1.h
31 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
33 %res = call <8 x half> @llvm.maxnum.v8f16(<8 x half> %op1, <8 x half> %op2)
37 define void @fmaxnm_v16f16(ptr %a, ptr %b) {
38 ; CHECK-LABEL: fmaxnm_v16f16:
40 ; CHECK-NEXT: ptrue p0.h, vl8
41 ; CHECK-NEXT: ldp q0, q3, [x1]
42 ; CHECK-NEXT: ldp q1, q2, [x0]
43 ; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, z1.h
44 ; CHECK-NEXT: movprfx z1, z2
45 ; CHECK-NEXT: fmaxnm z1.h, p0/m, z1.h, z3.h
46 ; CHECK-NEXT: stp q0, q1, [x0]
48 %op1 = load <16 x half>, ptr %a
49 %op2 = load <16 x half>, ptr %b
50 %res = call <16 x half> @llvm.maxnum.v16f16(<16 x half> %op1, <16 x half> %op2)
51 store <16 x half> %res, ptr %a
55 define <2 x float> @fmaxnm_v2f32(<2 x float> %op1, <2 x float> %op2) {
56 ; CHECK-LABEL: fmaxnm_v2f32:
58 ; CHECK-NEXT: ptrue p0.s, vl2
59 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
60 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
61 ; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, z1.s
62 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
64 %res = call <2 x float> @llvm.maxnum.v2f32(<2 x float> %op1, <2 x float> %op2)
68 define <4 x float> @fmaxnm_v4f32(<4 x float> %op1, <4 x float> %op2) {
69 ; CHECK-LABEL: fmaxnm_v4f32:
71 ; CHECK-NEXT: ptrue p0.s, vl4
72 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
73 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
74 ; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, z1.s
75 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
77 %res = call <4 x float> @llvm.maxnum.v4f32(<4 x float> %op1, <4 x float> %op2)
81 define void @fmaxnm_v8f32(ptr %a, ptr %b) {
82 ; CHECK-LABEL: fmaxnm_v8f32:
84 ; CHECK-NEXT: ptrue p0.s, vl4
85 ; CHECK-NEXT: ldp q0, q3, [x1]
86 ; CHECK-NEXT: ldp q1, q2, [x0]
87 ; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, z1.s
88 ; CHECK-NEXT: movprfx z1, z2
89 ; CHECK-NEXT: fmaxnm z1.s, p0/m, z1.s, z3.s
90 ; CHECK-NEXT: stp q0, q1, [x0]
92 %op1 = load <8 x float>, ptr %a
93 %op2 = load <8 x float>, ptr %b
94 %res = call <8 x float> @llvm.maxnum.v8f32(<8 x float> %op1, <8 x float> %op2)
95 store <8 x float> %res, ptr %a
99 define <1 x double> @fmaxnm_v1f64(<1 x double> %op1, <1 x double> %op2) {
100 ; CHECK-LABEL: fmaxnm_v1f64:
102 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
103 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
104 ; CHECK-NEXT: fmaxnm d0, d0, d1
106 %res = call <1 x double> @llvm.maxnum.v1f64(<1 x double> %op1, <1 x double> %op2)
107 ret <1 x double> %res
110 define <2 x double> @fmaxnm_v2f64(<2 x double> %op1, <2 x double> %op2) {
111 ; CHECK-LABEL: fmaxnm_v2f64:
113 ; CHECK-NEXT: ptrue p0.d, vl2
114 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
115 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
116 ; CHECK-NEXT: fmaxnm z0.d, p0/m, z0.d, z1.d
117 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
119 %res = call <2 x double> @llvm.maxnum.v2f64(<2 x double> %op1, <2 x double> %op2)
120 ret <2 x double> %res
123 define void @fmaxnm_v4f64(ptr %a, ptr %b) {
124 ; CHECK-LABEL: fmaxnm_v4f64:
126 ; CHECK-NEXT: ptrue p0.d, vl2
127 ; CHECK-NEXT: ldp q0, q3, [x1]
128 ; CHECK-NEXT: ldp q1, q2, [x0]
129 ; CHECK-NEXT: fmaxnm z0.d, p0/m, z0.d, z1.d
130 ; CHECK-NEXT: movprfx z1, z2
131 ; CHECK-NEXT: fmaxnm z1.d, p0/m, z1.d, z3.d
132 ; CHECK-NEXT: stp q0, q1, [x0]
134 %op1 = load <4 x double>, ptr %a
135 %op2 = load <4 x double>, ptr %b
136 %res = call <4 x double> @llvm.maxnum.v4f64(<4 x double> %op1, <4 x double> %op2)
137 store <4 x double> %res, ptr %a
145 define <4 x half> @fminnm_v4f16(<4 x half> %op1, <4 x half> %op2) {
146 ; CHECK-LABEL: fminnm_v4f16:
148 ; CHECK-NEXT: ptrue p0.h, vl4
149 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
150 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
151 ; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, z1.h
152 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
154 %res = call <4 x half> @llvm.minnum.v4f16(<4 x half> %op1, <4 x half> %op2)
158 define <8 x half> @fminnm_v8f16(<8 x half> %op1, <8 x half> %op2) {
159 ; CHECK-LABEL: fminnm_v8f16:
161 ; CHECK-NEXT: ptrue p0.h, vl8
162 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
163 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
164 ; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, z1.h
165 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
167 %res = call <8 x half> @llvm.minnum.v8f16(<8 x half> %op1, <8 x half> %op2)
171 define void @fminnm_v16f16(ptr %a, ptr %b) {
172 ; CHECK-LABEL: fminnm_v16f16:
174 ; CHECK-NEXT: ptrue p0.h, vl8
175 ; CHECK-NEXT: ldp q0, q3, [x1]
176 ; CHECK-NEXT: ldp q1, q2, [x0]
177 ; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, z1.h
178 ; CHECK-NEXT: movprfx z1, z2
179 ; CHECK-NEXT: fminnm z1.h, p0/m, z1.h, z3.h
180 ; CHECK-NEXT: stp q0, q1, [x0]
182 %op1 = load <16 x half>, ptr %a
183 %op2 = load <16 x half>, ptr %b
184 %res = call <16 x half> @llvm.minnum.v16f16(<16 x half> %op1, <16 x half> %op2)
185 store <16 x half> %res, ptr %a
189 define <2 x float> @fminnm_v2f32(<2 x float> %op1, <2 x float> %op2) {
190 ; CHECK-LABEL: fminnm_v2f32:
192 ; CHECK-NEXT: ptrue p0.s, vl2
193 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
194 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
195 ; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, z1.s
196 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
198 %res = call <2 x float> @llvm.minnum.v2f32(<2 x float> %op1, <2 x float> %op2)
202 define <4 x float> @fminnm_v4f32(<4 x float> %op1, <4 x float> %op2) {
203 ; CHECK-LABEL: fminnm_v4f32:
205 ; CHECK-NEXT: ptrue p0.s, vl4
206 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
207 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
208 ; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, z1.s
209 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
211 %res = call <4 x float> @llvm.minnum.v4f32(<4 x float> %op1, <4 x float> %op2)
215 define void @fminnm_v8f32(ptr %a, ptr %b) {
216 ; CHECK-LABEL: fminnm_v8f32:
218 ; CHECK-NEXT: ptrue p0.s, vl4
219 ; CHECK-NEXT: ldp q0, q3, [x1]
220 ; CHECK-NEXT: ldp q1, q2, [x0]
221 ; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, z1.s
222 ; CHECK-NEXT: movprfx z1, z2
223 ; CHECK-NEXT: fminnm z1.s, p0/m, z1.s, z3.s
224 ; CHECK-NEXT: stp q0, q1, [x0]
226 %op1 = load <8 x float>, ptr %a
227 %op2 = load <8 x float>, ptr %b
228 %res = call <8 x float> @llvm.minnum.v8f32(<8 x float> %op1, <8 x float> %op2)
229 store <8 x float> %res, ptr %a
233 define <1 x double> @fminnm_v1f64(<1 x double> %op1, <1 x double> %op2) {
234 ; CHECK-LABEL: fminnm_v1f64:
236 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
237 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
238 ; CHECK-NEXT: fminnm d0, d0, d1
240 %res = call <1 x double> @llvm.minnum.v1f64(<1 x double> %op1, <1 x double> %op2)
241 ret <1 x double> %res
244 define <2 x double> @fminnm_v2f64(<2 x double> %op1, <2 x double> %op2) {
245 ; CHECK-LABEL: fminnm_v2f64:
247 ; CHECK-NEXT: ptrue p0.d, vl2
248 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
249 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
250 ; CHECK-NEXT: fminnm z0.d, p0/m, z0.d, z1.d
251 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
253 %res = call <2 x double> @llvm.minnum.v2f64(<2 x double> %op1, <2 x double> %op2)
254 ret <2 x double> %res
257 define void @fminnm_v4f64(ptr %a, ptr %b) {
258 ; CHECK-LABEL: fminnm_v4f64:
260 ; CHECK-NEXT: ptrue p0.d, vl2
261 ; CHECK-NEXT: ldp q0, q3, [x1]
262 ; CHECK-NEXT: ldp q1, q2, [x0]
263 ; CHECK-NEXT: fminnm z0.d, p0/m, z0.d, z1.d
264 ; CHECK-NEXT: movprfx z1, z2
265 ; CHECK-NEXT: fminnm z1.d, p0/m, z1.d, z3.d
266 ; CHECK-NEXT: stp q0, q1, [x0]
268 %op1 = load <4 x double>, ptr %a
269 %op2 = load <4 x double>, ptr %b
270 %res = call <4 x double> @llvm.minnum.v4f64(<4 x double> %op1, <4 x double> %op2)
271 store <4 x double> %res, ptr %a
279 define <4 x half> @fmax_v4f16(<4 x half> %op1, <4 x half> %op2) {
280 ; CHECK-LABEL: fmax_v4f16:
282 ; CHECK-NEXT: ptrue p0.h, vl4
283 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
284 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
285 ; CHECK-NEXT: fmax z0.h, p0/m, z0.h, z1.h
286 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
288 %res = call <4 x half> @llvm.maximum.v4f16(<4 x half> %op1, <4 x half> %op2)
292 define <8 x half> @fmax_v8f16(<8 x half> %op1, <8 x half> %op2) {
293 ; CHECK-LABEL: fmax_v8f16:
295 ; CHECK-NEXT: ptrue p0.h, vl8
296 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
297 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
298 ; CHECK-NEXT: fmax z0.h, p0/m, z0.h, z1.h
299 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
301 %res = call <8 x half> @llvm.maximum.v8f16(<8 x half> %op1, <8 x half> %op2)
305 define void @fmax_v16f16(ptr %a, ptr %b) {
306 ; CHECK-LABEL: fmax_v16f16:
308 ; CHECK-NEXT: ptrue p0.h, vl8
309 ; CHECK-NEXT: ldp q0, q3, [x1]
310 ; CHECK-NEXT: ldp q1, q2, [x0]
311 ; CHECK-NEXT: fmax z0.h, p0/m, z0.h, z1.h
312 ; CHECK-NEXT: movprfx z1, z2
313 ; CHECK-NEXT: fmax z1.h, p0/m, z1.h, z3.h
314 ; CHECK-NEXT: stp q0, q1, [x0]
316 %op1 = load <16 x half>, ptr %a
317 %op2 = load <16 x half>, ptr %b
318 %res = call <16 x half> @llvm.maximum.v16f16(<16 x half> %op1, <16 x half> %op2)
319 store <16 x half> %res, ptr %a
323 define <2 x float> @fmax_v2f32(<2 x float> %op1, <2 x float> %op2) {
324 ; CHECK-LABEL: fmax_v2f32:
326 ; CHECK-NEXT: ptrue p0.s, vl2
327 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
328 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
329 ; CHECK-NEXT: fmax z0.s, p0/m, z0.s, z1.s
330 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
332 %res = call <2 x float> @llvm.maximum.v2f32(<2 x float> %op1, <2 x float> %op2)
336 define <4 x float> @fmax_v4f32(<4 x float> %op1, <4 x float> %op2) {
337 ; CHECK-LABEL: fmax_v4f32:
339 ; CHECK-NEXT: ptrue p0.s, vl4
340 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
341 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
342 ; CHECK-NEXT: fmax z0.s, p0/m, z0.s, z1.s
343 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
345 %res = call <4 x float> @llvm.maximum.v4f32(<4 x float> %op1, <4 x float> %op2)
349 define void @fmax_v8f32(ptr %a, ptr %b) {
350 ; CHECK-LABEL: fmax_v8f32:
352 ; CHECK-NEXT: ptrue p0.s, vl4
353 ; CHECK-NEXT: ldp q0, q3, [x1]
354 ; CHECK-NEXT: ldp q1, q2, [x0]
355 ; CHECK-NEXT: fmax z0.s, p0/m, z0.s, z1.s
356 ; CHECK-NEXT: movprfx z1, z2
357 ; CHECK-NEXT: fmax z1.s, p0/m, z1.s, z3.s
358 ; CHECK-NEXT: stp q0, q1, [x0]
360 %op1 = load <8 x float>, ptr %a
361 %op2 = load <8 x float>, ptr %b
362 %res = call <8 x float> @llvm.maximum.v8f32(<8 x float> %op1, <8 x float> %op2)
363 store <8 x float> %res, ptr %a
367 define <1 x double> @fmax_v1f64(<1 x double> %op1, <1 x double> %op2) {
368 ; CHECK-LABEL: fmax_v1f64:
370 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
371 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
372 ; CHECK-NEXT: fmax d0, d0, d1
374 %res = call <1 x double> @llvm.maximum.v1f64(<1 x double> %op1, <1 x double> %op2)
375 ret <1 x double> %res
378 define <2 x double> @fmax_v2f64(<2 x double> %op1, <2 x double> %op2) {
379 ; CHECK-LABEL: fmax_v2f64:
381 ; CHECK-NEXT: ptrue p0.d, vl2
382 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
383 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
384 ; CHECK-NEXT: fmax z0.d, p0/m, z0.d, z1.d
385 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
387 %res = call <2 x double> @llvm.maximum.v2f64(<2 x double> %op1, <2 x double> %op2)
388 ret <2 x double> %res
391 define void @fmax_v4f64(ptr %a, ptr %b) {
392 ; CHECK-LABEL: fmax_v4f64:
394 ; CHECK-NEXT: ptrue p0.d, vl2
395 ; CHECK-NEXT: ldp q0, q3, [x1]
396 ; CHECK-NEXT: ldp q1, q2, [x0]
397 ; CHECK-NEXT: fmax z0.d, p0/m, z0.d, z1.d
398 ; CHECK-NEXT: movprfx z1, z2
399 ; CHECK-NEXT: fmax z1.d, p0/m, z1.d, z3.d
400 ; CHECK-NEXT: stp q0, q1, [x0]
402 %op1 = load <4 x double>, ptr %a
403 %op2 = load <4 x double>, ptr %b
404 %res = call <4 x double> @llvm.maximum.v4f64(<4 x double> %op1, <4 x double> %op2)
405 store <4 x double> %res, ptr %a
413 define <4 x half> @fmin_v4f16(<4 x half> %op1, <4 x half> %op2) {
414 ; CHECK-LABEL: fmin_v4f16:
416 ; CHECK-NEXT: ptrue p0.h, vl4
417 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
418 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
419 ; CHECK-NEXT: fmin z0.h, p0/m, z0.h, z1.h
420 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
422 %res = call <4 x half> @llvm.minimum.v4f16(<4 x half> %op1, <4 x half> %op2)
426 define <8 x half> @fmin_v8f16(<8 x half> %op1, <8 x half> %op2) {
427 ; CHECK-LABEL: fmin_v8f16:
429 ; CHECK-NEXT: ptrue p0.h, vl8
430 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
431 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
432 ; CHECK-NEXT: fmin z0.h, p0/m, z0.h, z1.h
433 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
435 %res = call <8 x half> @llvm.minimum.v8f16(<8 x half> %op1, <8 x half> %op2)
439 define void @fmin_v16f16(ptr %a, ptr %b) {
440 ; CHECK-LABEL: fmin_v16f16:
442 ; CHECK-NEXT: ptrue p0.h, vl8
443 ; CHECK-NEXT: ldp q0, q3, [x1]
444 ; CHECK-NEXT: ldp q1, q2, [x0]
445 ; CHECK-NEXT: fmin z0.h, p0/m, z0.h, z1.h
446 ; CHECK-NEXT: movprfx z1, z2
447 ; CHECK-NEXT: fmin z1.h, p0/m, z1.h, z3.h
448 ; CHECK-NEXT: stp q0, q1, [x0]
450 %op1 = load <16 x half>, ptr %a
451 %op2 = load <16 x half>, ptr %b
452 %res = call <16 x half> @llvm.minimum.v16f16(<16 x half> %op1, <16 x half> %op2)
453 store <16 x half> %res, ptr %a
457 define <2 x float> @fmin_v2f32(<2 x float> %op1, <2 x float> %op2) {
458 ; CHECK-LABEL: fmin_v2f32:
460 ; CHECK-NEXT: ptrue p0.s, vl2
461 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
462 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
463 ; CHECK-NEXT: fmin z0.s, p0/m, z0.s, z1.s
464 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
466 %res = call <2 x float> @llvm.minimum.v2f32(<2 x float> %op1, <2 x float> %op2)
470 define <4 x float> @fmin_v4f32(<4 x float> %op1, <4 x float> %op2) {
471 ; CHECK-LABEL: fmin_v4f32:
473 ; CHECK-NEXT: ptrue p0.s, vl4
474 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
475 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
476 ; CHECK-NEXT: fmin z0.s, p0/m, z0.s, z1.s
477 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
479 %res = call <4 x float> @llvm.minimum.v4f32(<4 x float> %op1, <4 x float> %op2)
483 define void @fmin_v8f32(ptr %a, ptr %b) {
484 ; CHECK-LABEL: fmin_v8f32:
486 ; CHECK-NEXT: ptrue p0.s, vl4
487 ; CHECK-NEXT: ldp q0, q3, [x1]
488 ; CHECK-NEXT: ldp q1, q2, [x0]
489 ; CHECK-NEXT: fmin z0.s, p0/m, z0.s, z1.s
490 ; CHECK-NEXT: movprfx z1, z2
491 ; CHECK-NEXT: fmin z1.s, p0/m, z1.s, z3.s
492 ; CHECK-NEXT: stp q0, q1, [x0]
494 %op1 = load <8 x float>, ptr %a
495 %op2 = load <8 x float>, ptr %b
496 %res = call <8 x float> @llvm.minimum.v8f32(<8 x float> %op1, <8 x float> %op2)
497 store <8 x float> %res, ptr %a
501 define <1 x double> @fmin_v1f64(<1 x double> %op1, <1 x double> %op2) {
502 ; CHECK-LABEL: fmin_v1f64:
504 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
505 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
506 ; CHECK-NEXT: fmin d0, d0, d1
508 %res = call <1 x double> @llvm.minimum.v1f64(<1 x double> %op1, <1 x double> %op2)
509 ret <1 x double> %res
512 define <2 x double> @fmin_v2f64(<2 x double> %op1, <2 x double> %op2) {
513 ; CHECK-LABEL: fmin_v2f64:
515 ; CHECK-NEXT: ptrue p0.d, vl2
516 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
517 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
518 ; CHECK-NEXT: fmin z0.d, p0/m, z0.d, z1.d
519 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
521 %res = call <2 x double> @llvm.minimum.v2f64(<2 x double> %op1, <2 x double> %op2)
522 ret <2 x double> %res
525 define void @fmin_v4f64(ptr %a, ptr %b) {
526 ; CHECK-LABEL: fmin_v4f64:
528 ; CHECK-NEXT: ptrue p0.d, vl2
529 ; CHECK-NEXT: ldp q0, q3, [x1]
530 ; CHECK-NEXT: ldp q1, q2, [x0]
531 ; CHECK-NEXT: fmin z0.d, p0/m, z0.d, z1.d
532 ; CHECK-NEXT: movprfx z1, z2
533 ; CHECK-NEXT: fmin z1.d, p0/m, z1.d, z3.d
534 ; CHECK-NEXT: stp q0, q1, [x0]
536 %op1 = load <4 x double>, ptr %a
537 %op2 = load <4 x double>, ptr %b
538 %res = call <4 x double> @llvm.minimum.v4f64(<4 x double> %op1, <4 x double> %op2)
539 store <4 x double> %res, ptr %a
543 declare <4 x half> @llvm.minnum.v4f16(<4 x half>, <4 x half>)
544 declare <8 x half> @llvm.minnum.v8f16(<8 x half>, <8 x half>)
545 declare <16 x half> @llvm.minnum.v16f16(<16 x half>, <16 x half>)
546 declare <2 x float> @llvm.minnum.v2f32(<2 x float>, <2 x float>)
547 declare <4 x float> @llvm.minnum.v4f32(<4 x float>, <4 x float>)
548 declare <8 x float> @llvm.minnum.v8f32(<8 x float>, <8 x float>)
549 declare <1 x double> @llvm.minnum.v1f64(<1 x double>, <1 x double>)
550 declare <2 x double> @llvm.minnum.v2f64(<2 x double>, <2 x double>)
551 declare <4 x double> @llvm.minnum.v4f64(<4 x double>, <4 x double>)
553 declare <4 x half> @llvm.maxnum.v4f16(<4 x half>, <4 x half>)
554 declare <8 x half> @llvm.maxnum.v8f16(<8 x half>, <8 x half>)
555 declare <16 x half> @llvm.maxnum.v16f16(<16 x half>, <16 x half>)
556 declare <2 x float> @llvm.maxnum.v2f32(<2 x float>, <2 x float>)
557 declare <4 x float> @llvm.maxnum.v4f32(<4 x float>, <4 x float>)
558 declare <8 x float> @llvm.maxnum.v8f32(<8 x float>, <8 x float>)
559 declare <1 x double> @llvm.maxnum.v1f64(<1 x double>, <1 x double>)
560 declare <2 x double> @llvm.maxnum.v2f64(<2 x double>, <2 x double>)
561 declare <4 x double> @llvm.maxnum.v4f64(<4 x double>, <4 x double>)
563 declare <4 x half> @llvm.minimum.v4f16(<4 x half>, <4 x half>)
564 declare <8 x half> @llvm.minimum.v8f16(<8 x half>, <8 x half>)
565 declare <16 x half> @llvm.minimum.v16f16(<16 x half>, <16 x half>)
566 declare <2 x float> @llvm.minimum.v2f32(<2 x float>, <2 x float>)
567 declare <4 x float> @llvm.minimum.v4f32(<4 x float>, <4 x float>)
568 declare <8 x float> @llvm.minimum.v8f32(<8 x float>, <8 x float>)
569 declare <1 x double> @llvm.minimum.v1f64(<1 x double>, <1 x double>)
570 declare <2 x double> @llvm.minimum.v2f64(<2 x double>, <2 x double>)
571 declare <4 x double> @llvm.minimum.v4f64(<4 x double>, <4 x double>)
573 declare <4 x half> @llvm.maximum.v4f16(<4 x half>, <4 x half>)
574 declare <8 x half> @llvm.maximum.v8f16(<8 x half>, <8 x half>)
575 declare <16 x half> @llvm.maximum.v16f16(<16 x half>, <16 x half>)
576 declare <2 x float> @llvm.maximum.v2f32(<2 x float>, <2 x float>)
577 declare <4 x float> @llvm.maximum.v4f32(<4 x float>, <4 x float>)
578 declare <8 x float> @llvm.maximum.v8f32(<8 x float>, <8 x float>)
579 declare <1 x double> @llvm.maximum.v1f64(<1 x double>, <1 x double>)
580 declare <2 x double> @llvm.maximum.v2f64(<2 x double>, <2 x double>)
581 declare <4 x double> @llvm.maximum.v4f64(<4 x double>, <4 x double>)