1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-none-eabi -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD,CHECK-NOFP16-SD
3 ; RUN: llc -mtriple=aarch64-none-eabi -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD,CHECK-FP16-SD
4 ; RUN: llc -mtriple=aarch64-none-eabi -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI,CHECK-NOFP16-GI
5 ; RUN: llc -mtriple=aarch64-none-eabi -mattr=+fullfp16 -global-isel -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI,CHECK-FP16-GI
7 define double @min_f64(double %a, double %b) {
8 ; CHECK-LABEL: min_f64:
9 ; CHECK: // %bb.0: // %entry
10 ; CHECK-NEXT: fmin d0, d0, d1
13 %c = call double @llvm.minimum.f64(double %a, double %b)
17 define double @max_f64(double %a, double %b) {
18 ; CHECK-LABEL: max_f64:
19 ; CHECK: // %bb.0: // %entry
20 ; CHECK-NEXT: fmax d0, d0, d1
23 %c = call double @llvm.maximum.f64(double %a, double %b)
27 define float @min_f32(float %a, float %b) {
28 ; CHECK-LABEL: min_f32:
29 ; CHECK: // %bb.0: // %entry
30 ; CHECK-NEXT: fmin s0, s0, s1
33 %c = call float @llvm.minimum.f32(float %a, float %b)
37 define float @max_f32(float %a, float %b) {
38 ; CHECK-LABEL: max_f32:
39 ; CHECK: // %bb.0: // %entry
40 ; CHECK-NEXT: fmax s0, s0, s1
43 %c = call float @llvm.maximum.f32(float %a, float %b)
47 define half @min_f16(half %a, half %b) {
48 ; CHECK-NOFP16-SD-LABEL: min_f16:
49 ; CHECK-NOFP16-SD: // %bb.0: // %entry
50 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
51 ; CHECK-NOFP16-SD-NEXT: fcvt s0, h0
52 ; CHECK-NOFP16-SD-NEXT: fmin s0, s0, s1
53 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s0
54 ; CHECK-NOFP16-SD-NEXT: ret
56 ; CHECK-FP16-SD-LABEL: min_f16:
57 ; CHECK-FP16-SD: // %bb.0: // %entry
58 ; CHECK-FP16-SD-NEXT: fmin h0, h0, h1
59 ; CHECK-FP16-SD-NEXT: ret
61 ; CHECK-NOFP16-GI-LABEL: min_f16:
62 ; CHECK-NOFP16-GI: // %bb.0: // %entry
63 ; CHECK-NOFP16-GI-NEXT: fcvt s0, h0
64 ; CHECK-NOFP16-GI-NEXT: fcvt s1, h1
65 ; CHECK-NOFP16-GI-NEXT: fmin s0, s0, s1
66 ; CHECK-NOFP16-GI-NEXT: fcvt h0, s0
67 ; CHECK-NOFP16-GI-NEXT: ret
69 ; CHECK-FP16-GI-LABEL: min_f16:
70 ; CHECK-FP16-GI: // %bb.0: // %entry
71 ; CHECK-FP16-GI-NEXT: fmin h0, h0, h1
72 ; CHECK-FP16-GI-NEXT: ret
74 %c = call half @llvm.minimum.f16(half %a, half %b)
78 define half @max_f16(half %a, half %b) {
79 ; CHECK-NOFP16-SD-LABEL: max_f16:
80 ; CHECK-NOFP16-SD: // %bb.0: // %entry
81 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
82 ; CHECK-NOFP16-SD-NEXT: fcvt s0, h0
83 ; CHECK-NOFP16-SD-NEXT: fmax s0, s0, s1
84 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s0
85 ; CHECK-NOFP16-SD-NEXT: ret
87 ; CHECK-FP16-SD-LABEL: max_f16:
88 ; CHECK-FP16-SD: // %bb.0: // %entry
89 ; CHECK-FP16-SD-NEXT: fmax h0, h0, h1
90 ; CHECK-FP16-SD-NEXT: ret
92 ; CHECK-NOFP16-GI-LABEL: max_f16:
93 ; CHECK-NOFP16-GI: // %bb.0: // %entry
94 ; CHECK-NOFP16-GI-NEXT: fcvt s0, h0
95 ; CHECK-NOFP16-GI-NEXT: fcvt s1, h1
96 ; CHECK-NOFP16-GI-NEXT: fmax s0, s0, s1
97 ; CHECK-NOFP16-GI-NEXT: fcvt h0, s0
98 ; CHECK-NOFP16-GI-NEXT: ret
100 ; CHECK-FP16-GI-LABEL: max_f16:
101 ; CHECK-FP16-GI: // %bb.0: // %entry
102 ; CHECK-FP16-GI-NEXT: fmax h0, h0, h1
103 ; CHECK-FP16-GI-NEXT: ret
105 %c = call half @llvm.maximum.f16(half %a, half %b)
109 define <2 x double> @min_v2f64(<2 x double> %a, <2 x double> %b) {
110 ; CHECK-LABEL: min_v2f64:
111 ; CHECK: // %bb.0: // %entry
112 ; CHECK-NEXT: fmin v0.2d, v0.2d, v1.2d
115 %c = call <2 x double> @llvm.minimum.v2f64(<2 x double> %a, <2 x double> %b)
119 define <2 x double> @max_v2f64(<2 x double> %a, <2 x double> %b) {
120 ; CHECK-LABEL: max_v2f64:
121 ; CHECK: // %bb.0: // %entry
122 ; CHECK-NEXT: fmax v0.2d, v0.2d, v1.2d
125 %c = call <2 x double> @llvm.maximum.v2f64(<2 x double> %a, <2 x double> %b)
129 define <3 x double> @min_v3f64(<3 x double> %a, <3 x double> %b) {
130 ; CHECK-SD-LABEL: min_v3f64:
131 ; CHECK-SD: // %bb.0: // %entry
132 ; CHECK-SD-NEXT: // kill: def $d3 killed $d3 def $q3
133 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
134 ; CHECK-SD-NEXT: // kill: def $d4 killed $d4 def $q4
135 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 def $q1
136 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 def $q2
137 ; CHECK-SD-NEXT: // kill: def $d5 killed $d5 def $q5
138 ; CHECK-SD-NEXT: mov v3.d[1], v4.d[0]
139 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
140 ; CHECK-SD-NEXT: fmin v2.2d, v2.2d, v5.2d
141 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
142 ; CHECK-SD-NEXT: fmin v0.2d, v0.2d, v3.2d
143 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
144 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
145 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
148 ; CHECK-GI-LABEL: min_v3f64:
149 ; CHECK-GI: // %bb.0: // %entry
150 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
151 ; CHECK-GI-NEXT: // kill: def $d3 killed $d3 def $q3
152 ; CHECK-GI-NEXT: // kill: def $d1 killed $d1 def $q1
153 ; CHECK-GI-NEXT: // kill: def $d4 killed $d4 def $q4
154 ; CHECK-GI-NEXT: fmin d2, d2, d5
155 ; CHECK-GI-NEXT: mov v0.d[1], v1.d[0]
156 ; CHECK-GI-NEXT: mov v3.d[1], v4.d[0]
157 ; CHECK-GI-NEXT: fmin v0.2d, v0.2d, v3.2d
158 ; CHECK-GI-NEXT: mov d1, v0.d[1]
159 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
162 %c = call <3 x double> @llvm.minimum.v3f64(<3 x double> %a, <3 x double> %b)
166 define <3 x double> @max_v3f64(<3 x double> %a, <3 x double> %b) {
167 ; CHECK-SD-LABEL: max_v3f64:
168 ; CHECK-SD: // %bb.0: // %entry
169 ; CHECK-SD-NEXT: // kill: def $d3 killed $d3 def $q3
170 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
171 ; CHECK-SD-NEXT: // kill: def $d4 killed $d4 def $q4
172 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 def $q1
173 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 def $q2
174 ; CHECK-SD-NEXT: // kill: def $d5 killed $d5 def $q5
175 ; CHECK-SD-NEXT: mov v3.d[1], v4.d[0]
176 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
177 ; CHECK-SD-NEXT: fmax v2.2d, v2.2d, v5.2d
178 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
179 ; CHECK-SD-NEXT: fmax v0.2d, v0.2d, v3.2d
180 ; CHECK-SD-NEXT: ext v1.16b, v0.16b, v0.16b, #8
181 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
182 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
185 ; CHECK-GI-LABEL: max_v3f64:
186 ; CHECK-GI: // %bb.0: // %entry
187 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
188 ; CHECK-GI-NEXT: // kill: def $d3 killed $d3 def $q3
189 ; CHECK-GI-NEXT: // kill: def $d1 killed $d1 def $q1
190 ; CHECK-GI-NEXT: // kill: def $d4 killed $d4 def $q4
191 ; CHECK-GI-NEXT: fmax d2, d2, d5
192 ; CHECK-GI-NEXT: mov v0.d[1], v1.d[0]
193 ; CHECK-GI-NEXT: mov v3.d[1], v4.d[0]
194 ; CHECK-GI-NEXT: fmax v0.2d, v0.2d, v3.2d
195 ; CHECK-GI-NEXT: mov d1, v0.d[1]
196 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
199 %c = call <3 x double> @llvm.maximum.v3f64(<3 x double> %a, <3 x double> %b)
203 define <4 x double> @min_v4f64(<4 x double> %a, <4 x double> %b) {
204 ; CHECK-SD-LABEL: min_v4f64:
205 ; CHECK-SD: // %bb.0: // %entry
206 ; CHECK-SD-NEXT: fmin v1.2d, v1.2d, v3.2d
207 ; CHECK-SD-NEXT: fmin v0.2d, v0.2d, v2.2d
210 ; CHECK-GI-LABEL: min_v4f64:
211 ; CHECK-GI: // %bb.0: // %entry
212 ; CHECK-GI-NEXT: fmin v0.2d, v0.2d, v2.2d
213 ; CHECK-GI-NEXT: fmin v1.2d, v1.2d, v3.2d
216 %c = call <4 x double> @llvm.minimum.v4f64(<4 x double> %a, <4 x double> %b)
220 define <4 x double> @max_v4f64(<4 x double> %a, <4 x double> %b) {
221 ; CHECK-SD-LABEL: max_v4f64:
222 ; CHECK-SD: // %bb.0: // %entry
223 ; CHECK-SD-NEXT: fmax v1.2d, v1.2d, v3.2d
224 ; CHECK-SD-NEXT: fmax v0.2d, v0.2d, v2.2d
227 ; CHECK-GI-LABEL: max_v4f64:
228 ; CHECK-GI: // %bb.0: // %entry
229 ; CHECK-GI-NEXT: fmax v0.2d, v0.2d, v2.2d
230 ; CHECK-GI-NEXT: fmax v1.2d, v1.2d, v3.2d
233 %c = call <4 x double> @llvm.maximum.v4f64(<4 x double> %a, <4 x double> %b)
237 define <2 x float> @min_v2f32(<2 x float> %a, <2 x float> %b) {
238 ; CHECK-LABEL: min_v2f32:
239 ; CHECK: // %bb.0: // %entry
240 ; CHECK-NEXT: fmin v0.2s, v0.2s, v1.2s
243 %c = call <2 x float> @llvm.minimum.v2f32(<2 x float> %a, <2 x float> %b)
247 define <2 x float> @max_v2f32(<2 x float> %a, <2 x float> %b) {
248 ; CHECK-LABEL: max_v2f32:
249 ; CHECK: // %bb.0: // %entry
250 ; CHECK-NEXT: fmax v0.2s, v0.2s, v1.2s
253 %c = call <2 x float> @llvm.maximum.v2f32(<2 x float> %a, <2 x float> %b)
257 define <3 x float> @min_v3f32(<3 x float> %a, <3 x float> %b) {
258 ; CHECK-LABEL: min_v3f32:
259 ; CHECK: // %bb.0: // %entry
260 ; CHECK-NEXT: fmin v0.4s, v0.4s, v1.4s
263 %c = call <3 x float> @llvm.minimum.v3f32(<3 x float> %a, <3 x float> %b)
267 define <3 x float> @max_v3f32(<3 x float> %a, <3 x float> %b) {
268 ; CHECK-LABEL: max_v3f32:
269 ; CHECK: // %bb.0: // %entry
270 ; CHECK-NEXT: fmax v0.4s, v0.4s, v1.4s
273 %c = call <3 x float> @llvm.maximum.v3f32(<3 x float> %a, <3 x float> %b)
277 define <4 x float> @min_v4f32(<4 x float> %a, <4 x float> %b) {
278 ; CHECK-LABEL: min_v4f32:
279 ; CHECK: // %bb.0: // %entry
280 ; CHECK-NEXT: fmin v0.4s, v0.4s, v1.4s
283 %c = call <4 x float> @llvm.minimum.v4f32(<4 x float> %a, <4 x float> %b)
287 define <4 x float> @max_v4f32(<4 x float> %a, <4 x float> %b) {
288 ; CHECK-LABEL: max_v4f32:
289 ; CHECK: // %bb.0: // %entry
290 ; CHECK-NEXT: fmax v0.4s, v0.4s, v1.4s
293 %c = call <4 x float> @llvm.maximum.v4f32(<4 x float> %a, <4 x float> %b)
297 define <7 x float> @min_v7f32(<7 x float> %a, <7 x float> %b) {
298 ; CHECK-SD-LABEL: min_v7f32:
299 ; CHECK-SD: // %bb.0: // %entry
300 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
301 ; CHECK-SD-NEXT: // kill: def $s1 killed $s1 def $q1
302 ; CHECK-SD-NEXT: // kill: def $s7 killed $s7 def $q7
303 ; CHECK-SD-NEXT: mov x8, sp
304 ; CHECK-SD-NEXT: // kill: def $s4 killed $s4 def $q4
305 ; CHECK-SD-NEXT: // kill: def $s5 killed $s5 def $q5
306 ; CHECK-SD-NEXT: // kill: def $s2 killed $s2 def $q2
307 ; CHECK-SD-NEXT: // kill: def $s6 killed $s6 def $q6
308 ; CHECK-SD-NEXT: // kill: def $s3 killed $s3 def $q3
309 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
310 ; CHECK-SD-NEXT: ld1 { v7.s }[1], [x8]
311 ; CHECK-SD-NEXT: ldr s1, [sp, #24]
312 ; CHECK-SD-NEXT: add x8, sp, #8
313 ; CHECK-SD-NEXT: mov v4.s[1], v5.s[0]
314 ; CHECK-SD-NEXT: ld1 { v7.s }[2], [x8]
315 ; CHECK-SD-NEXT: add x8, sp, #32
316 ; CHECK-SD-NEXT: mov v0.s[2], v2.s[0]
317 ; CHECK-SD-NEXT: ld1 { v1.s }[1], [x8]
318 ; CHECK-SD-NEXT: add x8, sp, #16
319 ; CHECK-SD-NEXT: mov v4.s[2], v6.s[0]
320 ; CHECK-SD-NEXT: ld1 { v7.s }[3], [x8]
321 ; CHECK-SD-NEXT: add x8, sp, #40
322 ; CHECK-SD-NEXT: ld1 { v1.s }[2], [x8]
323 ; CHECK-SD-NEXT: mov v0.s[3], v3.s[0]
324 ; CHECK-SD-NEXT: fmin v4.4s, v4.4s, v1.4s
325 ; CHECK-SD-NEXT: fmin v0.4s, v0.4s, v7.4s
326 ; CHECK-SD-NEXT: mov s5, v4.s[1]
327 ; CHECK-SD-NEXT: mov s6, v4.s[2]
328 ; CHECK-SD-NEXT: // kill: def $s4 killed $s4 killed $q4
329 ; CHECK-SD-NEXT: mov s1, v0.s[1]
330 ; CHECK-SD-NEXT: mov s2, v0.s[2]
331 ; CHECK-SD-NEXT: mov s3, v0.s[3]
332 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
335 ; CHECK-GI-LABEL: min_v7f32:
336 ; CHECK-GI: // %bb.0: // %entry
337 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
338 ; CHECK-GI-NEXT: // kill: def $s1 killed $s1 def $q1
339 ; CHECK-GI-NEXT: ldr s16, [sp]
340 ; CHECK-GI-NEXT: ldr s17, [sp, #24]
341 ; CHECK-GI-NEXT: // kill: def $s4 killed $s4 def $q4
342 ; CHECK-GI-NEXT: // kill: def $s7 killed $s7 def $q7
343 ; CHECK-GI-NEXT: // kill: def $s2 killed $s2 def $q2
344 ; CHECK-GI-NEXT: // kill: def $s5 killed $s5 def $q5
345 ; CHECK-GI-NEXT: // kill: def $s6 killed $s6 def $q6
346 ; CHECK-GI-NEXT: // kill: def $s3 killed $s3 def $q3
347 ; CHECK-GI-NEXT: ldr s18, [sp, #32]
348 ; CHECK-GI-NEXT: mov v0.s[1], v1.s[0]
349 ; CHECK-GI-NEXT: mov v4.s[1], v5.s[0]
350 ; CHECK-GI-NEXT: ldr s1, [sp, #8]
351 ; CHECK-GI-NEXT: mov v7.s[1], v16.s[0]
352 ; CHECK-GI-NEXT: mov v17.s[1], v18.s[0]
353 ; CHECK-GI-NEXT: ldr s5, [sp, #40]
354 ; CHECK-GI-NEXT: mov v0.s[2], v2.s[0]
355 ; CHECK-GI-NEXT: mov v4.s[2], v6.s[0]
356 ; CHECK-GI-NEXT: mov v7.s[2], v1.s[0]
357 ; CHECK-GI-NEXT: mov v17.s[2], v5.s[0]
358 ; CHECK-GI-NEXT: ldr s1, [sp, #16]
359 ; CHECK-GI-NEXT: mov v0.s[3], v3.s[0]
360 ; CHECK-GI-NEXT: mov v7.s[3], v1.s[0]
361 ; CHECK-GI-NEXT: mov v4.s[3], v0.s[0]
362 ; CHECK-GI-NEXT: mov v17.s[3], v0.s[0]
363 ; CHECK-GI-NEXT: fmin v0.4s, v0.4s, v7.4s
364 ; CHECK-GI-NEXT: fmin v4.4s, v4.4s, v17.4s
365 ; CHECK-GI-NEXT: mov s1, v0.s[1]
366 ; CHECK-GI-NEXT: mov s2, v0.s[2]
367 ; CHECK-GI-NEXT: mov s3, v0.s[3]
368 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
369 ; CHECK-GI-NEXT: mov s5, v4.s[1]
370 ; CHECK-GI-NEXT: mov s6, v4.s[2]
371 ; CHECK-GI-NEXT: // kill: def $s4 killed $s4 killed $q4
374 %c = call <7 x float> @llvm.minimum.v7f32(<7 x float> %a, <7 x float> %b)
378 define <7 x float> @max_v7f32(<7 x float> %a, <7 x float> %b) {
379 ; CHECK-SD-LABEL: max_v7f32:
380 ; CHECK-SD: // %bb.0: // %entry
381 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 def $q0
382 ; CHECK-SD-NEXT: // kill: def $s1 killed $s1 def $q1
383 ; CHECK-SD-NEXT: // kill: def $s7 killed $s7 def $q7
384 ; CHECK-SD-NEXT: mov x8, sp
385 ; CHECK-SD-NEXT: // kill: def $s4 killed $s4 def $q4
386 ; CHECK-SD-NEXT: // kill: def $s5 killed $s5 def $q5
387 ; CHECK-SD-NEXT: // kill: def $s2 killed $s2 def $q2
388 ; CHECK-SD-NEXT: // kill: def $s6 killed $s6 def $q6
389 ; CHECK-SD-NEXT: // kill: def $s3 killed $s3 def $q3
390 ; CHECK-SD-NEXT: mov v0.s[1], v1.s[0]
391 ; CHECK-SD-NEXT: ld1 { v7.s }[1], [x8]
392 ; CHECK-SD-NEXT: ldr s1, [sp, #24]
393 ; CHECK-SD-NEXT: add x8, sp, #8
394 ; CHECK-SD-NEXT: mov v4.s[1], v5.s[0]
395 ; CHECK-SD-NEXT: ld1 { v7.s }[2], [x8]
396 ; CHECK-SD-NEXT: add x8, sp, #32
397 ; CHECK-SD-NEXT: mov v0.s[2], v2.s[0]
398 ; CHECK-SD-NEXT: ld1 { v1.s }[1], [x8]
399 ; CHECK-SD-NEXT: add x8, sp, #16
400 ; CHECK-SD-NEXT: mov v4.s[2], v6.s[0]
401 ; CHECK-SD-NEXT: ld1 { v7.s }[3], [x8]
402 ; CHECK-SD-NEXT: add x8, sp, #40
403 ; CHECK-SD-NEXT: ld1 { v1.s }[2], [x8]
404 ; CHECK-SD-NEXT: mov v0.s[3], v3.s[0]
405 ; CHECK-SD-NEXT: fmax v4.4s, v4.4s, v1.4s
406 ; CHECK-SD-NEXT: fmax v0.4s, v0.4s, v7.4s
407 ; CHECK-SD-NEXT: mov s5, v4.s[1]
408 ; CHECK-SD-NEXT: mov s6, v4.s[2]
409 ; CHECK-SD-NEXT: // kill: def $s4 killed $s4 killed $q4
410 ; CHECK-SD-NEXT: mov s1, v0.s[1]
411 ; CHECK-SD-NEXT: mov s2, v0.s[2]
412 ; CHECK-SD-NEXT: mov s3, v0.s[3]
413 ; CHECK-SD-NEXT: // kill: def $s0 killed $s0 killed $q0
416 ; CHECK-GI-LABEL: max_v7f32:
417 ; CHECK-GI: // %bb.0: // %entry
418 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 def $q0
419 ; CHECK-GI-NEXT: // kill: def $s1 killed $s1 def $q1
420 ; CHECK-GI-NEXT: ldr s16, [sp]
421 ; CHECK-GI-NEXT: ldr s17, [sp, #24]
422 ; CHECK-GI-NEXT: // kill: def $s4 killed $s4 def $q4
423 ; CHECK-GI-NEXT: // kill: def $s7 killed $s7 def $q7
424 ; CHECK-GI-NEXT: // kill: def $s2 killed $s2 def $q2
425 ; CHECK-GI-NEXT: // kill: def $s5 killed $s5 def $q5
426 ; CHECK-GI-NEXT: // kill: def $s6 killed $s6 def $q6
427 ; CHECK-GI-NEXT: // kill: def $s3 killed $s3 def $q3
428 ; CHECK-GI-NEXT: ldr s18, [sp, #32]
429 ; CHECK-GI-NEXT: mov v0.s[1], v1.s[0]
430 ; CHECK-GI-NEXT: mov v4.s[1], v5.s[0]
431 ; CHECK-GI-NEXT: ldr s1, [sp, #8]
432 ; CHECK-GI-NEXT: mov v7.s[1], v16.s[0]
433 ; CHECK-GI-NEXT: mov v17.s[1], v18.s[0]
434 ; CHECK-GI-NEXT: ldr s5, [sp, #40]
435 ; CHECK-GI-NEXT: mov v0.s[2], v2.s[0]
436 ; CHECK-GI-NEXT: mov v4.s[2], v6.s[0]
437 ; CHECK-GI-NEXT: mov v7.s[2], v1.s[0]
438 ; CHECK-GI-NEXT: mov v17.s[2], v5.s[0]
439 ; CHECK-GI-NEXT: ldr s1, [sp, #16]
440 ; CHECK-GI-NEXT: mov v0.s[3], v3.s[0]
441 ; CHECK-GI-NEXT: mov v7.s[3], v1.s[0]
442 ; CHECK-GI-NEXT: mov v4.s[3], v0.s[0]
443 ; CHECK-GI-NEXT: mov v17.s[3], v0.s[0]
444 ; CHECK-GI-NEXT: fmax v0.4s, v0.4s, v7.4s
445 ; CHECK-GI-NEXT: fmax v4.4s, v4.4s, v17.4s
446 ; CHECK-GI-NEXT: mov s1, v0.s[1]
447 ; CHECK-GI-NEXT: mov s2, v0.s[2]
448 ; CHECK-GI-NEXT: mov s3, v0.s[3]
449 ; CHECK-GI-NEXT: // kill: def $s0 killed $s0 killed $q0
450 ; CHECK-GI-NEXT: mov s5, v4.s[1]
451 ; CHECK-GI-NEXT: mov s6, v4.s[2]
452 ; CHECK-GI-NEXT: // kill: def $s4 killed $s4 killed $q4
455 %c = call <7 x float> @llvm.maximum.v7f32(<7 x float> %a, <7 x float> %b)
459 define <8 x float> @min_v8f32(<8 x float> %a, <8 x float> %b) {
460 ; CHECK-SD-LABEL: min_v8f32:
461 ; CHECK-SD: // %bb.0: // %entry
462 ; CHECK-SD-NEXT: fmin v1.4s, v1.4s, v3.4s
463 ; CHECK-SD-NEXT: fmin v0.4s, v0.4s, v2.4s
466 ; CHECK-GI-LABEL: min_v8f32:
467 ; CHECK-GI: // %bb.0: // %entry
468 ; CHECK-GI-NEXT: fmin v0.4s, v0.4s, v2.4s
469 ; CHECK-GI-NEXT: fmin v1.4s, v1.4s, v3.4s
472 %c = call <8 x float> @llvm.minimum.v8f32(<8 x float> %a, <8 x float> %b)
476 define <8 x float> @max_v8f32(<8 x float> %a, <8 x float> %b) {
477 ; CHECK-SD-LABEL: max_v8f32:
478 ; CHECK-SD: // %bb.0: // %entry
479 ; CHECK-SD-NEXT: fmax v1.4s, v1.4s, v3.4s
480 ; CHECK-SD-NEXT: fmax v0.4s, v0.4s, v2.4s
483 ; CHECK-GI-LABEL: max_v8f32:
484 ; CHECK-GI: // %bb.0: // %entry
485 ; CHECK-GI-NEXT: fmax v0.4s, v0.4s, v2.4s
486 ; CHECK-GI-NEXT: fmax v1.4s, v1.4s, v3.4s
489 %c = call <8 x float> @llvm.maximum.v8f32(<8 x float> %a, <8 x float> %b)
493 define <4 x half> @min_v4f16(<4 x half> %a, <4 x half> %b) {
494 ; CHECK-NOFP16-SD-LABEL: min_v4f16:
495 ; CHECK-NOFP16-SD: // %bb.0: // %entry
496 ; CHECK-NOFP16-SD-NEXT: // kill: def $d1 killed $d1 def $q1
497 ; CHECK-NOFP16-SD-NEXT: // kill: def $d0 killed $d0 def $q0
498 ; CHECK-NOFP16-SD-NEXT: mov h2, v1.h[1]
499 ; CHECK-NOFP16-SD-NEXT: mov h3, v0.h[1]
500 ; CHECK-NOFP16-SD-NEXT: mov h4, v1.h[2]
501 ; CHECK-NOFP16-SD-NEXT: mov h5, v0.h[2]
502 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h1
503 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h0
504 ; CHECK-NOFP16-SD-NEXT: mov h1, v1.h[3]
505 ; CHECK-NOFP16-SD-NEXT: fcvt s2, h2
506 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h3
507 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
508 ; CHECK-NOFP16-SD-NEXT: fmin s2, s3, s2
509 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h4
510 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h5
511 ; CHECK-NOFP16-SD-NEXT: fmin s5, s7, s6
512 ; CHECK-NOFP16-SD-NEXT: mov h6, v0.h[3]
513 ; CHECK-NOFP16-SD-NEXT: fmin s3, s4, s3
514 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s2
515 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s5
516 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h6
517 ; CHECK-NOFP16-SD-NEXT: mov v0.h[1], v2.h[0]
518 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s3
519 ; CHECK-NOFP16-SD-NEXT: fmin s1, s4, s1
520 ; CHECK-NOFP16-SD-NEXT: mov v0.h[2], v2.h[0]
521 ; CHECK-NOFP16-SD-NEXT: fcvt h1, s1
522 ; CHECK-NOFP16-SD-NEXT: mov v0.h[3], v1.h[0]
523 ; CHECK-NOFP16-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
524 ; CHECK-NOFP16-SD-NEXT: ret
526 ; CHECK-FP16-SD-LABEL: min_v4f16:
527 ; CHECK-FP16-SD: // %bb.0: // %entry
528 ; CHECK-FP16-SD-NEXT: fmin v0.4h, v0.4h, v1.4h
529 ; CHECK-FP16-SD-NEXT: ret
531 ; CHECK-NOFP16-GI-LABEL: min_v4f16:
532 ; CHECK-NOFP16-GI: // %bb.0: // %entry
533 ; CHECK-NOFP16-GI-NEXT: fcvtl v0.4s, v0.4h
534 ; CHECK-NOFP16-GI-NEXT: fcvtl v1.4s, v1.4h
535 ; CHECK-NOFP16-GI-NEXT: fmin v0.4s, v0.4s, v1.4s
536 ; CHECK-NOFP16-GI-NEXT: fcvtn v0.4h, v0.4s
537 ; CHECK-NOFP16-GI-NEXT: ret
539 ; CHECK-FP16-GI-LABEL: min_v4f16:
540 ; CHECK-FP16-GI: // %bb.0: // %entry
541 ; CHECK-FP16-GI-NEXT: fmin v0.4h, v0.4h, v1.4h
542 ; CHECK-FP16-GI-NEXT: ret
544 %c = call <4 x half> @llvm.minimum.v4f16(<4 x half> %a, <4 x half> %b)
548 define <4 x half> @max_v4f16(<4 x half> %a, <4 x half> %b) {
549 ; CHECK-NOFP16-SD-LABEL: max_v4f16:
550 ; CHECK-NOFP16-SD: // %bb.0: // %entry
551 ; CHECK-NOFP16-SD-NEXT: // kill: def $d1 killed $d1 def $q1
552 ; CHECK-NOFP16-SD-NEXT: // kill: def $d0 killed $d0 def $q0
553 ; CHECK-NOFP16-SD-NEXT: mov h2, v1.h[1]
554 ; CHECK-NOFP16-SD-NEXT: mov h3, v0.h[1]
555 ; CHECK-NOFP16-SD-NEXT: mov h4, v1.h[2]
556 ; CHECK-NOFP16-SD-NEXT: mov h5, v0.h[2]
557 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h1
558 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h0
559 ; CHECK-NOFP16-SD-NEXT: mov h1, v1.h[3]
560 ; CHECK-NOFP16-SD-NEXT: fcvt s2, h2
561 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h3
562 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
563 ; CHECK-NOFP16-SD-NEXT: fmax s2, s3, s2
564 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h4
565 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h5
566 ; CHECK-NOFP16-SD-NEXT: fmax s5, s7, s6
567 ; CHECK-NOFP16-SD-NEXT: mov h6, v0.h[3]
568 ; CHECK-NOFP16-SD-NEXT: fmax s3, s4, s3
569 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s2
570 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s5
571 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h6
572 ; CHECK-NOFP16-SD-NEXT: mov v0.h[1], v2.h[0]
573 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s3
574 ; CHECK-NOFP16-SD-NEXT: fmax s1, s4, s1
575 ; CHECK-NOFP16-SD-NEXT: mov v0.h[2], v2.h[0]
576 ; CHECK-NOFP16-SD-NEXT: fcvt h1, s1
577 ; CHECK-NOFP16-SD-NEXT: mov v0.h[3], v1.h[0]
578 ; CHECK-NOFP16-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
579 ; CHECK-NOFP16-SD-NEXT: ret
581 ; CHECK-FP16-SD-LABEL: max_v4f16:
582 ; CHECK-FP16-SD: // %bb.0: // %entry
583 ; CHECK-FP16-SD-NEXT: fmax v0.4h, v0.4h, v1.4h
584 ; CHECK-FP16-SD-NEXT: ret
586 ; CHECK-NOFP16-GI-LABEL: max_v4f16:
587 ; CHECK-NOFP16-GI: // %bb.0: // %entry
588 ; CHECK-NOFP16-GI-NEXT: fcvtl v0.4s, v0.4h
589 ; CHECK-NOFP16-GI-NEXT: fcvtl v1.4s, v1.4h
590 ; CHECK-NOFP16-GI-NEXT: fmax v0.4s, v0.4s, v1.4s
591 ; CHECK-NOFP16-GI-NEXT: fcvtn v0.4h, v0.4s
592 ; CHECK-NOFP16-GI-NEXT: ret
594 ; CHECK-FP16-GI-LABEL: max_v4f16:
595 ; CHECK-FP16-GI: // %bb.0: // %entry
596 ; CHECK-FP16-GI-NEXT: fmax v0.4h, v0.4h, v1.4h
597 ; CHECK-FP16-GI-NEXT: ret
599 %c = call <4 x half> @llvm.maximum.v4f16(<4 x half> %a, <4 x half> %b)
603 define <7 x half> @min_v7f16(<7 x half> %a, <7 x half> %b) {
604 ; CHECK-NOFP16-SD-LABEL: min_v7f16:
605 ; CHECK-NOFP16-SD: // %bb.0: // %entry
606 ; CHECK-NOFP16-SD-NEXT: mov h2, v1.h[1]
607 ; CHECK-NOFP16-SD-NEXT: mov h3, v0.h[1]
608 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h1
609 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h0
610 ; CHECK-NOFP16-SD-NEXT: mov h6, v1.h[2]
611 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[2]
612 ; CHECK-NOFP16-SD-NEXT: mov h16, v1.h[3]
613 ; CHECK-NOFP16-SD-NEXT: fcvt s2, h2
614 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h3
615 ; CHECK-NOFP16-SD-NEXT: fmin s4, s5, s4
616 ; CHECK-NOFP16-SD-NEXT: mov h5, v0.h[3]
617 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h6
618 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
619 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h16
620 ; CHECK-NOFP16-SD-NEXT: fmin s3, s3, s2
621 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h5
622 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s4
623 ; CHECK-NOFP16-SD-NEXT: fmin s4, s7, s6
624 ; CHECK-NOFP16-SD-NEXT: mov h6, v1.h[4]
625 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[4]
626 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s3
627 ; CHECK-NOFP16-SD-NEXT: fmin s5, s5, s16
628 ; CHECK-NOFP16-SD-NEXT: mov h16, v0.h[5]
629 ; CHECK-NOFP16-SD-NEXT: fcvt h4, s4
630 ; CHECK-NOFP16-SD-NEXT: mov v2.h[1], v3.h[0]
631 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h6
632 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h7
633 ; CHECK-NOFP16-SD-NEXT: mov h7, v1.h[5]
634 ; CHECK-NOFP16-SD-NEXT: fcvt h5, s5
635 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h16
636 ; CHECK-NOFP16-SD-NEXT: mov v2.h[2], v4.h[0]
637 ; CHECK-NOFP16-SD-NEXT: mov h4, v1.h[6]
638 ; CHECK-NOFP16-SD-NEXT: fmin s3, s6, s3
639 ; CHECK-NOFP16-SD-NEXT: mov h6, v0.h[6]
640 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
641 ; CHECK-NOFP16-SD-NEXT: mov h1, v1.h[7]
642 ; CHECK-NOFP16-SD-NEXT: mov h0, v0.h[7]
643 ; CHECK-NOFP16-SD-NEXT: mov v2.h[3], v5.h[0]
644 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h4
645 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s3
646 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h6
647 ; CHECK-NOFP16-SD-NEXT: fmin s6, s16, s7
648 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
649 ; CHECK-NOFP16-SD-NEXT: fcvt s0, h0
650 ; CHECK-NOFP16-SD-NEXT: mov v2.h[4], v3.h[0]
651 ; CHECK-NOFP16-SD-NEXT: fmin s4, s5, s4
652 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s6
653 ; CHECK-NOFP16-SD-NEXT: fmin s0, s0, s1
654 ; CHECK-NOFP16-SD-NEXT: mov v2.h[5], v3.h[0]
655 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s4
656 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s0
657 ; CHECK-NOFP16-SD-NEXT: mov v2.h[6], v3.h[0]
658 ; CHECK-NOFP16-SD-NEXT: mov v2.h[7], v0.h[0]
659 ; CHECK-NOFP16-SD-NEXT: mov v0.16b, v2.16b
660 ; CHECK-NOFP16-SD-NEXT: ret
662 ; CHECK-FP16-SD-LABEL: min_v7f16:
663 ; CHECK-FP16-SD: // %bb.0: // %entry
664 ; CHECK-FP16-SD-NEXT: fmin v0.8h, v0.8h, v1.8h
665 ; CHECK-FP16-SD-NEXT: ret
667 ; CHECK-NOFP16-GI-LABEL: min_v7f16:
668 ; CHECK-NOFP16-GI: // %bb.0: // %entry
669 ; CHECK-NOFP16-GI-NEXT: mov h2, v0.h[4]
670 ; CHECK-NOFP16-GI-NEXT: mov h3, v0.h[5]
671 ; CHECK-NOFP16-GI-NEXT: mov h4, v1.h[4]
672 ; CHECK-NOFP16-GI-NEXT: mov h5, v1.h[5]
673 ; CHECK-NOFP16-GI-NEXT: fcvtl v6.4s, v0.4h
674 ; CHECK-NOFP16-GI-NEXT: fcvtl v7.4s, v1.4h
675 ; CHECK-NOFP16-GI-NEXT: mov h0, v0.h[6]
676 ; CHECK-NOFP16-GI-NEXT: mov h1, v1.h[6]
677 ; CHECK-NOFP16-GI-NEXT: mov v2.h[1], v3.h[0]
678 ; CHECK-NOFP16-GI-NEXT: mov v4.h[1], v5.h[0]
679 ; CHECK-NOFP16-GI-NEXT: fmin v3.4s, v6.4s, v7.4s
680 ; CHECK-NOFP16-GI-NEXT: mov v2.h[2], v0.h[0]
681 ; CHECK-NOFP16-GI-NEXT: mov v4.h[2], v1.h[0]
682 ; CHECK-NOFP16-GI-NEXT: fcvtn v0.4h, v3.4s
683 ; CHECK-NOFP16-GI-NEXT: mov v2.h[3], v0.h[0]
684 ; CHECK-NOFP16-GI-NEXT: mov v4.h[3], v0.h[0]
685 ; CHECK-NOFP16-GI-NEXT: mov h1, v0.h[1]
686 ; CHECK-NOFP16-GI-NEXT: mov h5, v0.h[3]
687 ; CHECK-NOFP16-GI-NEXT: fcvtl v2.4s, v2.4h
688 ; CHECK-NOFP16-GI-NEXT: fcvtl v3.4s, v4.4h
689 ; CHECK-NOFP16-GI-NEXT: mov h4, v0.h[2]
690 ; CHECK-NOFP16-GI-NEXT: mov v0.h[1], v1.h[0]
691 ; CHECK-NOFP16-GI-NEXT: fmin v1.4s, v2.4s, v3.4s
692 ; CHECK-NOFP16-GI-NEXT: mov v0.h[2], v4.h[0]
693 ; CHECK-NOFP16-GI-NEXT: fcvtn v1.4h, v1.4s
694 ; CHECK-NOFP16-GI-NEXT: mov v0.h[3], v5.h[0]
695 ; CHECK-NOFP16-GI-NEXT: mov h2, v1.h[1]
696 ; CHECK-NOFP16-GI-NEXT: mov v0.h[4], v1.h[0]
697 ; CHECK-NOFP16-GI-NEXT: mov h1, v1.h[2]
698 ; CHECK-NOFP16-GI-NEXT: mov v0.h[5], v2.h[0]
699 ; CHECK-NOFP16-GI-NEXT: mov v0.h[6], v1.h[0]
700 ; CHECK-NOFP16-GI-NEXT: mov v0.h[7], v0.h[0]
701 ; CHECK-NOFP16-GI-NEXT: ret
703 ; CHECK-FP16-GI-LABEL: min_v7f16:
704 ; CHECK-FP16-GI: // %bb.0: // %entry
705 ; CHECK-FP16-GI-NEXT: fmin v0.8h, v0.8h, v1.8h
706 ; CHECK-FP16-GI-NEXT: ret
708 %c = call <7 x half> @llvm.minimum.v7f16(<7 x half> %a, <7 x half> %b)
712 define <7 x half> @max_v7f16(<7 x half> %a, <7 x half> %b) {
713 ; CHECK-NOFP16-SD-LABEL: max_v7f16:
714 ; CHECK-NOFP16-SD: // %bb.0: // %entry
715 ; CHECK-NOFP16-SD-NEXT: mov h2, v1.h[1]
716 ; CHECK-NOFP16-SD-NEXT: mov h3, v0.h[1]
717 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h1
718 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h0
719 ; CHECK-NOFP16-SD-NEXT: mov h6, v1.h[2]
720 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[2]
721 ; CHECK-NOFP16-SD-NEXT: mov h16, v1.h[3]
722 ; CHECK-NOFP16-SD-NEXT: fcvt s2, h2
723 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h3
724 ; CHECK-NOFP16-SD-NEXT: fmax s4, s5, s4
725 ; CHECK-NOFP16-SD-NEXT: mov h5, v0.h[3]
726 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h6
727 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
728 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h16
729 ; CHECK-NOFP16-SD-NEXT: fmax s3, s3, s2
730 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h5
731 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s4
732 ; CHECK-NOFP16-SD-NEXT: fmax s4, s7, s6
733 ; CHECK-NOFP16-SD-NEXT: mov h6, v1.h[4]
734 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[4]
735 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s3
736 ; CHECK-NOFP16-SD-NEXT: fmax s5, s5, s16
737 ; CHECK-NOFP16-SD-NEXT: mov h16, v0.h[5]
738 ; CHECK-NOFP16-SD-NEXT: fcvt h4, s4
739 ; CHECK-NOFP16-SD-NEXT: mov v2.h[1], v3.h[0]
740 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h6
741 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h7
742 ; CHECK-NOFP16-SD-NEXT: mov h7, v1.h[5]
743 ; CHECK-NOFP16-SD-NEXT: fcvt h5, s5
744 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h16
745 ; CHECK-NOFP16-SD-NEXT: mov v2.h[2], v4.h[0]
746 ; CHECK-NOFP16-SD-NEXT: mov h4, v1.h[6]
747 ; CHECK-NOFP16-SD-NEXT: fmax s3, s6, s3
748 ; CHECK-NOFP16-SD-NEXT: mov h6, v0.h[6]
749 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
750 ; CHECK-NOFP16-SD-NEXT: mov h1, v1.h[7]
751 ; CHECK-NOFP16-SD-NEXT: mov h0, v0.h[7]
752 ; CHECK-NOFP16-SD-NEXT: mov v2.h[3], v5.h[0]
753 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h4
754 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s3
755 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h6
756 ; CHECK-NOFP16-SD-NEXT: fmax s6, s16, s7
757 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
758 ; CHECK-NOFP16-SD-NEXT: fcvt s0, h0
759 ; CHECK-NOFP16-SD-NEXT: mov v2.h[4], v3.h[0]
760 ; CHECK-NOFP16-SD-NEXT: fmax s4, s5, s4
761 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s6
762 ; CHECK-NOFP16-SD-NEXT: fmax s0, s0, s1
763 ; CHECK-NOFP16-SD-NEXT: mov v2.h[5], v3.h[0]
764 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s4
765 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s0
766 ; CHECK-NOFP16-SD-NEXT: mov v2.h[6], v3.h[0]
767 ; CHECK-NOFP16-SD-NEXT: mov v2.h[7], v0.h[0]
768 ; CHECK-NOFP16-SD-NEXT: mov v0.16b, v2.16b
769 ; CHECK-NOFP16-SD-NEXT: ret
771 ; CHECK-FP16-SD-LABEL: max_v7f16:
772 ; CHECK-FP16-SD: // %bb.0: // %entry
773 ; CHECK-FP16-SD-NEXT: fmax v0.8h, v0.8h, v1.8h
774 ; CHECK-FP16-SD-NEXT: ret
776 ; CHECK-NOFP16-GI-LABEL: max_v7f16:
777 ; CHECK-NOFP16-GI: // %bb.0: // %entry
778 ; CHECK-NOFP16-GI-NEXT: mov h2, v0.h[4]
779 ; CHECK-NOFP16-GI-NEXT: mov h3, v0.h[5]
780 ; CHECK-NOFP16-GI-NEXT: mov h4, v1.h[4]
781 ; CHECK-NOFP16-GI-NEXT: mov h5, v1.h[5]
782 ; CHECK-NOFP16-GI-NEXT: fcvtl v6.4s, v0.4h
783 ; CHECK-NOFP16-GI-NEXT: fcvtl v7.4s, v1.4h
784 ; CHECK-NOFP16-GI-NEXT: mov h0, v0.h[6]
785 ; CHECK-NOFP16-GI-NEXT: mov h1, v1.h[6]
786 ; CHECK-NOFP16-GI-NEXT: mov v2.h[1], v3.h[0]
787 ; CHECK-NOFP16-GI-NEXT: mov v4.h[1], v5.h[0]
788 ; CHECK-NOFP16-GI-NEXT: fmax v3.4s, v6.4s, v7.4s
789 ; CHECK-NOFP16-GI-NEXT: mov v2.h[2], v0.h[0]
790 ; CHECK-NOFP16-GI-NEXT: mov v4.h[2], v1.h[0]
791 ; CHECK-NOFP16-GI-NEXT: fcvtn v0.4h, v3.4s
792 ; CHECK-NOFP16-GI-NEXT: mov v2.h[3], v0.h[0]
793 ; CHECK-NOFP16-GI-NEXT: mov v4.h[3], v0.h[0]
794 ; CHECK-NOFP16-GI-NEXT: mov h1, v0.h[1]
795 ; CHECK-NOFP16-GI-NEXT: mov h5, v0.h[3]
796 ; CHECK-NOFP16-GI-NEXT: fcvtl v2.4s, v2.4h
797 ; CHECK-NOFP16-GI-NEXT: fcvtl v3.4s, v4.4h
798 ; CHECK-NOFP16-GI-NEXT: mov h4, v0.h[2]
799 ; CHECK-NOFP16-GI-NEXT: mov v0.h[1], v1.h[0]
800 ; CHECK-NOFP16-GI-NEXT: fmax v1.4s, v2.4s, v3.4s
801 ; CHECK-NOFP16-GI-NEXT: mov v0.h[2], v4.h[0]
802 ; CHECK-NOFP16-GI-NEXT: fcvtn v1.4h, v1.4s
803 ; CHECK-NOFP16-GI-NEXT: mov v0.h[3], v5.h[0]
804 ; CHECK-NOFP16-GI-NEXT: mov h2, v1.h[1]
805 ; CHECK-NOFP16-GI-NEXT: mov v0.h[4], v1.h[0]
806 ; CHECK-NOFP16-GI-NEXT: mov h1, v1.h[2]
807 ; CHECK-NOFP16-GI-NEXT: mov v0.h[5], v2.h[0]
808 ; CHECK-NOFP16-GI-NEXT: mov v0.h[6], v1.h[0]
809 ; CHECK-NOFP16-GI-NEXT: mov v0.h[7], v0.h[0]
810 ; CHECK-NOFP16-GI-NEXT: ret
812 ; CHECK-FP16-GI-LABEL: max_v7f16:
813 ; CHECK-FP16-GI: // %bb.0: // %entry
814 ; CHECK-FP16-GI-NEXT: fmax v0.8h, v0.8h, v1.8h
815 ; CHECK-FP16-GI-NEXT: ret
817 %c = call <7 x half> @llvm.maximum.v7f16(<7 x half> %a, <7 x half> %b)
821 define <8 x half> @min_v8f16(<8 x half> %a, <8 x half> %b) {
822 ; CHECK-NOFP16-SD-LABEL: min_v8f16:
823 ; CHECK-NOFP16-SD: // %bb.0: // %entry
824 ; CHECK-NOFP16-SD-NEXT: mov h2, v1.h[1]
825 ; CHECK-NOFP16-SD-NEXT: mov h3, v0.h[1]
826 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h1
827 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h0
828 ; CHECK-NOFP16-SD-NEXT: mov h6, v1.h[2]
829 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[2]
830 ; CHECK-NOFP16-SD-NEXT: mov h16, v1.h[3]
831 ; CHECK-NOFP16-SD-NEXT: fcvt s2, h2
832 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h3
833 ; CHECK-NOFP16-SD-NEXT: fmin s4, s5, s4
834 ; CHECK-NOFP16-SD-NEXT: mov h5, v0.h[3]
835 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h6
836 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
837 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h16
838 ; CHECK-NOFP16-SD-NEXT: fmin s3, s3, s2
839 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h5
840 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s4
841 ; CHECK-NOFP16-SD-NEXT: fmin s4, s7, s6
842 ; CHECK-NOFP16-SD-NEXT: mov h6, v1.h[4]
843 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[4]
844 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s3
845 ; CHECK-NOFP16-SD-NEXT: fmin s5, s5, s16
846 ; CHECK-NOFP16-SD-NEXT: mov h16, v0.h[5]
847 ; CHECK-NOFP16-SD-NEXT: fcvt h4, s4
848 ; CHECK-NOFP16-SD-NEXT: mov v2.h[1], v3.h[0]
849 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h6
850 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h7
851 ; CHECK-NOFP16-SD-NEXT: mov h7, v1.h[5]
852 ; CHECK-NOFP16-SD-NEXT: fcvt h5, s5
853 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h16
854 ; CHECK-NOFP16-SD-NEXT: mov v2.h[2], v4.h[0]
855 ; CHECK-NOFP16-SD-NEXT: mov h4, v1.h[6]
856 ; CHECK-NOFP16-SD-NEXT: fmin s3, s6, s3
857 ; CHECK-NOFP16-SD-NEXT: mov h6, v0.h[6]
858 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
859 ; CHECK-NOFP16-SD-NEXT: mov h1, v1.h[7]
860 ; CHECK-NOFP16-SD-NEXT: mov h0, v0.h[7]
861 ; CHECK-NOFP16-SD-NEXT: mov v2.h[3], v5.h[0]
862 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h4
863 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s3
864 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h6
865 ; CHECK-NOFP16-SD-NEXT: fmin s6, s16, s7
866 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
867 ; CHECK-NOFP16-SD-NEXT: fcvt s0, h0
868 ; CHECK-NOFP16-SD-NEXT: mov v2.h[4], v3.h[0]
869 ; CHECK-NOFP16-SD-NEXT: fmin s4, s5, s4
870 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s6
871 ; CHECK-NOFP16-SD-NEXT: fmin s0, s0, s1
872 ; CHECK-NOFP16-SD-NEXT: mov v2.h[5], v3.h[0]
873 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s4
874 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s0
875 ; CHECK-NOFP16-SD-NEXT: mov v2.h[6], v3.h[0]
876 ; CHECK-NOFP16-SD-NEXT: mov v2.h[7], v0.h[0]
877 ; CHECK-NOFP16-SD-NEXT: mov v0.16b, v2.16b
878 ; CHECK-NOFP16-SD-NEXT: ret
880 ; CHECK-FP16-SD-LABEL: min_v8f16:
881 ; CHECK-FP16-SD: // %bb.0: // %entry
882 ; CHECK-FP16-SD-NEXT: fmin v0.8h, v0.8h, v1.8h
883 ; CHECK-FP16-SD-NEXT: ret
885 ; CHECK-NOFP16-GI-LABEL: min_v8f16:
886 ; CHECK-NOFP16-GI: // %bb.0: // %entry
887 ; CHECK-NOFP16-GI-NEXT: fcvtl v2.4s, v0.4h
888 ; CHECK-NOFP16-GI-NEXT: fcvtl v3.4s, v1.4h
889 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v0.4s, v0.8h
890 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v1.4s, v1.8h
891 ; CHECK-NOFP16-GI-NEXT: fmin v2.4s, v2.4s, v3.4s
892 ; CHECK-NOFP16-GI-NEXT: fmin v1.4s, v0.4s, v1.4s
893 ; CHECK-NOFP16-GI-NEXT: fcvtn v0.4h, v2.4s
894 ; CHECK-NOFP16-GI-NEXT: fcvtn2 v0.8h, v1.4s
895 ; CHECK-NOFP16-GI-NEXT: ret
897 ; CHECK-FP16-GI-LABEL: min_v8f16:
898 ; CHECK-FP16-GI: // %bb.0: // %entry
899 ; CHECK-FP16-GI-NEXT: fmin v0.8h, v0.8h, v1.8h
900 ; CHECK-FP16-GI-NEXT: ret
902 %c = call <8 x half> @llvm.minimum.v8f16(<8 x half> %a, <8 x half> %b)
906 define <8 x half> @max_v8f16(<8 x half> %a, <8 x half> %b) {
907 ; CHECK-NOFP16-SD-LABEL: max_v8f16:
908 ; CHECK-NOFP16-SD: // %bb.0: // %entry
909 ; CHECK-NOFP16-SD-NEXT: mov h2, v1.h[1]
910 ; CHECK-NOFP16-SD-NEXT: mov h3, v0.h[1]
911 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h1
912 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h0
913 ; CHECK-NOFP16-SD-NEXT: mov h6, v1.h[2]
914 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[2]
915 ; CHECK-NOFP16-SD-NEXT: mov h16, v1.h[3]
916 ; CHECK-NOFP16-SD-NEXT: fcvt s2, h2
917 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h3
918 ; CHECK-NOFP16-SD-NEXT: fmax s4, s5, s4
919 ; CHECK-NOFP16-SD-NEXT: mov h5, v0.h[3]
920 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h6
921 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
922 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h16
923 ; CHECK-NOFP16-SD-NEXT: fmax s3, s3, s2
924 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h5
925 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s4
926 ; CHECK-NOFP16-SD-NEXT: fmax s4, s7, s6
927 ; CHECK-NOFP16-SD-NEXT: mov h6, v1.h[4]
928 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[4]
929 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s3
930 ; CHECK-NOFP16-SD-NEXT: fmax s5, s5, s16
931 ; CHECK-NOFP16-SD-NEXT: mov h16, v0.h[5]
932 ; CHECK-NOFP16-SD-NEXT: fcvt h4, s4
933 ; CHECK-NOFP16-SD-NEXT: mov v2.h[1], v3.h[0]
934 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h6
935 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h7
936 ; CHECK-NOFP16-SD-NEXT: mov h7, v1.h[5]
937 ; CHECK-NOFP16-SD-NEXT: fcvt h5, s5
938 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h16
939 ; CHECK-NOFP16-SD-NEXT: mov v2.h[2], v4.h[0]
940 ; CHECK-NOFP16-SD-NEXT: mov h4, v1.h[6]
941 ; CHECK-NOFP16-SD-NEXT: fmax s3, s6, s3
942 ; CHECK-NOFP16-SD-NEXT: mov h6, v0.h[6]
943 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
944 ; CHECK-NOFP16-SD-NEXT: mov h1, v1.h[7]
945 ; CHECK-NOFP16-SD-NEXT: mov h0, v0.h[7]
946 ; CHECK-NOFP16-SD-NEXT: mov v2.h[3], v5.h[0]
947 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h4
948 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s3
949 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h6
950 ; CHECK-NOFP16-SD-NEXT: fmax s6, s16, s7
951 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
952 ; CHECK-NOFP16-SD-NEXT: fcvt s0, h0
953 ; CHECK-NOFP16-SD-NEXT: mov v2.h[4], v3.h[0]
954 ; CHECK-NOFP16-SD-NEXT: fmax s4, s5, s4
955 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s6
956 ; CHECK-NOFP16-SD-NEXT: fmax s0, s0, s1
957 ; CHECK-NOFP16-SD-NEXT: mov v2.h[5], v3.h[0]
958 ; CHECK-NOFP16-SD-NEXT: fcvt h3, s4
959 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s0
960 ; CHECK-NOFP16-SD-NEXT: mov v2.h[6], v3.h[0]
961 ; CHECK-NOFP16-SD-NEXT: mov v2.h[7], v0.h[0]
962 ; CHECK-NOFP16-SD-NEXT: mov v0.16b, v2.16b
963 ; CHECK-NOFP16-SD-NEXT: ret
965 ; CHECK-FP16-SD-LABEL: max_v8f16:
966 ; CHECK-FP16-SD: // %bb.0: // %entry
967 ; CHECK-FP16-SD-NEXT: fmax v0.8h, v0.8h, v1.8h
968 ; CHECK-FP16-SD-NEXT: ret
970 ; CHECK-NOFP16-GI-LABEL: max_v8f16:
971 ; CHECK-NOFP16-GI: // %bb.0: // %entry
972 ; CHECK-NOFP16-GI-NEXT: fcvtl v2.4s, v0.4h
973 ; CHECK-NOFP16-GI-NEXT: fcvtl v3.4s, v1.4h
974 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v0.4s, v0.8h
975 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v1.4s, v1.8h
976 ; CHECK-NOFP16-GI-NEXT: fmax v2.4s, v2.4s, v3.4s
977 ; CHECK-NOFP16-GI-NEXT: fmax v1.4s, v0.4s, v1.4s
978 ; CHECK-NOFP16-GI-NEXT: fcvtn v0.4h, v2.4s
979 ; CHECK-NOFP16-GI-NEXT: fcvtn2 v0.8h, v1.4s
980 ; CHECK-NOFP16-GI-NEXT: ret
982 ; CHECK-FP16-GI-LABEL: max_v8f16:
983 ; CHECK-FP16-GI: // %bb.0: // %entry
984 ; CHECK-FP16-GI-NEXT: fmax v0.8h, v0.8h, v1.8h
985 ; CHECK-FP16-GI-NEXT: ret
987 %c = call <8 x half> @llvm.maximum.v8f16(<8 x half> %a, <8 x half> %b)
991 define <16 x half> @min_v16f16(<16 x half> %a, <16 x half> %b) {
992 ; CHECK-NOFP16-SD-LABEL: min_v16f16:
993 ; CHECK-NOFP16-SD: // %bb.0: // %entry
994 ; CHECK-NOFP16-SD-NEXT: mov h6, v2.h[1]
995 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[1]
996 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h2
997 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h0
998 ; CHECK-NOFP16-SD-NEXT: mov h16, v3.h[1]
999 ; CHECK-NOFP16-SD-NEXT: mov h17, v1.h[1]
1000 ; CHECK-NOFP16-SD-NEXT: mov h18, v2.h[2]
1001 ; CHECK-NOFP16-SD-NEXT: mov h19, v0.h[2]
1002 ; CHECK-NOFP16-SD-NEXT: fcvt s20, h3
1003 ; CHECK-NOFP16-SD-NEXT: fcvt s21, h1
1004 ; CHECK-NOFP16-SD-NEXT: mov h22, v3.h[2]
1005 ; CHECK-NOFP16-SD-NEXT: mov h23, v1.h[2]
1006 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h6
1007 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
1008 ; CHECK-NOFP16-SD-NEXT: mov h24, v0.h[6]
1009 ; CHECK-NOFP16-SD-NEXT: fmin s4, s5, s4
1010 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h16
1011 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h17
1012 ; CHECK-NOFP16-SD-NEXT: fcvt s17, h18
1013 ; CHECK-NOFP16-SD-NEXT: fcvt s18, h19
1014 ; CHECK-NOFP16-SD-NEXT: mov h19, v0.h[3]
1015 ; CHECK-NOFP16-SD-NEXT: fmin s20, s21, s20
1016 ; CHECK-NOFP16-SD-NEXT: fcvt s21, h22
1017 ; CHECK-NOFP16-SD-NEXT: mov h22, v3.h[3]
1018 ; CHECK-NOFP16-SD-NEXT: fmin s6, s7, s6
1019 ; CHECK-NOFP16-SD-NEXT: mov h7, v2.h[3]
1020 ; CHECK-NOFP16-SD-NEXT: mov h25, v1.h[6]
1021 ; CHECK-NOFP16-SD-NEXT: fcvt h4, s4
1022 ; CHECK-NOFP16-SD-NEXT: fmin s5, s16, s5
1023 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h23
1024 ; CHECK-NOFP16-SD-NEXT: mov h23, v1.h[3]
1025 ; CHECK-NOFP16-SD-NEXT: fmin s17, s18, s17
1026 ; CHECK-NOFP16-SD-NEXT: fcvt s18, h19
1027 ; CHECK-NOFP16-SD-NEXT: fcvt h6, s6
1028 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
1029 ; CHECK-NOFP16-SD-NEXT: fcvt h19, s5
1030 ; CHECK-NOFP16-SD-NEXT: fcvt h5, s20
1031 ; CHECK-NOFP16-SD-NEXT: fmin s16, s16, s21
1032 ; CHECK-NOFP16-SD-NEXT: fcvt s20, h23
1033 ; CHECK-NOFP16-SD-NEXT: fcvt h17, s17
1034 ; CHECK-NOFP16-SD-NEXT: mov h21, v2.h[4]
1035 ; CHECK-NOFP16-SD-NEXT: mov h23, v1.h[4]
1036 ; CHECK-NOFP16-SD-NEXT: mov v4.h[1], v6.h[0]
1037 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h22
1038 ; CHECK-NOFP16-SD-NEXT: mov h22, v0.h[4]
1039 ; CHECK-NOFP16-SD-NEXT: fmin s7, s18, s7
1040 ; CHECK-NOFP16-SD-NEXT: mov h18, v3.h[4]
1041 ; CHECK-NOFP16-SD-NEXT: mov v5.h[1], v19.h[0]
1042 ; CHECK-NOFP16-SD-NEXT: fcvt h16, s16
1043 ; CHECK-NOFP16-SD-NEXT: fmin s6, s20, s6
1044 ; CHECK-NOFP16-SD-NEXT: mov v4.h[2], v17.h[0]
1045 ; CHECK-NOFP16-SD-NEXT: fcvt s17, h21
1046 ; CHECK-NOFP16-SD-NEXT: fcvt s19, h22
1047 ; CHECK-NOFP16-SD-NEXT: fcvt h7, s7
1048 ; CHECK-NOFP16-SD-NEXT: fcvt s18, h18
1049 ; CHECK-NOFP16-SD-NEXT: fcvt s20, h23
1050 ; CHECK-NOFP16-SD-NEXT: mov h21, v2.h[5]
1051 ; CHECK-NOFP16-SD-NEXT: mov h22, v0.h[5]
1052 ; CHECK-NOFP16-SD-NEXT: mov v5.h[2], v16.h[0]
1053 ; CHECK-NOFP16-SD-NEXT: mov h16, v3.h[5]
1054 ; CHECK-NOFP16-SD-NEXT: mov h23, v1.h[5]
1055 ; CHECK-NOFP16-SD-NEXT: fcvt h6, s6
1056 ; CHECK-NOFP16-SD-NEXT: mov h0, v0.h[7]
1057 ; CHECK-NOFP16-SD-NEXT: mov h1, v1.h[7]
1058 ; CHECK-NOFP16-SD-NEXT: fmin s17, s19, s17
1059 ; CHECK-NOFP16-SD-NEXT: mov h19, v2.h[6]
1060 ; CHECK-NOFP16-SD-NEXT: mov v4.h[3], v7.h[0]
1061 ; CHECK-NOFP16-SD-NEXT: fmin s18, s20, s18
1062 ; CHECK-NOFP16-SD-NEXT: mov h20, v3.h[6]
1063 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h21
1064 ; CHECK-NOFP16-SD-NEXT: fcvt s21, h22
1065 ; CHECK-NOFP16-SD-NEXT: fcvt s22, h24
1066 ; CHECK-NOFP16-SD-NEXT: mov h2, v2.h[7]
1067 ; CHECK-NOFP16-SD-NEXT: mov v5.h[3], v6.h[0]
1068 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h16
1069 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h23
1070 ; CHECK-NOFP16-SD-NEXT: fcvt h17, s17
1071 ; CHECK-NOFP16-SD-NEXT: fcvt s19, h19
1072 ; CHECK-NOFP16-SD-NEXT: fcvt s23, h25
1073 ; CHECK-NOFP16-SD-NEXT: fcvt h18, s18
1074 ; CHECK-NOFP16-SD-NEXT: fcvt s20, h20
1075 ; CHECK-NOFP16-SD-NEXT: mov h3, v3.h[7]
1076 ; CHECK-NOFP16-SD-NEXT: fmin s7, s21, s7
1077 ; CHECK-NOFP16-SD-NEXT: fcvt s2, h2
1078 ; CHECK-NOFP16-SD-NEXT: fcvt s0, h0
1079 ; CHECK-NOFP16-SD-NEXT: fmin s6, s16, s6
1080 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
1081 ; CHECK-NOFP16-SD-NEXT: mov v4.h[4], v17.h[0]
1082 ; CHECK-NOFP16-SD-NEXT: fmin s16, s22, s19
1083 ; CHECK-NOFP16-SD-NEXT: mov v5.h[4], v18.h[0]
1084 ; CHECK-NOFP16-SD-NEXT: fmin s17, s23, s20
1085 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h3
1086 ; CHECK-NOFP16-SD-NEXT: fcvt h7, s7
1087 ; CHECK-NOFP16-SD-NEXT: fmin s0, s0, s2
1088 ; CHECK-NOFP16-SD-NEXT: fcvt h6, s6
1089 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s16
1090 ; CHECK-NOFP16-SD-NEXT: fmin s1, s1, s3
1091 ; CHECK-NOFP16-SD-NEXT: mov v4.h[5], v7.h[0]
1092 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s0
1093 ; CHECK-NOFP16-SD-NEXT: mov v5.h[5], v6.h[0]
1094 ; CHECK-NOFP16-SD-NEXT: fcvt h6, s17
1095 ; CHECK-NOFP16-SD-NEXT: fcvt h1, s1
1096 ; CHECK-NOFP16-SD-NEXT: mov v4.h[6], v2.h[0]
1097 ; CHECK-NOFP16-SD-NEXT: mov v5.h[6], v6.h[0]
1098 ; CHECK-NOFP16-SD-NEXT: mov v4.h[7], v0.h[0]
1099 ; CHECK-NOFP16-SD-NEXT: mov v5.h[7], v1.h[0]
1100 ; CHECK-NOFP16-SD-NEXT: mov v0.16b, v4.16b
1101 ; CHECK-NOFP16-SD-NEXT: mov v1.16b, v5.16b
1102 ; CHECK-NOFP16-SD-NEXT: ret
1104 ; CHECK-FP16-SD-LABEL: min_v16f16:
1105 ; CHECK-FP16-SD: // %bb.0: // %entry
1106 ; CHECK-FP16-SD-NEXT: fmin v1.8h, v1.8h, v3.8h
1107 ; CHECK-FP16-SD-NEXT: fmin v0.8h, v0.8h, v2.8h
1108 ; CHECK-FP16-SD-NEXT: ret
1110 ; CHECK-NOFP16-GI-LABEL: min_v16f16:
1111 ; CHECK-NOFP16-GI: // %bb.0: // %entry
1112 ; CHECK-NOFP16-GI-NEXT: fcvtl v4.4s, v0.4h
1113 ; CHECK-NOFP16-GI-NEXT: fcvtl v5.4s, v1.4h
1114 ; CHECK-NOFP16-GI-NEXT: fcvtl v6.4s, v2.4h
1115 ; CHECK-NOFP16-GI-NEXT: fcvtl v7.4s, v3.4h
1116 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v0.4s, v0.8h
1117 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v1.4s, v1.8h
1118 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v2.4s, v2.8h
1119 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v3.4s, v3.8h
1120 ; CHECK-NOFP16-GI-NEXT: fmin v4.4s, v4.4s, v6.4s
1121 ; CHECK-NOFP16-GI-NEXT: fmin v5.4s, v5.4s, v7.4s
1122 ; CHECK-NOFP16-GI-NEXT: fmin v2.4s, v0.4s, v2.4s
1123 ; CHECK-NOFP16-GI-NEXT: fmin v3.4s, v1.4s, v3.4s
1124 ; CHECK-NOFP16-GI-NEXT: fcvtn v0.4h, v4.4s
1125 ; CHECK-NOFP16-GI-NEXT: fcvtn v1.4h, v5.4s
1126 ; CHECK-NOFP16-GI-NEXT: fcvtn2 v0.8h, v2.4s
1127 ; CHECK-NOFP16-GI-NEXT: fcvtn2 v1.8h, v3.4s
1128 ; CHECK-NOFP16-GI-NEXT: ret
1130 ; CHECK-FP16-GI-LABEL: min_v16f16:
1131 ; CHECK-FP16-GI: // %bb.0: // %entry
1132 ; CHECK-FP16-GI-NEXT: fmin v0.8h, v0.8h, v2.8h
1133 ; CHECK-FP16-GI-NEXT: fmin v1.8h, v1.8h, v3.8h
1134 ; CHECK-FP16-GI-NEXT: ret
1136 %c = call <16 x half> @llvm.minimum.v16f16(<16 x half> %a, <16 x half> %b)
1140 define <16 x half> @max_v16f16(<16 x half> %a, <16 x half> %b) {
1141 ; CHECK-NOFP16-SD-LABEL: max_v16f16:
1142 ; CHECK-NOFP16-SD: // %bb.0: // %entry
1143 ; CHECK-NOFP16-SD-NEXT: mov h6, v2.h[1]
1144 ; CHECK-NOFP16-SD-NEXT: mov h7, v0.h[1]
1145 ; CHECK-NOFP16-SD-NEXT: fcvt s4, h2
1146 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h0
1147 ; CHECK-NOFP16-SD-NEXT: mov h16, v3.h[1]
1148 ; CHECK-NOFP16-SD-NEXT: mov h17, v1.h[1]
1149 ; CHECK-NOFP16-SD-NEXT: mov h18, v2.h[2]
1150 ; CHECK-NOFP16-SD-NEXT: mov h19, v0.h[2]
1151 ; CHECK-NOFP16-SD-NEXT: fcvt s20, h3
1152 ; CHECK-NOFP16-SD-NEXT: fcvt s21, h1
1153 ; CHECK-NOFP16-SD-NEXT: mov h22, v3.h[2]
1154 ; CHECK-NOFP16-SD-NEXT: mov h23, v1.h[2]
1155 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h6
1156 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
1157 ; CHECK-NOFP16-SD-NEXT: mov h24, v0.h[6]
1158 ; CHECK-NOFP16-SD-NEXT: fmax s4, s5, s4
1159 ; CHECK-NOFP16-SD-NEXT: fcvt s5, h16
1160 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h17
1161 ; CHECK-NOFP16-SD-NEXT: fcvt s17, h18
1162 ; CHECK-NOFP16-SD-NEXT: fcvt s18, h19
1163 ; CHECK-NOFP16-SD-NEXT: mov h19, v0.h[3]
1164 ; CHECK-NOFP16-SD-NEXT: fmax s20, s21, s20
1165 ; CHECK-NOFP16-SD-NEXT: fcvt s21, h22
1166 ; CHECK-NOFP16-SD-NEXT: mov h22, v3.h[3]
1167 ; CHECK-NOFP16-SD-NEXT: fmax s6, s7, s6
1168 ; CHECK-NOFP16-SD-NEXT: mov h7, v2.h[3]
1169 ; CHECK-NOFP16-SD-NEXT: mov h25, v1.h[6]
1170 ; CHECK-NOFP16-SD-NEXT: fcvt h4, s4
1171 ; CHECK-NOFP16-SD-NEXT: fmax s5, s16, s5
1172 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h23
1173 ; CHECK-NOFP16-SD-NEXT: mov h23, v1.h[3]
1174 ; CHECK-NOFP16-SD-NEXT: fmax s17, s18, s17
1175 ; CHECK-NOFP16-SD-NEXT: fcvt s18, h19
1176 ; CHECK-NOFP16-SD-NEXT: fcvt h6, s6
1177 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h7
1178 ; CHECK-NOFP16-SD-NEXT: fcvt h19, s5
1179 ; CHECK-NOFP16-SD-NEXT: fcvt h5, s20
1180 ; CHECK-NOFP16-SD-NEXT: fmax s16, s16, s21
1181 ; CHECK-NOFP16-SD-NEXT: fcvt s20, h23
1182 ; CHECK-NOFP16-SD-NEXT: fcvt h17, s17
1183 ; CHECK-NOFP16-SD-NEXT: mov h21, v2.h[4]
1184 ; CHECK-NOFP16-SD-NEXT: mov h23, v1.h[4]
1185 ; CHECK-NOFP16-SD-NEXT: mov v4.h[1], v6.h[0]
1186 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h22
1187 ; CHECK-NOFP16-SD-NEXT: mov h22, v0.h[4]
1188 ; CHECK-NOFP16-SD-NEXT: fmax s7, s18, s7
1189 ; CHECK-NOFP16-SD-NEXT: mov h18, v3.h[4]
1190 ; CHECK-NOFP16-SD-NEXT: mov v5.h[1], v19.h[0]
1191 ; CHECK-NOFP16-SD-NEXT: fcvt h16, s16
1192 ; CHECK-NOFP16-SD-NEXT: fmax s6, s20, s6
1193 ; CHECK-NOFP16-SD-NEXT: mov v4.h[2], v17.h[0]
1194 ; CHECK-NOFP16-SD-NEXT: fcvt s17, h21
1195 ; CHECK-NOFP16-SD-NEXT: fcvt s19, h22
1196 ; CHECK-NOFP16-SD-NEXT: fcvt h7, s7
1197 ; CHECK-NOFP16-SD-NEXT: fcvt s18, h18
1198 ; CHECK-NOFP16-SD-NEXT: fcvt s20, h23
1199 ; CHECK-NOFP16-SD-NEXT: mov h21, v2.h[5]
1200 ; CHECK-NOFP16-SD-NEXT: mov h22, v0.h[5]
1201 ; CHECK-NOFP16-SD-NEXT: mov v5.h[2], v16.h[0]
1202 ; CHECK-NOFP16-SD-NEXT: mov h16, v3.h[5]
1203 ; CHECK-NOFP16-SD-NEXT: mov h23, v1.h[5]
1204 ; CHECK-NOFP16-SD-NEXT: fcvt h6, s6
1205 ; CHECK-NOFP16-SD-NEXT: mov h0, v0.h[7]
1206 ; CHECK-NOFP16-SD-NEXT: mov h1, v1.h[7]
1207 ; CHECK-NOFP16-SD-NEXT: fmax s17, s19, s17
1208 ; CHECK-NOFP16-SD-NEXT: mov h19, v2.h[6]
1209 ; CHECK-NOFP16-SD-NEXT: mov v4.h[3], v7.h[0]
1210 ; CHECK-NOFP16-SD-NEXT: fmax s18, s20, s18
1211 ; CHECK-NOFP16-SD-NEXT: mov h20, v3.h[6]
1212 ; CHECK-NOFP16-SD-NEXT: fcvt s7, h21
1213 ; CHECK-NOFP16-SD-NEXT: fcvt s21, h22
1214 ; CHECK-NOFP16-SD-NEXT: fcvt s22, h24
1215 ; CHECK-NOFP16-SD-NEXT: mov h2, v2.h[7]
1216 ; CHECK-NOFP16-SD-NEXT: mov v5.h[3], v6.h[0]
1217 ; CHECK-NOFP16-SD-NEXT: fcvt s6, h16
1218 ; CHECK-NOFP16-SD-NEXT: fcvt s16, h23
1219 ; CHECK-NOFP16-SD-NEXT: fcvt h17, s17
1220 ; CHECK-NOFP16-SD-NEXT: fcvt s19, h19
1221 ; CHECK-NOFP16-SD-NEXT: fcvt s23, h25
1222 ; CHECK-NOFP16-SD-NEXT: fcvt h18, s18
1223 ; CHECK-NOFP16-SD-NEXT: fcvt s20, h20
1224 ; CHECK-NOFP16-SD-NEXT: mov h3, v3.h[7]
1225 ; CHECK-NOFP16-SD-NEXT: fmax s7, s21, s7
1226 ; CHECK-NOFP16-SD-NEXT: fcvt s2, h2
1227 ; CHECK-NOFP16-SD-NEXT: fcvt s0, h0
1228 ; CHECK-NOFP16-SD-NEXT: fmax s6, s16, s6
1229 ; CHECK-NOFP16-SD-NEXT: fcvt s1, h1
1230 ; CHECK-NOFP16-SD-NEXT: mov v4.h[4], v17.h[0]
1231 ; CHECK-NOFP16-SD-NEXT: fmax s16, s22, s19
1232 ; CHECK-NOFP16-SD-NEXT: mov v5.h[4], v18.h[0]
1233 ; CHECK-NOFP16-SD-NEXT: fmax s17, s23, s20
1234 ; CHECK-NOFP16-SD-NEXT: fcvt s3, h3
1235 ; CHECK-NOFP16-SD-NEXT: fcvt h7, s7
1236 ; CHECK-NOFP16-SD-NEXT: fmax s0, s0, s2
1237 ; CHECK-NOFP16-SD-NEXT: fcvt h6, s6
1238 ; CHECK-NOFP16-SD-NEXT: fcvt h2, s16
1239 ; CHECK-NOFP16-SD-NEXT: fmax s1, s1, s3
1240 ; CHECK-NOFP16-SD-NEXT: mov v4.h[5], v7.h[0]
1241 ; CHECK-NOFP16-SD-NEXT: fcvt h0, s0
1242 ; CHECK-NOFP16-SD-NEXT: mov v5.h[5], v6.h[0]
1243 ; CHECK-NOFP16-SD-NEXT: fcvt h6, s17
1244 ; CHECK-NOFP16-SD-NEXT: fcvt h1, s1
1245 ; CHECK-NOFP16-SD-NEXT: mov v4.h[6], v2.h[0]
1246 ; CHECK-NOFP16-SD-NEXT: mov v5.h[6], v6.h[0]
1247 ; CHECK-NOFP16-SD-NEXT: mov v4.h[7], v0.h[0]
1248 ; CHECK-NOFP16-SD-NEXT: mov v5.h[7], v1.h[0]
1249 ; CHECK-NOFP16-SD-NEXT: mov v0.16b, v4.16b
1250 ; CHECK-NOFP16-SD-NEXT: mov v1.16b, v5.16b
1251 ; CHECK-NOFP16-SD-NEXT: ret
1253 ; CHECK-FP16-SD-LABEL: max_v16f16:
1254 ; CHECK-FP16-SD: // %bb.0: // %entry
1255 ; CHECK-FP16-SD-NEXT: fmax v1.8h, v1.8h, v3.8h
1256 ; CHECK-FP16-SD-NEXT: fmax v0.8h, v0.8h, v2.8h
1257 ; CHECK-FP16-SD-NEXT: ret
1259 ; CHECK-NOFP16-GI-LABEL: max_v16f16:
1260 ; CHECK-NOFP16-GI: // %bb.0: // %entry
1261 ; CHECK-NOFP16-GI-NEXT: fcvtl v4.4s, v0.4h
1262 ; CHECK-NOFP16-GI-NEXT: fcvtl v5.4s, v1.4h
1263 ; CHECK-NOFP16-GI-NEXT: fcvtl v6.4s, v2.4h
1264 ; CHECK-NOFP16-GI-NEXT: fcvtl v7.4s, v3.4h
1265 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v0.4s, v0.8h
1266 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v1.4s, v1.8h
1267 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v2.4s, v2.8h
1268 ; CHECK-NOFP16-GI-NEXT: fcvtl2 v3.4s, v3.8h
1269 ; CHECK-NOFP16-GI-NEXT: fmax v4.4s, v4.4s, v6.4s
1270 ; CHECK-NOFP16-GI-NEXT: fmax v5.4s, v5.4s, v7.4s
1271 ; CHECK-NOFP16-GI-NEXT: fmax v2.4s, v0.4s, v2.4s
1272 ; CHECK-NOFP16-GI-NEXT: fmax v3.4s, v1.4s, v3.4s
1273 ; CHECK-NOFP16-GI-NEXT: fcvtn v0.4h, v4.4s
1274 ; CHECK-NOFP16-GI-NEXT: fcvtn v1.4h, v5.4s
1275 ; CHECK-NOFP16-GI-NEXT: fcvtn2 v0.8h, v2.4s
1276 ; CHECK-NOFP16-GI-NEXT: fcvtn2 v1.8h, v3.4s
1277 ; CHECK-NOFP16-GI-NEXT: ret
1279 ; CHECK-FP16-GI-LABEL: max_v16f16:
1280 ; CHECK-FP16-GI: // %bb.0: // %entry
1281 ; CHECK-FP16-GI-NEXT: fmax v0.8h, v0.8h, v2.8h
1282 ; CHECK-FP16-GI-NEXT: fmax v1.8h, v1.8h, v3.8h
1283 ; CHECK-FP16-GI-NEXT: ret
1285 %c = call <16 x half> @llvm.maximum.v16f16(<16 x half> %a, <16 x half> %b)
1289 declare <16 x half> @llvm.maximum.v16f16(<16 x half>, <16 x half>)
1290 declare <16 x half> @llvm.minimum.v16f16(<16 x half>, <16 x half>)
1291 declare <2 x double> @llvm.maximum.v2f64(<2 x double>, <2 x double>)
1292 declare <2 x double> @llvm.minimum.v2f64(<2 x double>, <2 x double>)
1293 declare <2 x float> @llvm.maximum.v2f32(<2 x float>, <2 x float>)
1294 declare <2 x float> @llvm.minimum.v2f32(<2 x float>, <2 x float>)
1295 declare <3 x double> @llvm.maximum.v3f64(<3 x double>, <3 x double>)
1296 declare <3 x double> @llvm.minimum.v3f64(<3 x double>, <3 x double>)
1297 declare <3 x float> @llvm.maximum.v3f32(<3 x float>, <3 x float>)
1298 declare <3 x float> @llvm.minimum.v3f32(<3 x float>, <3 x float>)
1299 declare <4 x double> @llvm.maximum.v4f64(<4 x double>, <4 x double>)
1300 declare <4 x double> @llvm.minimum.v4f64(<4 x double>, <4 x double>)
1301 declare <4 x float> @llvm.maximum.v4f32(<4 x float>, <4 x float>)
1302 declare <4 x float> @llvm.minimum.v4f32(<4 x float>, <4 x float>)
1303 declare <4 x half> @llvm.maximum.v4f16(<4 x half>, <4 x half>)
1304 declare <4 x half> @llvm.minimum.v4f16(<4 x half>, <4 x half>)
1305 declare <7 x float> @llvm.maximum.v7f32(<7 x float>, <7 x float>)
1306 declare <7 x float> @llvm.minimum.v7f32(<7 x float>, <7 x float>)
1307 declare <7 x half> @llvm.maximum.v7f16(<7 x half>, <7 x half>)
1308 declare <7 x half> @llvm.minimum.v7f16(<7 x half>, <7 x half>)
1309 declare <8 x float> @llvm.maximum.v8f32(<8 x float>, <8 x float>)
1310 declare <8 x float> @llvm.minimum.v8f32(<8 x float>, <8 x float>)
1311 declare <8 x half> @llvm.maximum.v8f16(<8 x half>, <8 x half>)
1312 declare <8 x half> @llvm.minimum.v8f16(<8 x half>, <8 x half>)
1313 declare double @llvm.maximum.f64(double, double)
1314 declare double @llvm.minimum.f64(double, double)
1315 declare float @llvm.maximum.f32(float, float)
1316 declare float @llvm.minimum.f32(float, float)
1317 declare half @llvm.maximum.f16(half, half)
1318 declare half @llvm.minimum.f16(half, half)