1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=armv7 -mattr=+neon %s -o - | FileCheck %s --check-prefix=ARMV7
3 ; RUN: llc -mtriple=armv7 -mattr=+fp-armv8 %s -o - | FileCheck %s --check-prefix=ARMV8
4 ; RUN: llc -mtriple=armv8.2a -mattr=+fp-armv8 %s -o - | FileCheck %s --check-prefix=ARMV8
5 ; RUN: llc -mtriple=armv8.1m-none-none-eabi -mattr=+mve.fp,+fp64 %s -o - | FileCheck %s --check-prefix=ARMV8M
7 declare float @llvm.minnum.f32(float, float)
8 declare float @llvm.maxnum.f32(float, float)
9 declare double @llvm.minnum.f64(double, double)
10 declare double @llvm.maxnum.f64(double, double)
11 declare <4 x float> @llvm.minnum.v4f32(<4 x float>, <4 x float>)
12 declare <4 x float> @llvm.maxnum.v4f32(<4 x float>, <4 x float>)
13 declare <2 x double> @llvm.minnum.v2f64(<2 x double>, <2 x double>)
14 declare <2 x double> @llvm.maxnum.v2f64(<2 x double>, <2 x double>)
16 define float @fminnum32_intrinsic(float %x, float %y) {
17 ; ARMV7-LABEL: fminnum32_intrinsic:
19 ; ARMV7-NEXT: vmov s0, r0
20 ; ARMV7-NEXT: vmov s2, r1
21 ; ARMV7-NEXT: vcmp.f32 s0, s2
22 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
23 ; ARMV7-NEXT: vmovlt.f32 s2, s0
24 ; ARMV7-NEXT: vmov r0, s2
27 ; ARMV8-LABEL: fminnum32_intrinsic:
29 ; ARMV8-NEXT: vmov s0, r1
30 ; ARMV8-NEXT: vmov s2, r0
31 ; ARMV8-NEXT: vminnm.f32 s0, s2, s0
32 ; ARMV8-NEXT: vmov r0, s0
35 ; ARMV8M-LABEL: fminnum32_intrinsic:
37 ; ARMV8M-NEXT: vmov s0, r1
38 ; ARMV8M-NEXT: vmov s2, r0
39 ; ARMV8M-NEXT: vminnm.f32 s0, s2, s0
40 ; ARMV8M-NEXT: vmov r0, s0
42 %a = call nnan float @llvm.minnum.f32(float %x, float %y)
46 define float @fminnum32_nsz_intrinsic(float %x, float %y) {
47 ; ARMV7-LABEL: fminnum32_nsz_intrinsic:
49 ; ARMV7-NEXT: vmov s0, r1
50 ; ARMV7-NEXT: vmov s2, r0
51 ; ARMV7-NEXT: vmin.f32 d0, d1, d0
52 ; ARMV7-NEXT: vmov r0, s0
55 ; ARMV8-LABEL: fminnum32_nsz_intrinsic:
57 ; ARMV8-NEXT: vmov s0, r1
58 ; ARMV8-NEXT: vmov s2, r0
59 ; ARMV8-NEXT: vminnm.f32 s0, s2, s0
60 ; ARMV8-NEXT: vmov r0, s0
63 ; ARMV8M-LABEL: fminnum32_nsz_intrinsic:
65 ; ARMV8M-NEXT: vmov s0, r1
66 ; ARMV8M-NEXT: vmov s2, r0
67 ; ARMV8M-NEXT: vminnm.f32 s0, s2, s0
68 ; ARMV8M-NEXT: vmov r0, s0
70 %a = call nnan nsz float @llvm.minnum.f32(float %x, float %y)
74 define float @fminnum32_non_zero_intrinsic(float %x) {
75 ; ARMV7-LABEL: fminnum32_non_zero_intrinsic:
77 ; ARMV7-NEXT: vmov.f32 s0, #-1.000000e+00
78 ; ARMV7-NEXT: vmov s2, r0
79 ; ARMV7-NEXT: vmin.f32 d0, d1, d0
80 ; ARMV7-NEXT: vmov r0, s0
83 ; ARMV8-LABEL: fminnum32_non_zero_intrinsic:
85 ; ARMV8-NEXT: vmov.f32 s0, #-1.000000e+00
86 ; ARMV8-NEXT: vmov s2, r0
87 ; ARMV8-NEXT: vminnm.f32 s0, s2, s0
88 ; ARMV8-NEXT: vmov r0, s0
91 ; ARMV8M-LABEL: fminnum32_non_zero_intrinsic:
93 ; ARMV8M-NEXT: vmov.f32 s0, #-1.000000e+00
94 ; ARMV8M-NEXT: vmov s2, r0
95 ; ARMV8M-NEXT: vminnm.f32 s0, s2, s0
96 ; ARMV8M-NEXT: vmov r0, s0
98 %a = call nnan float @llvm.minnum.f32(float %x, float -1.0)
102 define float @fmaxnum32_intrinsic(float %x, float %y) {
103 ; ARMV7-LABEL: fmaxnum32_intrinsic:
105 ; ARMV7-NEXT: vmov s0, r0
106 ; ARMV7-NEXT: vmov s2, r1
107 ; ARMV7-NEXT: vcmp.f32 s0, s2
108 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
109 ; ARMV7-NEXT: vmovgt.f32 s2, s0
110 ; ARMV7-NEXT: vmov r0, s2
113 ; ARMV8-LABEL: fmaxnum32_intrinsic:
115 ; ARMV8-NEXT: vmov s0, r1
116 ; ARMV8-NEXT: vmov s2, r0
117 ; ARMV8-NEXT: vmaxnm.f32 s0, s2, s0
118 ; ARMV8-NEXT: vmov r0, s0
121 ; ARMV8M-LABEL: fmaxnum32_intrinsic:
123 ; ARMV8M-NEXT: vmov s0, r1
124 ; ARMV8M-NEXT: vmov s2, r0
125 ; ARMV8M-NEXT: vmaxnm.f32 s0, s2, s0
126 ; ARMV8M-NEXT: vmov r0, s0
128 %a = call nnan float @llvm.maxnum.f32(float %x, float %y)
132 define float @fmaxnum32_nsz_intrinsic(float %x, float %y) {
133 ; ARMV7-LABEL: fmaxnum32_nsz_intrinsic:
135 ; ARMV7-NEXT: vmov s0, r1
136 ; ARMV7-NEXT: vmov s2, r0
137 ; ARMV7-NEXT: vmax.f32 d0, d1, d0
138 ; ARMV7-NEXT: vmov r0, s0
141 ; ARMV8-LABEL: fmaxnum32_nsz_intrinsic:
143 ; ARMV8-NEXT: vmov s0, r1
144 ; ARMV8-NEXT: vmov s2, r0
145 ; ARMV8-NEXT: vmaxnm.f32 s0, s2, s0
146 ; ARMV8-NEXT: vmov r0, s0
149 ; ARMV8M-LABEL: fmaxnum32_nsz_intrinsic:
151 ; ARMV8M-NEXT: vmov s0, r1
152 ; ARMV8M-NEXT: vmov s2, r0
153 ; ARMV8M-NEXT: vmaxnm.f32 s0, s2, s0
154 ; ARMV8M-NEXT: vmov r0, s0
156 %a = call nnan nsz float @llvm.maxnum.f32(float %x, float %y)
160 define float @fmaxnum32_zero_intrinsic(float %x) {
161 ; ARMV7-LABEL: fmaxnum32_zero_intrinsic:
163 ; ARMV7-NEXT: vmov s2, r0
164 ; ARMV7-NEXT: vldr s0, .LCPI5_0
165 ; ARMV7-NEXT: vcmp.f32 s2, #0
166 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
167 ; ARMV7-NEXT: vmovgt.f32 s0, s2
168 ; ARMV7-NEXT: vmov r0, s0
170 ; ARMV7-NEXT: .p2align 2
171 ; ARMV7-NEXT: @ %bb.1:
172 ; ARMV7-NEXT: .LCPI5_0:
173 ; ARMV7-NEXT: .long 0x00000000 @ float 0
175 ; ARMV8-LABEL: fmaxnum32_zero_intrinsic:
177 ; ARMV8-NEXT: vldr s0, .LCPI5_0
178 ; ARMV8-NEXT: vmov s2, r0
179 ; ARMV8-NEXT: vmaxnm.f32 s0, s2, s0
180 ; ARMV8-NEXT: vmov r0, s0
182 ; ARMV8-NEXT: .p2align 2
183 ; ARMV8-NEXT: @ %bb.1:
184 ; ARMV8-NEXT: .LCPI5_0:
185 ; ARMV8-NEXT: .long 0x00000000 @ float 0
187 ; ARMV8M-LABEL: fmaxnum32_zero_intrinsic:
189 ; ARMV8M-NEXT: vldr s0, .LCPI5_0
190 ; ARMV8M-NEXT: vmov s2, r0
191 ; ARMV8M-NEXT: vmaxnm.f32 s0, s2, s0
192 ; ARMV8M-NEXT: vmov r0, s0
194 ; ARMV8M-NEXT: .p2align 2
195 ; ARMV8M-NEXT: @ %bb.1:
196 ; ARMV8M-NEXT: .LCPI5_0:
197 ; ARMV8M-NEXT: .long 0x00000000 @ float 0
198 %a = call nnan float @llvm.maxnum.f32(float %x, float 0.0)
202 define float @fmaxnum32_non_zero_intrinsic(float %x) {
203 ; ARMV7-LABEL: fmaxnum32_non_zero_intrinsic:
205 ; ARMV7-NEXT: vmov.f32 s0, #1.000000e+00
206 ; ARMV7-NEXT: vmov s2, r0
207 ; ARMV7-NEXT: vmax.f32 d0, d1, d0
208 ; ARMV7-NEXT: vmov r0, s0
211 ; ARMV8-LABEL: fmaxnum32_non_zero_intrinsic:
213 ; ARMV8-NEXT: vmov.f32 s0, #1.000000e+00
214 ; ARMV8-NEXT: vmov s2, r0
215 ; ARMV8-NEXT: vmaxnm.f32 s0, s2, s0
216 ; ARMV8-NEXT: vmov r0, s0
219 ; ARMV8M-LABEL: fmaxnum32_non_zero_intrinsic:
221 ; ARMV8M-NEXT: vmov.f32 s0, #1.000000e+00
222 ; ARMV8M-NEXT: vmov s2, r0
223 ; ARMV8M-NEXT: vmaxnm.f32 s0, s2, s0
224 ; ARMV8M-NEXT: vmov r0, s0
226 %a = call nnan float @llvm.maxnum.f32(float %x, float 1.0)
230 define double @fminnum64_intrinsic(double %x, double %y) {
231 ; ARMV7-LABEL: fminnum64_intrinsic:
233 ; ARMV7-NEXT: vmov d16, r2, r3
234 ; ARMV7-NEXT: vmov d17, r0, r1
235 ; ARMV7-NEXT: vcmp.f64 d17, d16
236 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
237 ; ARMV7-NEXT: vmovlt.f64 d16, d17
238 ; ARMV7-NEXT: vmov r0, r1, d16
241 ; ARMV8-LABEL: fminnum64_intrinsic:
243 ; ARMV8-NEXT: vmov d16, r2, r3
244 ; ARMV8-NEXT: vmov d17, r0, r1
245 ; ARMV8-NEXT: vminnm.f64 d16, d17, d16
246 ; ARMV8-NEXT: vmov r0, r1, d16
249 ; ARMV8M-LABEL: fminnum64_intrinsic:
251 ; ARMV8M-NEXT: vmov d0, r2, r3
252 ; ARMV8M-NEXT: vmov d1, r0, r1
253 ; ARMV8M-NEXT: vminnm.f64 d0, d1, d0
254 ; ARMV8M-NEXT: vmov r0, r1, d0
256 %a = call nnan double @llvm.minnum.f64(double %x, double %y)
260 define double @fminnum64_nsz_intrinsic(double %x, double %y) {
261 ; ARMV7-LABEL: fminnum64_nsz_intrinsic:
263 ; ARMV7-NEXT: vmov d16, r2, r3
264 ; ARMV7-NEXT: vmov d17, r0, r1
265 ; ARMV7-NEXT: vcmp.f64 d17, d16
266 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
267 ; ARMV7-NEXT: vmovlt.f64 d16, d17
268 ; ARMV7-NEXT: vmov r0, r1, d16
271 ; ARMV8-LABEL: fminnum64_nsz_intrinsic:
273 ; ARMV8-NEXT: vmov d16, r2, r3
274 ; ARMV8-NEXT: vmov d17, r0, r1
275 ; ARMV8-NEXT: vminnm.f64 d16, d17, d16
276 ; ARMV8-NEXT: vmov r0, r1, d16
279 ; ARMV8M-LABEL: fminnum64_nsz_intrinsic:
281 ; ARMV8M-NEXT: vmov d0, r2, r3
282 ; ARMV8M-NEXT: vmov d1, r0, r1
283 ; ARMV8M-NEXT: vminnm.f64 d0, d1, d0
284 ; ARMV8M-NEXT: vmov r0, r1, d0
286 %a = call nnan nsz double @llvm.minnum.f64(double %x, double %y)
290 define double @fminnum64_zero_intrinsic(double %x) {
291 ; ARMV7-LABEL: fminnum64_zero_intrinsic:
293 ; ARMV7-NEXT: vldr d16, .LCPI9_0
294 ; ARMV7-NEXT: vmov d17, r0, r1
295 ; ARMV7-NEXT: vcmp.f64 d17, d16
296 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
297 ; ARMV7-NEXT: vmovlt.f64 d16, d17
298 ; ARMV7-NEXT: vmov r0, r1, d16
300 ; ARMV7-NEXT: .p2align 3
301 ; ARMV7-NEXT: @ %bb.1:
302 ; ARMV7-NEXT: .LCPI9_0:
303 ; ARMV7-NEXT: .long 0 @ double -0
304 ; ARMV7-NEXT: .long 2147483648
306 ; ARMV8-LABEL: fminnum64_zero_intrinsic:
308 ; ARMV8-NEXT: vldr d16, .LCPI9_0
309 ; ARMV8-NEXT: vmov d17, r0, r1
310 ; ARMV8-NEXT: vminnm.f64 d16, d17, d16
311 ; ARMV8-NEXT: vmov r0, r1, d16
313 ; ARMV8-NEXT: .p2align 3
314 ; ARMV8-NEXT: @ %bb.1:
315 ; ARMV8-NEXT: .LCPI9_0:
316 ; ARMV8-NEXT: .long 0 @ double -0
317 ; ARMV8-NEXT: .long 2147483648
319 ; ARMV8M-LABEL: fminnum64_zero_intrinsic:
321 ; ARMV8M-NEXT: vldr d0, .LCPI9_0
322 ; ARMV8M-NEXT: vmov d1, r0, r1
323 ; ARMV8M-NEXT: vminnm.f64 d0, d1, d0
324 ; ARMV8M-NEXT: vmov r0, r1, d0
326 ; ARMV8M-NEXT: .p2align 3
327 ; ARMV8M-NEXT: @ %bb.1:
328 ; ARMV8M-NEXT: .LCPI9_0:
329 ; ARMV8M-NEXT: .long 0 @ double -0
330 ; ARMV8M-NEXT: .long 2147483648
331 %a = call nnan double @llvm.minnum.f64(double %x, double -0.0)
335 define double @fminnum64_non_zero_intrinsic(double %x) {
336 ; ARMV7-LABEL: fminnum64_non_zero_intrinsic:
338 ; ARMV7-NEXT: vmov.f64 d16, #-1.000000e+00
339 ; ARMV7-NEXT: vmov d17, r0, r1
340 ; ARMV7-NEXT: vcmp.f64 d17, d16
341 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
342 ; ARMV7-NEXT: vmovlt.f64 d16, d17
343 ; ARMV7-NEXT: vmov r0, r1, d16
346 ; ARMV8-LABEL: fminnum64_non_zero_intrinsic:
348 ; ARMV8-NEXT: vmov.f64 d16, #-1.000000e+00
349 ; ARMV8-NEXT: vmov d17, r0, r1
350 ; ARMV8-NEXT: vminnm.f64 d16, d17, d16
351 ; ARMV8-NEXT: vmov r0, r1, d16
354 ; ARMV8M-LABEL: fminnum64_non_zero_intrinsic:
356 ; ARMV8M-NEXT: vmov.f64 d0, #-1.000000e+00
357 ; ARMV8M-NEXT: vmov d1, r0, r1
358 ; ARMV8M-NEXT: vminnm.f64 d0, d1, d0
359 ; ARMV8M-NEXT: vmov r0, r1, d0
361 %a = call nnan double @llvm.minnum.f64(double %x, double -1.0)
365 define double@fmaxnum64_intrinsic(double %x, double %y) {
366 ; ARMV7-LABEL: fmaxnum64_intrinsic:
368 ; ARMV7-NEXT: vmov d16, r2, r3
369 ; ARMV7-NEXT: vmov d17, r0, r1
370 ; ARMV7-NEXT: vcmp.f64 d17, d16
371 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
372 ; ARMV7-NEXT: vmovgt.f64 d16, d17
373 ; ARMV7-NEXT: vmov r0, r1, d16
376 ; ARMV8-LABEL: fmaxnum64_intrinsic:
378 ; ARMV8-NEXT: vmov d16, r2, r3
379 ; ARMV8-NEXT: vmov d17, r0, r1
380 ; ARMV8-NEXT: vmaxnm.f64 d16, d17, d16
381 ; ARMV8-NEXT: vmov r0, r1, d16
384 ; ARMV8M-LABEL: fmaxnum64_intrinsic:
386 ; ARMV8M-NEXT: vmov d0, r2, r3
387 ; ARMV8M-NEXT: vmov d1, r0, r1
388 ; ARMV8M-NEXT: vmaxnm.f64 d0, d1, d0
389 ; ARMV8M-NEXT: vmov r0, r1, d0
391 %a = call nnan double @llvm.maxnum.f64(double %x, double %y)
395 define double@fmaxnum64_nsz_intrinsic(double %x, double %y) {
396 ; ARMV7-LABEL: fmaxnum64_nsz_intrinsic:
398 ; ARMV7-NEXT: vmov d16, r2, r3
399 ; ARMV7-NEXT: vmov d17, r0, r1
400 ; ARMV7-NEXT: vcmp.f64 d17, d16
401 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
402 ; ARMV7-NEXT: vmovgt.f64 d16, d17
403 ; ARMV7-NEXT: vmov r0, r1, d16
406 ; ARMV8-LABEL: fmaxnum64_nsz_intrinsic:
408 ; ARMV8-NEXT: vmov d16, r2, r3
409 ; ARMV8-NEXT: vmov d17, r0, r1
410 ; ARMV8-NEXT: vmaxnm.f64 d16, d17, d16
411 ; ARMV8-NEXT: vmov r0, r1, d16
414 ; ARMV8M-LABEL: fmaxnum64_nsz_intrinsic:
416 ; ARMV8M-NEXT: vmov d0, r2, r3
417 ; ARMV8M-NEXT: vmov d1, r0, r1
418 ; ARMV8M-NEXT: vmaxnm.f64 d0, d1, d0
419 ; ARMV8M-NEXT: vmov r0, r1, d0
421 %a = call nnan nsz double @llvm.maxnum.f64(double %x, double %y)
425 define double @fmaxnum64_zero_intrinsic(double %x) {
426 ; ARMV7-LABEL: fmaxnum64_zero_intrinsic:
428 ; ARMV7-NEXT: vmov d17, r0, r1
429 ; ARMV7-NEXT: vcmp.f64 d17, #0
430 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
431 ; ARMV7-NEXT: vmov.i32 d16, #0x0
432 ; ARMV7-NEXT: vmovgt.f64 d16, d17
433 ; ARMV7-NEXT: vmov r0, r1, d16
436 ; ARMV8-LABEL: fmaxnum64_zero_intrinsic:
438 ; ARMV8-NEXT: vmov.i32 d16, #0x0
439 ; ARMV8-NEXT: vmov d17, r0, r1
440 ; ARMV8-NEXT: vmaxnm.f64 d16, d17, d16
441 ; ARMV8-NEXT: vmov r0, r1, d16
444 ; ARMV8M-LABEL: fmaxnum64_zero_intrinsic:
446 ; ARMV8M-NEXT: vldr d0, .LCPI13_0
447 ; ARMV8M-NEXT: vmov d1, r0, r1
448 ; ARMV8M-NEXT: vmaxnm.f64 d0, d1, d0
449 ; ARMV8M-NEXT: vmov r0, r1, d0
451 ; ARMV8M-NEXT: .p2align 3
452 ; ARMV8M-NEXT: @ %bb.1:
453 ; ARMV8M-NEXT: .LCPI13_0:
454 ; ARMV8M-NEXT: .long 0 @ double 0
455 ; ARMV8M-NEXT: .long 0
456 %a = call nnan double @llvm.maxnum.f64(double %x, double 0.0)
460 define double @fmaxnum64_non_zero_intrinsic(double %x) {
461 ; ARMV7-LABEL: fmaxnum64_non_zero_intrinsic:
463 ; ARMV7-NEXT: vmov.f64 d16, #1.000000e+00
464 ; ARMV7-NEXT: vmov d17, r0, r1
465 ; ARMV7-NEXT: vcmp.f64 d17, d16
466 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
467 ; ARMV7-NEXT: vmovgt.f64 d16, d17
468 ; ARMV7-NEXT: vmov r0, r1, d16
471 ; ARMV8-LABEL: fmaxnum64_non_zero_intrinsic:
473 ; ARMV8-NEXT: vmov.f64 d16, #1.000000e+00
474 ; ARMV8-NEXT: vmov d17, r0, r1
475 ; ARMV8-NEXT: vmaxnm.f64 d16, d17, d16
476 ; ARMV8-NEXT: vmov r0, r1, d16
479 ; ARMV8M-LABEL: fmaxnum64_non_zero_intrinsic:
481 ; ARMV8M-NEXT: vmov.f64 d0, #1.000000e+00
482 ; ARMV8M-NEXT: vmov d1, r0, r1
483 ; ARMV8M-NEXT: vmaxnm.f64 d0, d1, d0
484 ; ARMV8M-NEXT: vmov r0, r1, d0
486 %a = call nnan double @llvm.maxnum.f64(double %x, double 1.0)
490 define <4 x float> @fminnumv432_intrinsic(<4 x float> %x, <4 x float> %y) {
491 ; ARMV7-LABEL: fminnumv432_intrinsic:
493 ; ARMV7-NEXT: mov r12, sp
494 ; ARMV7-NEXT: vld1.64 {d0, d1}, [r12]
495 ; ARMV7-NEXT: vmov d3, r2, r3
496 ; ARMV7-NEXT: vmov d2, r0, r1
497 ; ARMV7-NEXT: vcmp.f32 s7, s3
498 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
499 ; ARMV7-NEXT: vcmp.f32 s6, s2
500 ; ARMV7-NEXT: vmovlt.f32 s3, s7
501 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
502 ; ARMV7-NEXT: vcmp.f32 s5, s1
503 ; ARMV7-NEXT: vmovlt.f32 s2, s6
504 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
505 ; ARMV7-NEXT: vcmp.f32 s4, s0
506 ; ARMV7-NEXT: vmovlt.f32 s1, s5
507 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
508 ; ARMV7-NEXT: vmovlt.f32 s0, s4
509 ; ARMV7-NEXT: vmov r2, r3, d1
510 ; ARMV7-NEXT: vmov r0, r1, d0
513 ; ARMV8-LABEL: fminnumv432_intrinsic:
515 ; ARMV8-NEXT: vmov d17, r2, r3
516 ; ARMV8-NEXT: vmov d16, r0, r1
517 ; ARMV8-NEXT: mov r0, sp
518 ; ARMV8-NEXT: vld1.64 {d18, d19}, [r0]
519 ; ARMV8-NEXT: vminnm.f32 q8, q8, q9
520 ; ARMV8-NEXT: vmov r0, r1, d16
521 ; ARMV8-NEXT: vmov r2, r3, d17
524 ; ARMV8M-LABEL: fminnumv432_intrinsic:
526 ; ARMV8M-NEXT: vmov d0, r0, r1
527 ; ARMV8M-NEXT: mov r0, sp
528 ; ARMV8M-NEXT: vldrw.u32 q1, [r0]
529 ; ARMV8M-NEXT: vmov d1, r2, r3
530 ; ARMV8M-NEXT: vminnm.f32 q0, q0, q1
531 ; ARMV8M-NEXT: vmov r0, r1, d0
532 ; ARMV8M-NEXT: vmov r2, r3, d1
534 %a = call nnan <4 x float> @llvm.minnum.v4f32(<4 x float> %x, <4 x float> %y)
538 define <4 x float> @fminnumv432_nsz_intrinsic(<4 x float> %x, <4 x float> %y) {
539 ; ARMV7-LABEL: fminnumv432_nsz_intrinsic:
541 ; ARMV7-NEXT: vmov d17, r2, r3
542 ; ARMV7-NEXT: vmov d16, r0, r1
543 ; ARMV7-NEXT: mov r0, sp
544 ; ARMV7-NEXT: vld1.64 {d18, d19}, [r0]
545 ; ARMV7-NEXT: vmin.f32 q8, q8, q9
546 ; ARMV7-NEXT: vmov r0, r1, d16
547 ; ARMV7-NEXT: vmov r2, r3, d17
550 ; ARMV8-LABEL: fminnumv432_nsz_intrinsic:
552 ; ARMV8-NEXT: vmov d17, r2, r3
553 ; ARMV8-NEXT: vmov d16, r0, r1
554 ; ARMV8-NEXT: mov r0, sp
555 ; ARMV8-NEXT: vld1.64 {d18, d19}, [r0]
556 ; ARMV8-NEXT: vminnm.f32 q8, q8, q9
557 ; ARMV8-NEXT: vmov r0, r1, d16
558 ; ARMV8-NEXT: vmov r2, r3, d17
561 ; ARMV8M-LABEL: fminnumv432_nsz_intrinsic:
563 ; ARMV8M-NEXT: vmov d0, r0, r1
564 ; ARMV8M-NEXT: mov r0, sp
565 ; ARMV8M-NEXT: vldrw.u32 q1, [r0]
566 ; ARMV8M-NEXT: vmov d1, r2, r3
567 ; ARMV8M-NEXT: vminnm.f32 q0, q0, q1
568 ; ARMV8M-NEXT: vmov r0, r1, d0
569 ; ARMV8M-NEXT: vmov r2, r3, d1
571 %a = call nnan nsz <4 x float> @llvm.minnum.v4f32(<4 x float> %x, <4 x float> %y)
575 define <4 x float> @fminnumv432_non_zero_intrinsic(<4 x float> %x) {
576 ; ARMV7-LABEL: fminnumv432_non_zero_intrinsic:
578 ; ARMV7-NEXT: vmov d19, r2, r3
579 ; ARMV7-NEXT: vmov.f32 q8, #-1.000000e+00
580 ; ARMV7-NEXT: vmov d18, r0, r1
581 ; ARMV7-NEXT: vmin.f32 q8, q9, q8
582 ; ARMV7-NEXT: vmov r0, r1, d16
583 ; ARMV7-NEXT: vmov r2, r3, d17
586 ; ARMV8-LABEL: fminnumv432_non_zero_intrinsic:
588 ; ARMV8-NEXT: vmov d17, r2, r3
589 ; ARMV8-NEXT: vmov d16, r0, r1
590 ; ARMV8-NEXT: vmov.f32 q9, #-1.000000e+00
591 ; ARMV8-NEXT: vminnm.f32 q8, q8, q9
592 ; ARMV8-NEXT: vmov r0, r1, d16
593 ; ARMV8-NEXT: vmov r2, r3, d17
596 ; ARMV8M-LABEL: fminnumv432_non_zero_intrinsic:
598 ; ARMV8M-NEXT: vmov d1, r2, r3
599 ; ARMV8M-NEXT: vmov.f32 q1, #-1.000000e+00
600 ; ARMV8M-NEXT: vmov d0, r0, r1
601 ; ARMV8M-NEXT: vminnm.f32 q0, q0, q1
602 ; ARMV8M-NEXT: vmov r0, r1, d0
603 ; ARMV8M-NEXT: vmov r2, r3, d1
605 %a = call nnan <4 x float> @llvm.minnum.v4f32(<4 x float> %x, <4 x float><float -1.0, float -1.0, float -1.0, float -1.0>)
609 define <4 x float> @fminnumv432_one_zero_intrinsic(<4 x float> %x) {
610 ; ARMV7-LABEL: fminnumv432_one_zero_intrinsic:
612 ; ARMV7-NEXT: vmov d3, r2, r3
613 ; ARMV7-NEXT: vmov d2, r0, r1
614 ; ARMV7-NEXT: vmov.f32 s0, #-1.000000e+00
615 ; ARMV7-NEXT: vcmp.f32 s5, #0
616 ; ARMV7-NEXT: vldr s1, .LCPI18_0
617 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
618 ; ARMV7-NEXT: vcmp.f32 s7, s0
619 ; ARMV7-NEXT: vmovlt.f32 s1, s5
620 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
621 ; ARMV7-NEXT: vmov.f32 s3, s0
622 ; ARMV7-NEXT: vcmp.f32 s6, s0
623 ; ARMV7-NEXT: vmovlt.f32 s3, s7
624 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
625 ; ARMV7-NEXT: vmov.f32 s2, s0
626 ; ARMV7-NEXT: vcmp.f32 s4, s0
627 ; ARMV7-NEXT: vmovlt.f32 s2, s6
628 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
629 ; ARMV7-NEXT: vmovlt.f32 s0, s4
630 ; ARMV7-NEXT: vmov r2, r3, d1
631 ; ARMV7-NEXT: vmov r0, r1, d0
633 ; ARMV7-NEXT: .p2align 2
634 ; ARMV7-NEXT: @ %bb.1:
635 ; ARMV7-NEXT: .LCPI18_0:
636 ; ARMV7-NEXT: .long 0x00000000 @ float 0
638 ; ARMV8-LABEL: fminnumv432_one_zero_intrinsic:
640 ; ARMV8-NEXT: vmov d17, r2, r3
641 ; ARMV8-NEXT: vmov d16, r0, r1
642 ; ARMV8-NEXT: adr r0, .LCPI18_0
643 ; ARMV8-NEXT: vld1.64 {d18, d19}, [r0:128]
644 ; ARMV8-NEXT: vminnm.f32 q8, q8, q9
645 ; ARMV8-NEXT: vmov r0, r1, d16
646 ; ARMV8-NEXT: vmov r2, r3, d17
648 ; ARMV8-NEXT: .p2align 4
649 ; ARMV8-NEXT: @ %bb.1:
650 ; ARMV8-NEXT: .LCPI18_0:
651 ; ARMV8-NEXT: .long 0xbf800000 @ float -1
652 ; ARMV8-NEXT: .long 0x00000000 @ float 0
653 ; ARMV8-NEXT: .long 0xbf800000 @ float -1
654 ; ARMV8-NEXT: .long 0xbf800000 @ float -1
656 ; ARMV8M-LABEL: fminnumv432_one_zero_intrinsic:
658 ; ARMV8M-NEXT: vmov d0, r0, r1
659 ; ARMV8M-NEXT: adr r0, .LCPI18_0
660 ; ARMV8M-NEXT: vldrw.u32 q1, [r0]
661 ; ARMV8M-NEXT: vmov d1, r2, r3
662 ; ARMV8M-NEXT: vminnm.f32 q0, q0, q1
663 ; ARMV8M-NEXT: vmov r0, r1, d0
664 ; ARMV8M-NEXT: vmov r2, r3, d1
666 ; ARMV8M-NEXT: .p2align 4
667 ; ARMV8M-NEXT: @ %bb.1:
668 ; ARMV8M-NEXT: .LCPI18_0:
669 ; ARMV8M-NEXT: .long 0xbf800000 @ float -1
670 ; ARMV8M-NEXT: .long 0x00000000 @ float 0
671 ; ARMV8M-NEXT: .long 0xbf800000 @ float -1
672 ; ARMV8M-NEXT: .long 0xbf800000 @ float -1
673 %a = call nnan <4 x float> @llvm.minnum.v4f32(<4 x float> %x, <4 x float><float -1.0, float 0.0, float -1.0, float -1.0>)
677 define <4 x float> @fmaxnumv432_intrinsic(<4 x float> %x, <4 x float> %y) {
678 ; ARMV7-LABEL: fmaxnumv432_intrinsic:
680 ; ARMV7-NEXT: mov r12, sp
681 ; ARMV7-NEXT: vld1.64 {d0, d1}, [r12]
682 ; ARMV7-NEXT: vmov d3, r2, r3
683 ; ARMV7-NEXT: vmov d2, r0, r1
684 ; ARMV7-NEXT: vcmp.f32 s7, s3
685 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
686 ; ARMV7-NEXT: vcmp.f32 s6, s2
687 ; ARMV7-NEXT: vmovgt.f32 s3, s7
688 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
689 ; ARMV7-NEXT: vcmp.f32 s5, s1
690 ; ARMV7-NEXT: vmovgt.f32 s2, s6
691 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
692 ; ARMV7-NEXT: vcmp.f32 s4, s0
693 ; ARMV7-NEXT: vmovgt.f32 s1, s5
694 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
695 ; ARMV7-NEXT: vmovgt.f32 s0, s4
696 ; ARMV7-NEXT: vmov r2, r3, d1
697 ; ARMV7-NEXT: vmov r0, r1, d0
700 ; ARMV8-LABEL: fmaxnumv432_intrinsic:
702 ; ARMV8-NEXT: vmov d17, r2, r3
703 ; ARMV8-NEXT: vmov d16, r0, r1
704 ; ARMV8-NEXT: mov r0, sp
705 ; ARMV8-NEXT: vld1.64 {d18, d19}, [r0]
706 ; ARMV8-NEXT: vmaxnm.f32 q8, q8, q9
707 ; ARMV8-NEXT: vmov r0, r1, d16
708 ; ARMV8-NEXT: vmov r2, r3, d17
711 ; ARMV8M-LABEL: fmaxnumv432_intrinsic:
713 ; ARMV8M-NEXT: vmov d0, r0, r1
714 ; ARMV8M-NEXT: mov r0, sp
715 ; ARMV8M-NEXT: vldrw.u32 q1, [r0]
716 ; ARMV8M-NEXT: vmov d1, r2, r3
717 ; ARMV8M-NEXT: vmaxnm.f32 q0, q0, q1
718 ; ARMV8M-NEXT: vmov r0, r1, d0
719 ; ARMV8M-NEXT: vmov r2, r3, d1
721 %a = call nnan <4 x float> @llvm.maxnum.v4f32(<4 x float> %x, <4 x float> %y)
725 define <4 x float> @fmaxnumv432_nsz_intrinsic(<4 x float> %x, <4 x float> %y) {
726 ; ARMV7-LABEL: fmaxnumv432_nsz_intrinsic:
728 ; ARMV7-NEXT: vmov d17, r2, r3
729 ; ARMV7-NEXT: vmov d16, r0, r1
730 ; ARMV7-NEXT: mov r0, sp
731 ; ARMV7-NEXT: vld1.64 {d18, d19}, [r0]
732 ; ARMV7-NEXT: vmax.f32 q8, q8, q9
733 ; ARMV7-NEXT: vmov r0, r1, d16
734 ; ARMV7-NEXT: vmov r2, r3, d17
737 ; ARMV8-LABEL: fmaxnumv432_nsz_intrinsic:
739 ; ARMV8-NEXT: vmov d17, r2, r3
740 ; ARMV8-NEXT: vmov d16, r0, r1
741 ; ARMV8-NEXT: mov r0, sp
742 ; ARMV8-NEXT: vld1.64 {d18, d19}, [r0]
743 ; ARMV8-NEXT: vmaxnm.f32 q8, q8, q9
744 ; ARMV8-NEXT: vmov r0, r1, d16
745 ; ARMV8-NEXT: vmov r2, r3, d17
748 ; ARMV8M-LABEL: fmaxnumv432_nsz_intrinsic:
750 ; ARMV8M-NEXT: vmov d0, r0, r1
751 ; ARMV8M-NEXT: mov r0, sp
752 ; ARMV8M-NEXT: vldrw.u32 q1, [r0]
753 ; ARMV8M-NEXT: vmov d1, r2, r3
754 ; ARMV8M-NEXT: vmaxnm.f32 q0, q0, q1
755 ; ARMV8M-NEXT: vmov r0, r1, d0
756 ; ARMV8M-NEXT: vmov r2, r3, d1
758 %a = call nnan nsz <4 x float> @llvm.maxnum.v4f32(<4 x float> %x, <4 x float> %y)
762 define <4 x float> @fmaxnumv432_zero_intrinsic(<4 x float> %x) {
763 ; ARMV7-LABEL: fmaxnumv432_zero_intrinsic:
765 ; ARMV7-NEXT: vmov d3, r2, r3
766 ; ARMV7-NEXT: vldr s0, .LCPI21_0
767 ; ARMV7-NEXT: vmov d2, r0, r1
768 ; ARMV7-NEXT: vcmp.f32 s7, #0
769 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
770 ; ARMV7-NEXT: vmov.f32 s3, s0
771 ; ARMV7-NEXT: vcmp.f32 s6, #0
772 ; ARMV7-NEXT: vmovgt.f32 s3, s7
773 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
774 ; ARMV7-NEXT: vmov.f32 s2, s0
775 ; ARMV7-NEXT: vcmp.f32 s5, #0
776 ; ARMV7-NEXT: vmovgt.f32 s2, s6
777 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
778 ; ARMV7-NEXT: vmov.f32 s1, s0
779 ; ARMV7-NEXT: vcmp.f32 s4, #0
780 ; ARMV7-NEXT: vmovgt.f32 s1, s5
781 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
782 ; ARMV7-NEXT: vmovgt.f32 s0, s4
783 ; ARMV7-NEXT: vmov r2, r3, d1
784 ; ARMV7-NEXT: vmov r0, r1, d0
786 ; ARMV7-NEXT: .p2align 2
787 ; ARMV7-NEXT: @ %bb.1:
788 ; ARMV7-NEXT: .LCPI21_0:
789 ; ARMV7-NEXT: .long 0x00000000 @ float 0
791 ; ARMV8-LABEL: fmaxnumv432_zero_intrinsic:
793 ; ARMV8-NEXT: vmov d17, r2, r3
794 ; ARMV8-NEXT: vmov d16, r0, r1
795 ; ARMV8-NEXT: vmov.i32 q9, #0x0
796 ; ARMV8-NEXT: vmaxnm.f32 q8, q8, q9
797 ; ARMV8-NEXT: vmov r0, r1, d16
798 ; ARMV8-NEXT: vmov r2, r3, d17
801 ; ARMV8M-LABEL: fmaxnumv432_zero_intrinsic:
803 ; ARMV8M-NEXT: vmov d1, r2, r3
804 ; ARMV8M-NEXT: vmov.i32 q1, #0x0
805 ; ARMV8M-NEXT: vmov d0, r0, r1
806 ; ARMV8M-NEXT: vmaxnm.f32 q0, q0, q1
807 ; ARMV8M-NEXT: vmov r0, r1, d0
808 ; ARMV8M-NEXT: vmov r2, r3, d1
810 %a = call nnan <4 x float> @llvm.maxnum.v4f32(<4 x float> %x, <4 x float><float 0.0, float 0.0, float 0.0, float 0.0>)
814 define <4 x float> @fmaxnumv432_minus_zero_intrinsic(<4 x float> %x) {
815 ; ARMV7-LABEL: fmaxnumv432_minus_zero_intrinsic:
817 ; ARMV7-NEXT: vldr s0, .LCPI22_0
818 ; ARMV7-NEXT: vmov d3, r2, r3
819 ; ARMV7-NEXT: vmov d2, r0, r1
820 ; ARMV7-NEXT: vcmp.f32 s7, s0
821 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
822 ; ARMV7-NEXT: vmov.f32 s3, s0
823 ; ARMV7-NEXT: vcmp.f32 s6, s0
824 ; ARMV7-NEXT: vmovgt.f32 s3, s7
825 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
826 ; ARMV7-NEXT: vmov.f32 s2, s0
827 ; ARMV7-NEXT: vcmp.f32 s5, s0
828 ; ARMV7-NEXT: vmovgt.f32 s2, s6
829 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
830 ; ARMV7-NEXT: vmov.f32 s1, s0
831 ; ARMV7-NEXT: vcmp.f32 s4, s0
832 ; ARMV7-NEXT: vmovgt.f32 s1, s5
833 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
834 ; ARMV7-NEXT: vmovgt.f32 s0, s4
835 ; ARMV7-NEXT: vmov r2, r3, d1
836 ; ARMV7-NEXT: vmov r0, r1, d0
838 ; ARMV7-NEXT: .p2align 2
839 ; ARMV7-NEXT: @ %bb.1:
840 ; ARMV7-NEXT: .LCPI22_0:
841 ; ARMV7-NEXT: .long 0x80000000 @ float -0
843 ; ARMV8-LABEL: fmaxnumv432_minus_zero_intrinsic:
845 ; ARMV8-NEXT: vmov d17, r2, r3
846 ; ARMV8-NEXT: vmov d16, r0, r1
847 ; ARMV8-NEXT: vmov.i32 q9, #0x80000000
848 ; ARMV8-NEXT: vmaxnm.f32 q8, q8, q9
849 ; ARMV8-NEXT: vmov r0, r1, d16
850 ; ARMV8-NEXT: vmov r2, r3, d17
853 ; ARMV8M-LABEL: fmaxnumv432_minus_zero_intrinsic:
855 ; ARMV8M-NEXT: vmov d1, r2, r3
856 ; ARMV8M-NEXT: vmov.i32 q1, #0x80000000
857 ; ARMV8M-NEXT: vmov d0, r0, r1
858 ; ARMV8M-NEXT: vmaxnm.f32 q0, q0, q1
859 ; ARMV8M-NEXT: vmov r0, r1, d0
860 ; ARMV8M-NEXT: vmov r2, r3, d1
862 %a = call nnan <4 x float> @llvm.maxnum.v4f32(<4 x float> %x, <4 x float><float -0.0, float -0.0, float -0.0, float -0.0>)
866 define <4 x float> @fmaxnumv432_non_zero_intrinsic(<4 x float> %x) {
867 ; ARMV7-LABEL: fmaxnumv432_non_zero_intrinsic:
869 ; ARMV7-NEXT: vmov d19, r2, r3
870 ; ARMV7-NEXT: vmov.f32 q8, #1.000000e+00
871 ; ARMV7-NEXT: vmov d18, r0, r1
872 ; ARMV7-NEXT: vmax.f32 q8, q9, q8
873 ; ARMV7-NEXT: vmov r0, r1, d16
874 ; ARMV7-NEXT: vmov r2, r3, d17
877 ; ARMV8-LABEL: fmaxnumv432_non_zero_intrinsic:
879 ; ARMV8-NEXT: vmov d17, r2, r3
880 ; ARMV8-NEXT: vmov d16, r0, r1
881 ; ARMV8-NEXT: vmov.f32 q9, #1.000000e+00
882 ; ARMV8-NEXT: vmaxnm.f32 q8, q8, q9
883 ; ARMV8-NEXT: vmov r0, r1, d16
884 ; ARMV8-NEXT: vmov r2, r3, d17
887 ; ARMV8M-LABEL: fmaxnumv432_non_zero_intrinsic:
889 ; ARMV8M-NEXT: vmov d1, r2, r3
890 ; ARMV8M-NEXT: vmov.f32 q1, #1.000000e+00
891 ; ARMV8M-NEXT: vmov d0, r0, r1
892 ; ARMV8M-NEXT: vmaxnm.f32 q0, q0, q1
893 ; ARMV8M-NEXT: vmov r0, r1, d0
894 ; ARMV8M-NEXT: vmov r2, r3, d1
896 %a = call nnan <4 x float> @llvm.maxnum.v4f32(<4 x float> %x, <4 x float><float 1.0, float 1.0, float 1.0, float 1.0>)
900 define <2 x double> @fminnumv264_intrinsic(<2 x double> %x, <2 x double> %y) {
901 ; ARMV7-LABEL: fminnumv264_intrinsic:
903 ; ARMV7-NEXT: mov r12, sp
904 ; ARMV7-NEXT: vld1.64 {d16, d17}, [r12]
905 ; ARMV7-NEXT: vmov d18, r0, r1
906 ; ARMV7-NEXT: vcmp.f64 d18, d16
907 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
908 ; ARMV7-NEXT: vmov d19, r2, r3
909 ; ARMV7-NEXT: vcmp.f64 d19, d17
910 ; ARMV7-NEXT: vmovlt.f64 d16, d18
911 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
912 ; ARMV7-NEXT: vmov r0, r1, d16
913 ; ARMV7-NEXT: vmovlt.f64 d17, d19
914 ; ARMV7-NEXT: vmov r2, r3, d17
917 ; ARMV8-LABEL: fminnumv264_intrinsic:
919 ; ARMV8-NEXT: mov r12, sp
920 ; ARMV8-NEXT: vld1.64 {d16, d17}, [r12]
921 ; ARMV8-NEXT: vmov d18, r0, r1
922 ; ARMV8-NEXT: vmov d19, r2, r3
923 ; ARMV8-NEXT: vcmp.f64 d16, d18
924 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
925 ; ARMV8-NEXT: vcmp.f64 d17, d19
926 ; ARMV8-NEXT: vselgt.f64 d18, d18, d16
927 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
928 ; ARMV8-NEXT: vmov r0, r1, d18
929 ; ARMV8-NEXT: vselgt.f64 d16, d19, d17
930 ; ARMV8-NEXT: vmov r2, r3, d16
933 ; ARMV8M-LABEL: fminnumv264_intrinsic:
935 ; ARMV8M-NEXT: mov r12, sp
936 ; ARMV8M-NEXT: vmov d0, r0, r1
937 ; ARMV8M-NEXT: vldrw.u32 q1, [r12]
938 ; ARMV8M-NEXT: vmov d1, r2, r3
939 ; ARMV8M-NEXT: vcmp.f64 d2, d0
940 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
941 ; ARMV8M-NEXT: vcmp.f64 d3, d1
942 ; ARMV8M-NEXT: vselgt.f64 d0, d0, d2
943 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
944 ; ARMV8M-NEXT: vmov r0, r1, d0
945 ; ARMV8M-NEXT: vselgt.f64 d1, d1, d3
946 ; ARMV8M-NEXT: vmov r2, r3, d1
948 %a = call nnan <2 x double> @llvm.minnum.v2f64(<2 x double> %x, <2 x double> %y)
952 define <2 x double> @fminnumv264_nsz_intrinsic(<2 x double> %x, <2 x double> %y) {
953 ; ARMV7-LABEL: fminnumv264_nsz_intrinsic:
955 ; ARMV7-NEXT: mov r12, sp
956 ; ARMV7-NEXT: vld1.64 {d16, d17}, [r12]
957 ; ARMV7-NEXT: vmov d18, r0, r1
958 ; ARMV7-NEXT: vcmp.f64 d18, d16
959 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
960 ; ARMV7-NEXT: vmov d19, r2, r3
961 ; ARMV7-NEXT: vcmp.f64 d19, d17
962 ; ARMV7-NEXT: vmovlt.f64 d16, d18
963 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
964 ; ARMV7-NEXT: vmov r0, r1, d16
965 ; ARMV7-NEXT: vmovlt.f64 d17, d19
966 ; ARMV7-NEXT: vmov r2, r3, d17
969 ; ARMV8-LABEL: fminnumv264_nsz_intrinsic:
971 ; ARMV8-NEXT: mov r12, sp
972 ; ARMV8-NEXT: vld1.64 {d16, d17}, [r12]
973 ; ARMV8-NEXT: vmov d18, r0, r1
974 ; ARMV8-NEXT: vmov d19, r2, r3
975 ; ARMV8-NEXT: vcmp.f64 d16, d18
976 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
977 ; ARMV8-NEXT: vcmp.f64 d17, d19
978 ; ARMV8-NEXT: vselgt.f64 d18, d18, d16
979 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
980 ; ARMV8-NEXT: vmov r0, r1, d18
981 ; ARMV8-NEXT: vselgt.f64 d16, d19, d17
982 ; ARMV8-NEXT: vmov r2, r3, d16
985 ; ARMV8M-LABEL: fminnumv264_nsz_intrinsic:
987 ; ARMV8M-NEXT: mov r12, sp
988 ; ARMV8M-NEXT: vmov d0, r0, r1
989 ; ARMV8M-NEXT: vldrw.u32 q1, [r12]
990 ; ARMV8M-NEXT: vmov d1, r2, r3
991 ; ARMV8M-NEXT: vcmp.f64 d2, d0
992 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
993 ; ARMV8M-NEXT: vcmp.f64 d3, d1
994 ; ARMV8M-NEXT: vselgt.f64 d0, d0, d2
995 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
996 ; ARMV8M-NEXT: vmov r0, r1, d0
997 ; ARMV8M-NEXT: vselgt.f64 d1, d1, d3
998 ; ARMV8M-NEXT: vmov r2, r3, d1
1000 %a = call nnan nsz <2 x double> @llvm.minnum.v2f64(<2 x double> %x, <2 x double> %y)
1004 define <2 x double> @fminnumv264_non_zero_intrinsic(<2 x double> %x) {
1005 ; ARMV7-LABEL: fminnumv264_non_zero_intrinsic:
1007 ; ARMV7-NEXT: vmov.f64 d16, #1.000000e+00
1008 ; ARMV7-NEXT: vmov d17, r0, r1
1009 ; ARMV7-NEXT: vcmp.f64 d17, d16
1010 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1011 ; ARMV7-NEXT: vmov d18, r2, r3
1012 ; ARMV7-NEXT: vcmp.f64 d18, d16
1013 ; ARMV7-NEXT: vmov.f64 d19, d16
1014 ; ARMV7-NEXT: vmovlt.f64 d19, d17
1015 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1016 ; ARMV7-NEXT: vmov r0, r1, d19
1017 ; ARMV7-NEXT: vmovlt.f64 d16, d18
1018 ; ARMV7-NEXT: vmov r2, r3, d16
1021 ; ARMV8-LABEL: fminnumv264_non_zero_intrinsic:
1023 ; ARMV8-NEXT: vmov d17, r0, r1
1024 ; ARMV8-NEXT: vmov.f64 d16, #1.000000e+00
1025 ; ARMV8-NEXT: vcmp.f64 d16, d17
1026 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1027 ; ARMV8-NEXT: vmov d18, r2, r3
1028 ; ARMV8-NEXT: vcmp.f64 d16, d18
1029 ; ARMV8-NEXT: vselgt.f64 d17, d17, d16
1030 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1031 ; ARMV8-NEXT: vmov r0, r1, d17
1032 ; ARMV8-NEXT: vselgt.f64 d16, d18, d16
1033 ; ARMV8-NEXT: vmov r2, r3, d16
1036 ; ARMV8M-LABEL: fminnumv264_non_zero_intrinsic:
1038 ; ARMV8M-NEXT: vmov d1, r0, r1
1039 ; ARMV8M-NEXT: vmov.f64 d0, #1.000000e+00
1040 ; ARMV8M-NEXT: vcmp.f64 d0, d1
1041 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1042 ; ARMV8M-NEXT: vmov d2, r2, r3
1043 ; ARMV8M-NEXT: vcmp.f64 d0, d2
1044 ; ARMV8M-NEXT: vselgt.f64 d1, d1, d0
1045 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1046 ; ARMV8M-NEXT: vmov r0, r1, d1
1047 ; ARMV8M-NEXT: vselgt.f64 d0, d2, d0
1048 ; ARMV8M-NEXT: vmov r2, r3, d0
1049 ; ARMV8M-NEXT: bx lr
1050 %a = call nnan <2 x double> @llvm.minnum.v2f64(<2 x double> %x, <2 x double><double 1.0, double 1.0>)
1054 define <2 x double> @fminnumv264_one_zero_intrinsic(<2 x double> %x) {
1055 ; ARMV7-LABEL: fminnumv264_one_zero_intrinsic:
1057 ; ARMV7-NEXT: vmov d18, r2, r3
1058 ; ARMV7-NEXT: vcmp.f64 d18, #0
1059 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1060 ; ARMV7-NEXT: vmov d19, r0, r1
1061 ; ARMV7-NEXT: vmov.f64 d16, #-1.000000e+00
1062 ; ARMV7-NEXT: vcmp.f64 d19, d16
1063 ; ARMV7-NEXT: vmov.i32 d17, #0x0
1064 ; ARMV7-NEXT: vmovlt.f64 d17, d18
1065 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1066 ; ARMV7-NEXT: vmov r2, r3, d17
1067 ; ARMV7-NEXT: vmovlt.f64 d16, d19
1068 ; ARMV7-NEXT: vmov r0, r1, d16
1071 ; ARMV8-LABEL: fminnumv264_one_zero_intrinsic:
1073 ; ARMV8-NEXT: vmov d19, r2, r3
1074 ; ARMV8-NEXT: vcmp.f64 d19, #0
1075 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1076 ; ARMV8-NEXT: vmov d18, r0, r1
1077 ; ARMV8-NEXT: vmov.f64 d16, #-1.000000e+00
1078 ; ARMV8-NEXT: vcmp.f64 d16, d18
1079 ; ARMV8-NEXT: vmov.i32 d17, #0x0
1080 ; ARMV8-NEXT: vmovlt.f64 d17, d19
1081 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1082 ; ARMV8-NEXT: vmov r2, r3, d17
1083 ; ARMV8-NEXT: vselgt.f64 d16, d18, d16
1084 ; ARMV8-NEXT: vmov r0, r1, d16
1087 ; ARMV8M-LABEL: fminnumv264_one_zero_intrinsic:
1089 ; ARMV8M-NEXT: vmov d3, r2, r3
1090 ; ARMV8M-NEXT: vldr d1, .LCPI27_0
1091 ; ARMV8M-NEXT: vcmp.f64 d3, #0
1092 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1093 ; ARMV8M-NEXT: vmov d2, r0, r1
1094 ; ARMV8M-NEXT: vmov.f64 d0, #-1.000000e+00
1095 ; ARMV8M-NEXT: vcmp.f64 d0, d2
1096 ; ARMV8M-NEXT: vmovlt.f64 d1, d3
1097 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1098 ; ARMV8M-NEXT: vmov r2, r3, d1
1099 ; ARMV8M-NEXT: vselgt.f64 d0, d2, d0
1100 ; ARMV8M-NEXT: vmov r0, r1, d0
1101 ; ARMV8M-NEXT: bx lr
1102 ; ARMV8M-NEXT: .p2align 3
1103 ; ARMV8M-NEXT: @ %bb.1:
1104 ; ARMV8M-NEXT: .LCPI27_0:
1105 ; ARMV8M-NEXT: .long 0 @ double 0
1106 ; ARMV8M-NEXT: .long 0
1107 %a = call nnan <2 x double> @llvm.minnum.v2f64(<2 x double> %x, <2 x double><double -1.0, double 0.0>)
1111 define <2 x double> @fmaxnumv264_intrinsic(<2 x double> %x, <2 x double> %y) {
1112 ; ARMV7-LABEL: fmaxnumv264_intrinsic:
1114 ; ARMV7-NEXT: mov r12, sp
1115 ; ARMV7-NEXT: vld1.64 {d16, d17}, [r12]
1116 ; ARMV7-NEXT: vmov d18, r0, r1
1117 ; ARMV7-NEXT: vcmp.f64 d18, d16
1118 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1119 ; ARMV7-NEXT: vmov d19, r2, r3
1120 ; ARMV7-NEXT: vcmp.f64 d19, d17
1121 ; ARMV7-NEXT: vmovgt.f64 d16, d18
1122 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1123 ; ARMV7-NEXT: vmov r0, r1, d16
1124 ; ARMV7-NEXT: vmovgt.f64 d17, d19
1125 ; ARMV7-NEXT: vmov r2, r3, d17
1128 ; ARMV8-LABEL: fmaxnumv264_intrinsic:
1130 ; ARMV8-NEXT: mov r12, sp
1131 ; ARMV8-NEXT: vld1.64 {d16, d17}, [r12]
1132 ; ARMV8-NEXT: vmov d18, r0, r1
1133 ; ARMV8-NEXT: vcmp.f64 d18, d16
1134 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1135 ; ARMV8-NEXT: vmov d19, r2, r3
1136 ; ARMV8-NEXT: vcmp.f64 d19, d17
1137 ; ARMV8-NEXT: vselgt.f64 d18, d18, d16
1138 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1139 ; ARMV8-NEXT: vmov r0, r1, d18
1140 ; ARMV8-NEXT: vselgt.f64 d16, d19, d17
1141 ; ARMV8-NEXT: vmov r2, r3, d16
1144 ; ARMV8M-LABEL: fmaxnumv264_intrinsic:
1146 ; ARMV8M-NEXT: mov r12, sp
1147 ; ARMV8M-NEXT: vmov d1, r0, r1
1148 ; ARMV8M-NEXT: vldrw.u32 q1, [r12]
1149 ; ARMV8M-NEXT: vmov d0, r2, r3
1150 ; ARMV8M-NEXT: vcmp.f64 d1, d2
1151 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1152 ; ARMV8M-NEXT: vcmp.f64 d0, d3
1153 ; ARMV8M-NEXT: vselgt.f64 d1, d1, d2
1154 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1155 ; ARMV8M-NEXT: vmov r0, r1, d1
1156 ; ARMV8M-NEXT: vselgt.f64 d0, d0, d3
1157 ; ARMV8M-NEXT: vmov r2, r3, d0
1158 ; ARMV8M-NEXT: bx lr
1159 %a = call nnan <2 x double> @llvm.maxnum.v2f64(<2 x double> %x, <2 x double> %y)
1163 define <2 x double> @fmaxnumv264_nsz_intrinsic(<2 x double> %x, <2 x double> %y) {
1164 ; ARMV7-LABEL: fmaxnumv264_nsz_intrinsic:
1166 ; ARMV7-NEXT: mov r12, sp
1167 ; ARMV7-NEXT: vld1.64 {d16, d17}, [r12]
1168 ; ARMV7-NEXT: vmov d18, r0, r1
1169 ; ARMV7-NEXT: vcmp.f64 d18, d16
1170 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1171 ; ARMV7-NEXT: vmov d19, r2, r3
1172 ; ARMV7-NEXT: vcmp.f64 d19, d17
1173 ; ARMV7-NEXT: vmovgt.f64 d16, d18
1174 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1175 ; ARMV7-NEXT: vmov r0, r1, d16
1176 ; ARMV7-NEXT: vmovgt.f64 d17, d19
1177 ; ARMV7-NEXT: vmov r2, r3, d17
1180 ; ARMV8-LABEL: fmaxnumv264_nsz_intrinsic:
1182 ; ARMV8-NEXT: mov r12, sp
1183 ; ARMV8-NEXT: vld1.64 {d16, d17}, [r12]
1184 ; ARMV8-NEXT: vmov d18, r0, r1
1185 ; ARMV8-NEXT: vcmp.f64 d18, d16
1186 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1187 ; ARMV8-NEXT: vmov d19, r2, r3
1188 ; ARMV8-NEXT: vcmp.f64 d19, d17
1189 ; ARMV8-NEXT: vselgt.f64 d18, d18, d16
1190 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1191 ; ARMV8-NEXT: vmov r0, r1, d18
1192 ; ARMV8-NEXT: vselgt.f64 d16, d19, d17
1193 ; ARMV8-NEXT: vmov r2, r3, d16
1196 ; ARMV8M-LABEL: fmaxnumv264_nsz_intrinsic:
1198 ; ARMV8M-NEXT: mov r12, sp
1199 ; ARMV8M-NEXT: vmov d1, r0, r1
1200 ; ARMV8M-NEXT: vldrw.u32 q1, [r12]
1201 ; ARMV8M-NEXT: vmov d0, r2, r3
1202 ; ARMV8M-NEXT: vcmp.f64 d1, d2
1203 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1204 ; ARMV8M-NEXT: vcmp.f64 d0, d3
1205 ; ARMV8M-NEXT: vselgt.f64 d1, d1, d2
1206 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1207 ; ARMV8M-NEXT: vmov r0, r1, d1
1208 ; ARMV8M-NEXT: vselgt.f64 d0, d0, d3
1209 ; ARMV8M-NEXT: vmov r2, r3, d0
1210 ; ARMV8M-NEXT: bx lr
1211 %a = call nnan nsz <2 x double> @llvm.maxnum.v2f64(<2 x double> %x, <2 x double> %y)
1215 define <2 x double> @fmaxnumv264_zero_intrinsic(<2 x double> %x) {
1216 ; ARMV7-LABEL: fmaxnumv264_zero_intrinsic:
1218 ; ARMV7-NEXT: vldr d17, .LCPI30_0
1219 ; ARMV7-NEXT: vmov d18, r2, r3
1220 ; ARMV7-NEXT: vmov d19, r0, r1
1221 ; ARMV7-NEXT: vcmp.f64 d18, d17
1222 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1223 ; ARMV7-NEXT: vmov.i32 d16, #0x0
1224 ; ARMV7-NEXT: vcmp.f64 d19, #0
1225 ; ARMV7-NEXT: vmovgt.f64 d17, d18
1226 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1227 ; ARMV7-NEXT: vmov r2, r3, d17
1228 ; ARMV7-NEXT: vmovgt.f64 d16, d19
1229 ; ARMV7-NEXT: vmov r0, r1, d16
1231 ; ARMV7-NEXT: .p2align 3
1232 ; ARMV7-NEXT: @ %bb.1:
1233 ; ARMV7-NEXT: .LCPI30_0:
1234 ; ARMV7-NEXT: .long 0 @ double -0
1235 ; ARMV7-NEXT: .long 2147483648
1237 ; ARMV8-LABEL: fmaxnumv264_zero_intrinsic:
1239 ; ARMV8-NEXT: vmov d18, r0, r1
1240 ; ARMV8-NEXT: vldr d16, .LCPI30_0
1241 ; ARMV8-NEXT: vcmp.f64 d18, #0
1242 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1243 ; ARMV8-NEXT: vmov d19, r2, r3
1244 ; ARMV8-NEXT: vcmp.f64 d19, d16
1245 ; ARMV8-NEXT: vmov.i32 d17, #0x0
1246 ; ARMV8-NEXT: vselgt.f64 d17, d18, d17
1247 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1248 ; ARMV8-NEXT: vmov r0, r1, d17
1249 ; ARMV8-NEXT: vselgt.f64 d16, d19, d16
1250 ; ARMV8-NEXT: vmov r2, r3, d16
1252 ; ARMV8-NEXT: .p2align 3
1253 ; ARMV8-NEXT: @ %bb.1:
1254 ; ARMV8-NEXT: .LCPI30_0:
1255 ; ARMV8-NEXT: .long 0 @ double -0
1256 ; ARMV8-NEXT: .long 2147483648
1258 ; ARMV8M-LABEL: fmaxnumv264_zero_intrinsic:
1260 ; ARMV8M-NEXT: vmov d2, r0, r1
1261 ; ARMV8M-NEXT: vldr d0, .LCPI30_0
1262 ; ARMV8M-NEXT: vcmp.f64 d2, #0
1263 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1264 ; ARMV8M-NEXT: vmov d3, r2, r3
1265 ; ARMV8M-NEXT: vcmp.f64 d3, d0
1266 ; ARMV8M-NEXT: vldr d1, .LCPI30_1
1267 ; ARMV8M-NEXT: vselgt.f64 d1, d2, d1
1268 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1269 ; ARMV8M-NEXT: vmov r0, r1, d1
1270 ; ARMV8M-NEXT: vselgt.f64 d0, d3, d0
1271 ; ARMV8M-NEXT: vmov r2, r3, d0
1272 ; ARMV8M-NEXT: bx lr
1273 ; ARMV8M-NEXT: .p2align 3
1274 ; ARMV8M-NEXT: @ %bb.1:
1275 ; ARMV8M-NEXT: .LCPI30_0:
1276 ; ARMV8M-NEXT: .long 0 @ double -0
1277 ; ARMV8M-NEXT: .long 2147483648
1278 ; ARMV8M-NEXT: .LCPI30_1:
1279 ; ARMV8M-NEXT: .long 0 @ double 0
1280 ; ARMV8M-NEXT: .long 0
1281 %a = call nnan <2 x double> @llvm.maxnum.v2f64(<2 x double> %x, <2 x double><double 0.0, double -0.0>)
1285 define <2 x double> @fmaxnumv264_minus_zero_intrinsic(<2 x double> %x) {
1286 ; ARMV7-LABEL: fmaxnumv264_minus_zero_intrinsic:
1288 ; ARMV7-NEXT: vldr d16, .LCPI31_0
1289 ; ARMV7-NEXT: vmov d17, r0, r1
1290 ; ARMV7-NEXT: vmov d18, r2, r3
1291 ; ARMV7-NEXT: vcmp.f64 d17, d16
1292 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1293 ; ARMV7-NEXT: vcmp.f64 d18, d16
1294 ; ARMV7-NEXT: vmov.f64 d19, d16
1295 ; ARMV7-NEXT: vmovgt.f64 d19, d17
1296 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1297 ; ARMV7-NEXT: vmov r0, r1, d19
1298 ; ARMV7-NEXT: vmovgt.f64 d16, d18
1299 ; ARMV7-NEXT: vmov r2, r3, d16
1301 ; ARMV7-NEXT: .p2align 3
1302 ; ARMV7-NEXT: @ %bb.1:
1303 ; ARMV7-NEXT: .LCPI31_0:
1304 ; ARMV7-NEXT: .long 0 @ double -0
1305 ; ARMV7-NEXT: .long 2147483648
1307 ; ARMV8-LABEL: fmaxnumv264_minus_zero_intrinsic:
1309 ; ARMV8-NEXT: vldr d16, .LCPI31_0
1310 ; ARMV8-NEXT: vmov d17, r0, r1
1311 ; ARMV8-NEXT: vmov d18, r2, r3
1312 ; ARMV8-NEXT: vcmp.f64 d17, d16
1313 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1314 ; ARMV8-NEXT: vcmp.f64 d18, d16
1315 ; ARMV8-NEXT: vselgt.f64 d17, d17, d16
1316 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1317 ; ARMV8-NEXT: vmov r0, r1, d17
1318 ; ARMV8-NEXT: vselgt.f64 d16, d18, d16
1319 ; ARMV8-NEXT: vmov r2, r3, d16
1321 ; ARMV8-NEXT: .p2align 3
1322 ; ARMV8-NEXT: @ %bb.1:
1323 ; ARMV8-NEXT: .LCPI31_0:
1324 ; ARMV8-NEXT: .long 0 @ double -0
1325 ; ARMV8-NEXT: .long 2147483648
1327 ; ARMV8M-LABEL: fmaxnumv264_minus_zero_intrinsic:
1329 ; ARMV8M-NEXT: vldr d0, .LCPI31_0
1330 ; ARMV8M-NEXT: vmov d1, r0, r1
1331 ; ARMV8M-NEXT: vmov d2, r2, r3
1332 ; ARMV8M-NEXT: vcmp.f64 d1, d0
1333 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1334 ; ARMV8M-NEXT: vcmp.f64 d2, d0
1335 ; ARMV8M-NEXT: vselgt.f64 d1, d1, d0
1336 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1337 ; ARMV8M-NEXT: vmov r0, r1, d1
1338 ; ARMV8M-NEXT: vselgt.f64 d0, d2, d0
1339 ; ARMV8M-NEXT: vmov r2, r3, d0
1340 ; ARMV8M-NEXT: bx lr
1341 ; ARMV8M-NEXT: .p2align 3
1342 ; ARMV8M-NEXT: @ %bb.1:
1343 ; ARMV8M-NEXT: .LCPI31_0:
1344 ; ARMV8M-NEXT: .long 0 @ double -0
1345 ; ARMV8M-NEXT: .long 2147483648
1346 %a = call nnan <2 x double> @llvm.maxnum.v2f64(<2 x double> %x, <2 x double><double -0.0, double -0.0>)
1350 define <2 x double> @fmaxnumv264_non_zero_intrinsic(<2 x double> %x) {
1351 ; ARMV7-LABEL: fmaxnumv264_non_zero_intrinsic:
1353 ; ARMV7-NEXT: vmov.f64 d16, #1.000000e+00
1354 ; ARMV7-NEXT: vmov d17, r0, r1
1355 ; ARMV7-NEXT: vcmp.f64 d17, d16
1356 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1357 ; ARMV7-NEXT: vmov d18, r2, r3
1358 ; ARMV7-NEXT: vcmp.f64 d18, d16
1359 ; ARMV7-NEXT: vmov.f64 d19, d16
1360 ; ARMV7-NEXT: vmovgt.f64 d19, d17
1361 ; ARMV7-NEXT: vmrs APSR_nzcv, fpscr
1362 ; ARMV7-NEXT: vmov r0, r1, d19
1363 ; ARMV7-NEXT: vmovgt.f64 d16, d18
1364 ; ARMV7-NEXT: vmov r2, r3, d16
1367 ; ARMV8-LABEL: fmaxnumv264_non_zero_intrinsic:
1369 ; ARMV8-NEXT: vmov.f64 d16, #1.000000e+00
1370 ; ARMV8-NEXT: vmov d17, r0, r1
1371 ; ARMV8-NEXT: vcmp.f64 d17, d16
1372 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1373 ; ARMV8-NEXT: vmov d18, r2, r3
1374 ; ARMV8-NEXT: vcmp.f64 d18, d16
1375 ; ARMV8-NEXT: vselgt.f64 d17, d17, d16
1376 ; ARMV8-NEXT: vmrs APSR_nzcv, fpscr
1377 ; ARMV8-NEXT: vmov r0, r1, d17
1378 ; ARMV8-NEXT: vselgt.f64 d16, d18, d16
1379 ; ARMV8-NEXT: vmov r2, r3, d16
1382 ; ARMV8M-LABEL: fmaxnumv264_non_zero_intrinsic:
1384 ; ARMV8M-NEXT: vmov.f64 d0, #1.000000e+00
1385 ; ARMV8M-NEXT: vmov d1, r0, r1
1386 ; ARMV8M-NEXT: vcmp.f64 d1, d0
1387 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1388 ; ARMV8M-NEXT: vmov d2, r2, r3
1389 ; ARMV8M-NEXT: vcmp.f64 d2, d0
1390 ; ARMV8M-NEXT: vselgt.f64 d1, d1, d0
1391 ; ARMV8M-NEXT: vmrs APSR_nzcv, fpscr
1392 ; ARMV8M-NEXT: vmov r0, r1, d1
1393 ; ARMV8M-NEXT: vselgt.f64 d0, d2, d0
1394 ; ARMV8M-NEXT: vmov r2, r3, d0
1395 ; ARMV8M-NEXT: bx lr
1396 %a = call nnan <2 x double> @llvm.maxnum.v2f64(<2 x double> %x, <2 x double><double 1.0, double 1.0>)
1400 define void @pr65820(ptr %y, <4 x float> %splat) {
1401 ; ARMV7-LABEL: pr65820:
1402 ; ARMV7: @ %bb.0: @ %entry
1403 ; ARMV7-NEXT: vmov d16, r2, r3
1404 ; ARMV7-NEXT: vdup.32 q8, d16[0]
1405 ; ARMV7-NEXT: vcgt.f32 q9, q8, #0
1406 ; ARMV7-NEXT: vand q8, q8, q9
1407 ; ARMV7-NEXT: vst1.32 {d16, d17}, [r0]
1410 ; ARMV8-LABEL: pr65820:
1411 ; ARMV8: @ %bb.0: @ %entry
1412 ; ARMV8-NEXT: vmov d16, r2, r3
1413 ; ARMV8-NEXT: vmov.i32 q9, #0x0
1414 ; ARMV8-NEXT: vdup.32 q8, d16[0]
1415 ; ARMV8-NEXT: vmaxnm.f32 q8, q8, q9
1416 ; ARMV8-NEXT: vst1.32 {d16, d17}, [r0]
1419 ; ARMV8M-LABEL: pr65820:
1420 ; ARMV8M: @ %bb.0: @ %entry
1421 ; ARMV8M-NEXT: vmov d0, r2, r3
1422 ; ARMV8M-NEXT: vmov r1, s0
1423 ; ARMV8M-NEXT: vmov.i32 q0, #0x0
1424 ; ARMV8M-NEXT: vdup.32 q1, r1
1425 ; ARMV8M-NEXT: vmaxnm.f32 q0, q1, q0
1426 ; ARMV8M-NEXT: vstrw.32 q0, [r0]
1427 ; ARMV8M-NEXT: bx lr
1429 %broadcast.splat = shufflevector <4 x float> %splat, <4 x float> zeroinitializer, <4 x i32> zeroinitializer
1430 %0 = fcmp ogt <4 x float> %broadcast.splat, zeroinitializer
1431 %1 = select <4 x i1> %0, <4 x float> %broadcast.splat, <4 x float> zeroinitializer
1432 store <4 x float> %1, ptr %y, align 4