1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=sse2 < %s | FileCheck %s --check-prefix=CHECK --check-prefix=SSE
3 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=avx < %s | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX1
4 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=avx512f < %s | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX512
6 declare float @fmaxf(float, float)
7 declare double @fmax(double, double)
8 declare x86_fp80 @fmaxl(x86_fp80, x86_fp80)
9 declare float @llvm.maxnum.f32(float, float)
10 declare double @llvm.maxnum.f64(double, double)
11 declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80)
13 declare <2 x float> @llvm.maxnum.v2f32(<2 x float>, <2 x float>)
14 declare <4 x float> @llvm.maxnum.v4f32(<4 x float>, <4 x float>)
15 declare <8 x float> @llvm.maxnum.v8f32(<8 x float>, <8 x float>)
16 declare <16 x float> @llvm.maxnum.v16f32(<16 x float>, <16 x float>)
17 declare <2 x double> @llvm.maxnum.v2f64(<2 x double>, <2 x double>)
18 declare <4 x double> @llvm.maxnum.v4f64(<4 x double>, <4 x double>)
19 declare <8 x double> @llvm.maxnum.v8f64(<8 x double>, <8 x double>)
21 ; FIXME: As the vector tests show, the SSE run shouldn't need this many moves.
23 define float @test_fmaxf(float %x, float %y) {
24 ; SSE-LABEL: test_fmaxf:
26 ; SSE-NEXT: movaps %xmm0, %xmm2
27 ; SSE-NEXT: cmpunordss %xmm0, %xmm2
28 ; SSE-NEXT: movaps %xmm2, %xmm3
29 ; SSE-NEXT: andps %xmm1, %xmm3
30 ; SSE-NEXT: maxss %xmm0, %xmm1
31 ; SSE-NEXT: andnps %xmm1, %xmm2
32 ; SSE-NEXT: orps %xmm3, %xmm2
33 ; SSE-NEXT: movaps %xmm2, %xmm0
36 ; AVX1-LABEL: test_fmaxf:
38 ; AVX1-NEXT: vmaxss %xmm0, %xmm1, %xmm2
39 ; AVX1-NEXT: vcmpunordss %xmm0, %xmm0, %xmm0
40 ; AVX1-NEXT: vblendvps %xmm0, %xmm1, %xmm2, %xmm0
43 ; AVX512-LABEL: test_fmaxf:
45 ; AVX512-NEXT: vmaxss %xmm0, %xmm1, %xmm2
46 ; AVX512-NEXT: vcmpunordss %xmm0, %xmm0, %k1
47 ; AVX512-NEXT: vmovss %xmm1, %xmm2, %xmm2 {%k1}
48 ; AVX512-NEXT: vmovaps %xmm2, %xmm0
50 %z = call float @fmaxf(float %x, float %y) readnone
54 define float @test_fmaxf_minsize(float %x, float %y) minsize {
55 ; CHECK-LABEL: test_fmaxf_minsize:
57 ; CHECK-NEXT: jmp fmaxf # TAILCALL
58 %z = call float @fmaxf(float %x, float %y) readnone
62 ; FIXME: As the vector tests show, the SSE run shouldn't need this many moves.
64 define double @test_fmax(double %x, double %y) {
65 ; SSE-LABEL: test_fmax:
67 ; SSE-NEXT: movapd %xmm0, %xmm2
68 ; SSE-NEXT: cmpunordsd %xmm0, %xmm2
69 ; SSE-NEXT: movapd %xmm2, %xmm3
70 ; SSE-NEXT: andpd %xmm1, %xmm3
71 ; SSE-NEXT: maxsd %xmm0, %xmm1
72 ; SSE-NEXT: andnpd %xmm1, %xmm2
73 ; SSE-NEXT: orpd %xmm3, %xmm2
74 ; SSE-NEXT: movapd %xmm2, %xmm0
77 ; AVX1-LABEL: test_fmax:
79 ; AVX1-NEXT: vmaxsd %xmm0, %xmm1, %xmm2
80 ; AVX1-NEXT: vcmpunordsd %xmm0, %xmm0, %xmm0
81 ; AVX1-NEXT: vblendvpd %xmm0, %xmm1, %xmm2, %xmm0
84 ; AVX512-LABEL: test_fmax:
86 ; AVX512-NEXT: vmaxsd %xmm0, %xmm1, %xmm2
87 ; AVX512-NEXT: vcmpunordsd %xmm0, %xmm0, %k1
88 ; AVX512-NEXT: vmovsd %xmm1, %xmm2, %xmm2 {%k1}
89 ; AVX512-NEXT: vmovapd %xmm2, %xmm0
91 %z = call double @fmax(double %x, double %y) readnone
95 define x86_fp80 @test_fmaxl(x86_fp80 %x, x86_fp80 %y) {
96 ; CHECK-LABEL: test_fmaxl:
98 ; CHECK-NEXT: subq $40, %rsp
99 ; CHECK-NEXT: .cfi_def_cfa_offset 48
100 ; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
101 ; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
102 ; CHECK-NEXT: fstpt {{[0-9]+}}(%rsp)
103 ; CHECK-NEXT: fstpt (%rsp)
104 ; CHECK-NEXT: callq fmaxl
105 ; CHECK-NEXT: addq $40, %rsp
106 ; CHECK-NEXT: .cfi_def_cfa_offset 8
108 %z = call x86_fp80 @fmaxl(x86_fp80 %x, x86_fp80 %y) readnone
112 define float @test_intrinsic_fmaxf(float %x, float %y) {
113 ; SSE-LABEL: test_intrinsic_fmaxf:
115 ; SSE-NEXT: movaps %xmm0, %xmm2
116 ; SSE-NEXT: cmpunordss %xmm0, %xmm2
117 ; SSE-NEXT: movaps %xmm2, %xmm3
118 ; SSE-NEXT: andps %xmm1, %xmm3
119 ; SSE-NEXT: maxss %xmm0, %xmm1
120 ; SSE-NEXT: andnps %xmm1, %xmm2
121 ; SSE-NEXT: orps %xmm3, %xmm2
122 ; SSE-NEXT: movaps %xmm2, %xmm0
125 ; AVX1-LABEL: test_intrinsic_fmaxf:
127 ; AVX1-NEXT: vmaxss %xmm0, %xmm1, %xmm2
128 ; AVX1-NEXT: vcmpunordss %xmm0, %xmm0, %xmm0
129 ; AVX1-NEXT: vblendvps %xmm0, %xmm1, %xmm2, %xmm0
132 ; AVX512-LABEL: test_intrinsic_fmaxf:
134 ; AVX512-NEXT: vmaxss %xmm0, %xmm1, %xmm2
135 ; AVX512-NEXT: vcmpunordss %xmm0, %xmm0, %k1
136 ; AVX512-NEXT: vmovss %xmm1, %xmm2, %xmm2 {%k1}
137 ; AVX512-NEXT: vmovaps %xmm2, %xmm0
139 %z = call float @llvm.maxnum.f32(float %x, float %y) readnone
143 define double @test_intrinsic_fmax(double %x, double %y) {
144 ; SSE-LABEL: test_intrinsic_fmax:
146 ; SSE-NEXT: movapd %xmm0, %xmm2
147 ; SSE-NEXT: cmpunordsd %xmm0, %xmm2
148 ; SSE-NEXT: movapd %xmm2, %xmm3
149 ; SSE-NEXT: andpd %xmm1, %xmm3
150 ; SSE-NEXT: maxsd %xmm0, %xmm1
151 ; SSE-NEXT: andnpd %xmm1, %xmm2
152 ; SSE-NEXT: orpd %xmm3, %xmm2
153 ; SSE-NEXT: movapd %xmm2, %xmm0
156 ; AVX1-LABEL: test_intrinsic_fmax:
158 ; AVX1-NEXT: vmaxsd %xmm0, %xmm1, %xmm2
159 ; AVX1-NEXT: vcmpunordsd %xmm0, %xmm0, %xmm0
160 ; AVX1-NEXT: vblendvpd %xmm0, %xmm1, %xmm2, %xmm0
163 ; AVX512-LABEL: test_intrinsic_fmax:
165 ; AVX512-NEXT: vmaxsd %xmm0, %xmm1, %xmm2
166 ; AVX512-NEXT: vcmpunordsd %xmm0, %xmm0, %k1
167 ; AVX512-NEXT: vmovsd %xmm1, %xmm2, %xmm2 {%k1}
168 ; AVX512-NEXT: vmovapd %xmm2, %xmm0
170 %z = call double @llvm.maxnum.f64(double %x, double %y) readnone
174 define x86_fp80 @test_intrinsic_fmaxl(x86_fp80 %x, x86_fp80 %y) {
175 ; CHECK-LABEL: test_intrinsic_fmaxl:
177 ; CHECK-NEXT: subq $40, %rsp
178 ; CHECK-NEXT: .cfi_def_cfa_offset 48
179 ; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
180 ; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
181 ; CHECK-NEXT: fstpt {{[0-9]+}}(%rsp)
182 ; CHECK-NEXT: fstpt (%rsp)
183 ; CHECK-NEXT: callq fmaxl
184 ; CHECK-NEXT: addq $40, %rsp
185 ; CHECK-NEXT: .cfi_def_cfa_offset 8
187 %z = call x86_fp80 @llvm.maxnum.f80(x86_fp80 %x, x86_fp80 %y) readnone
191 define <2 x float> @test_intrinsic_fmax_v2f32(<2 x float> %x, <2 x float> %y) {
192 ; SSE-LABEL: test_intrinsic_fmax_v2f32:
194 ; SSE-NEXT: movaps %xmm1, %xmm2
195 ; SSE-NEXT: maxps %xmm0, %xmm2
196 ; SSE-NEXT: cmpunordps %xmm0, %xmm0
197 ; SSE-NEXT: andps %xmm0, %xmm1
198 ; SSE-NEXT: andnps %xmm2, %xmm0
199 ; SSE-NEXT: orps %xmm1, %xmm0
202 ; AVX-LABEL: test_intrinsic_fmax_v2f32:
204 ; AVX-NEXT: vmaxps %xmm0, %xmm1, %xmm2
205 ; AVX-NEXT: vcmpunordps %xmm0, %xmm0, %xmm0
206 ; AVX-NEXT: vblendvps %xmm0, %xmm1, %xmm2, %xmm0
208 %z = call <2 x float> @llvm.maxnum.v2f32(<2 x float> %x, <2 x float> %y) readnone
212 define <4 x float> @test_intrinsic_fmax_v4f32(<4 x float> %x, <4 x float> %y) {
213 ; SSE-LABEL: test_intrinsic_fmax_v4f32:
215 ; SSE-NEXT: movaps %xmm1, %xmm2
216 ; SSE-NEXT: maxps %xmm0, %xmm2
217 ; SSE-NEXT: cmpunordps %xmm0, %xmm0
218 ; SSE-NEXT: andps %xmm0, %xmm1
219 ; SSE-NEXT: andnps %xmm2, %xmm0
220 ; SSE-NEXT: orps %xmm1, %xmm0
223 ; AVX-LABEL: test_intrinsic_fmax_v4f32:
225 ; AVX-NEXT: vmaxps %xmm0, %xmm1, %xmm2
226 ; AVX-NEXT: vcmpunordps %xmm0, %xmm0, %xmm0
227 ; AVX-NEXT: vblendvps %xmm0, %xmm1, %xmm2, %xmm0
229 %z = call <4 x float> @llvm.maxnum.v4f32(<4 x float> %x, <4 x float> %y) readnone
233 define <8 x float> @test_intrinsic_fmax_v8f32(<8 x float> %x, <8 x float> %y) {
234 ; SSE-LABEL: test_intrinsic_fmax_v8f32:
236 ; SSE-NEXT: movaps %xmm2, %xmm4
237 ; SSE-NEXT: maxps %xmm0, %xmm4
238 ; SSE-NEXT: cmpunordps %xmm0, %xmm0
239 ; SSE-NEXT: andps %xmm0, %xmm2
240 ; SSE-NEXT: andnps %xmm4, %xmm0
241 ; SSE-NEXT: orps %xmm2, %xmm0
242 ; SSE-NEXT: movaps %xmm3, %xmm2
243 ; SSE-NEXT: maxps %xmm1, %xmm2
244 ; SSE-NEXT: cmpunordps %xmm1, %xmm1
245 ; SSE-NEXT: andps %xmm1, %xmm3
246 ; SSE-NEXT: andnps %xmm2, %xmm1
247 ; SSE-NEXT: orps %xmm3, %xmm1
250 ; AVX-LABEL: test_intrinsic_fmax_v8f32:
252 ; AVX-NEXT: vmaxps %ymm0, %ymm1, %ymm2
253 ; AVX-NEXT: vcmpunordps %ymm0, %ymm0, %ymm0
254 ; AVX-NEXT: vblendvps %ymm0, %ymm1, %ymm2, %ymm0
256 %z = call <8 x float> @llvm.maxnum.v8f32(<8 x float> %x, <8 x float> %y) readnone
260 define <16 x float> @test_intrinsic_fmax_v16f32(<16 x float> %x, <16 x float> %y) {
261 ; SSE-LABEL: test_intrinsic_fmax_v16f32:
263 ; SSE-NEXT: movaps %xmm4, %xmm8
264 ; SSE-NEXT: maxps %xmm0, %xmm8
265 ; SSE-NEXT: cmpunordps %xmm0, %xmm0
266 ; SSE-NEXT: andps %xmm0, %xmm4
267 ; SSE-NEXT: andnps %xmm8, %xmm0
268 ; SSE-NEXT: orps %xmm4, %xmm0
269 ; SSE-NEXT: movaps %xmm5, %xmm4
270 ; SSE-NEXT: maxps %xmm1, %xmm4
271 ; SSE-NEXT: cmpunordps %xmm1, %xmm1
272 ; SSE-NEXT: andps %xmm1, %xmm5
273 ; SSE-NEXT: andnps %xmm4, %xmm1
274 ; SSE-NEXT: orps %xmm5, %xmm1
275 ; SSE-NEXT: movaps %xmm6, %xmm4
276 ; SSE-NEXT: maxps %xmm2, %xmm4
277 ; SSE-NEXT: cmpunordps %xmm2, %xmm2
278 ; SSE-NEXT: andps %xmm2, %xmm6
279 ; SSE-NEXT: andnps %xmm4, %xmm2
280 ; SSE-NEXT: orps %xmm6, %xmm2
281 ; SSE-NEXT: movaps %xmm7, %xmm4
282 ; SSE-NEXT: maxps %xmm3, %xmm4
283 ; SSE-NEXT: cmpunordps %xmm3, %xmm3
284 ; SSE-NEXT: andps %xmm3, %xmm7
285 ; SSE-NEXT: andnps %xmm4, %xmm3
286 ; SSE-NEXT: orps %xmm7, %xmm3
289 ; AVX1-LABEL: test_intrinsic_fmax_v16f32:
291 ; AVX1-NEXT: vmaxps %ymm0, %ymm2, %ymm4
292 ; AVX1-NEXT: vcmpunordps %ymm0, %ymm0, %ymm0
293 ; AVX1-NEXT: vblendvps %ymm0, %ymm2, %ymm4, %ymm0
294 ; AVX1-NEXT: vmaxps %ymm1, %ymm3, %ymm2
295 ; AVX1-NEXT: vcmpunordps %ymm1, %ymm1, %ymm1
296 ; AVX1-NEXT: vblendvps %ymm1, %ymm3, %ymm2, %ymm1
299 ; AVX512-LABEL: test_intrinsic_fmax_v16f32:
301 ; AVX512-NEXT: vmaxps %zmm0, %zmm1, %zmm2
302 ; AVX512-NEXT: vcmpunordps %zmm0, %zmm0, %k1
303 ; AVX512-NEXT: vmovaps %zmm1, %zmm2 {%k1}
304 ; AVX512-NEXT: vmovaps %zmm2, %zmm0
306 %z = call <16 x float> @llvm.maxnum.v16f32(<16 x float> %x, <16 x float> %y) readnone
310 define <2 x double> @test_intrinsic_fmax_v2f64(<2 x double> %x, <2 x double> %y) {
311 ; SSE-LABEL: test_intrinsic_fmax_v2f64:
313 ; SSE-NEXT: movapd %xmm1, %xmm2
314 ; SSE-NEXT: maxpd %xmm0, %xmm2
315 ; SSE-NEXT: cmpunordpd %xmm0, %xmm0
316 ; SSE-NEXT: andpd %xmm0, %xmm1
317 ; SSE-NEXT: andnpd %xmm2, %xmm0
318 ; SSE-NEXT: orpd %xmm1, %xmm0
321 ; AVX-LABEL: test_intrinsic_fmax_v2f64:
323 ; AVX-NEXT: vmaxpd %xmm0, %xmm1, %xmm2
324 ; AVX-NEXT: vcmpunordpd %xmm0, %xmm0, %xmm0
325 ; AVX-NEXT: vblendvpd %xmm0, %xmm1, %xmm2, %xmm0
327 %z = call <2 x double> @llvm.maxnum.v2f64(<2 x double> %x, <2 x double> %y) readnone
331 define <4 x double> @test_intrinsic_fmax_v4f64(<4 x double> %x, <4 x double> %y) {
332 ; SSE-LABEL: test_intrinsic_fmax_v4f64:
334 ; SSE-NEXT: movapd %xmm2, %xmm4
335 ; SSE-NEXT: maxpd %xmm0, %xmm4
336 ; SSE-NEXT: cmpunordpd %xmm0, %xmm0
337 ; SSE-NEXT: andpd %xmm0, %xmm2
338 ; SSE-NEXT: andnpd %xmm4, %xmm0
339 ; SSE-NEXT: orpd %xmm2, %xmm0
340 ; SSE-NEXT: movapd %xmm3, %xmm2
341 ; SSE-NEXT: maxpd %xmm1, %xmm2
342 ; SSE-NEXT: cmpunordpd %xmm1, %xmm1
343 ; SSE-NEXT: andpd %xmm1, %xmm3
344 ; SSE-NEXT: andnpd %xmm2, %xmm1
345 ; SSE-NEXT: orpd %xmm3, %xmm1
348 ; AVX-LABEL: test_intrinsic_fmax_v4f64:
350 ; AVX-NEXT: vmaxpd %ymm0, %ymm1, %ymm2
351 ; AVX-NEXT: vcmpunordpd %ymm0, %ymm0, %ymm0
352 ; AVX-NEXT: vblendvpd %ymm0, %ymm1, %ymm2, %ymm0
354 %z = call <4 x double> @llvm.maxnum.v4f64(<4 x double> %x, <4 x double> %y) readnone
358 define <8 x double> @test_intrinsic_fmax_v8f64(<8 x double> %x, <8 x double> %y) {
359 ; SSE-LABEL: test_intrinsic_fmax_v8f64:
361 ; SSE-NEXT: movapd %xmm4, %xmm8
362 ; SSE-NEXT: maxpd %xmm0, %xmm8
363 ; SSE-NEXT: cmpunordpd %xmm0, %xmm0
364 ; SSE-NEXT: andpd %xmm0, %xmm4
365 ; SSE-NEXT: andnpd %xmm8, %xmm0
366 ; SSE-NEXT: orpd %xmm4, %xmm0
367 ; SSE-NEXT: movapd %xmm5, %xmm4
368 ; SSE-NEXT: maxpd %xmm1, %xmm4
369 ; SSE-NEXT: cmpunordpd %xmm1, %xmm1
370 ; SSE-NEXT: andpd %xmm1, %xmm5
371 ; SSE-NEXT: andnpd %xmm4, %xmm1
372 ; SSE-NEXT: orpd %xmm5, %xmm1
373 ; SSE-NEXT: movapd %xmm6, %xmm4
374 ; SSE-NEXT: maxpd %xmm2, %xmm4
375 ; SSE-NEXT: cmpunordpd %xmm2, %xmm2
376 ; SSE-NEXT: andpd %xmm2, %xmm6
377 ; SSE-NEXT: andnpd %xmm4, %xmm2
378 ; SSE-NEXT: orpd %xmm6, %xmm2
379 ; SSE-NEXT: movapd %xmm7, %xmm4
380 ; SSE-NEXT: maxpd %xmm3, %xmm4
381 ; SSE-NEXT: cmpunordpd %xmm3, %xmm3
382 ; SSE-NEXT: andpd %xmm3, %xmm7
383 ; SSE-NEXT: andnpd %xmm4, %xmm3
384 ; SSE-NEXT: orpd %xmm7, %xmm3
387 ; AVX1-LABEL: test_intrinsic_fmax_v8f64:
389 ; AVX1-NEXT: vmaxpd %ymm0, %ymm2, %ymm4
390 ; AVX1-NEXT: vcmpunordpd %ymm0, %ymm0, %ymm0
391 ; AVX1-NEXT: vblendvpd %ymm0, %ymm2, %ymm4, %ymm0
392 ; AVX1-NEXT: vmaxpd %ymm1, %ymm3, %ymm2
393 ; AVX1-NEXT: vcmpunordpd %ymm1, %ymm1, %ymm1
394 ; AVX1-NEXT: vblendvpd %ymm1, %ymm3, %ymm2, %ymm1
397 ; AVX512-LABEL: test_intrinsic_fmax_v8f64:
399 ; AVX512-NEXT: vmaxpd %zmm0, %zmm1, %zmm2
400 ; AVX512-NEXT: vcmpunordpd %zmm0, %zmm0, %k1
401 ; AVX512-NEXT: vmovapd %zmm1, %zmm2 {%k1}
402 ; AVX512-NEXT: vmovapd %zmm2, %zmm0
404 %z = call <8 x double> @llvm.maxnum.v8f64(<8 x double> %x, <8 x double> %y) readnone
408 ; The IR-level FMF propagate to the node. With nnan, there's no need to blend.
410 define double @maxnum_intrinsic_nnan_fmf_f64(double %a, double %b) {
411 ; SSE-LABEL: maxnum_intrinsic_nnan_fmf_f64:
413 ; SSE-NEXT: maxsd %xmm1, %xmm0
416 ; AVX-LABEL: maxnum_intrinsic_nnan_fmf_f64:
418 ; AVX-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
420 %r = tail call nnan double @llvm.maxnum.f64(double %a, double %b)
424 ; Make sure vectors work too.
426 define <4 x float> @maxnum_intrinsic_nnan_fmf_f432(<4 x float> %a, <4 x float> %b) {
427 ; SSE-LABEL: maxnum_intrinsic_nnan_fmf_f432:
429 ; SSE-NEXT: maxps %xmm1, %xmm0
432 ; AVX-LABEL: maxnum_intrinsic_nnan_fmf_f432:
434 ; AVX-NEXT: vmaxps %xmm1, %xmm0, %xmm0
436 %r = tail call nnan <4 x float> @llvm.maxnum.v4f32(<4 x float> %a, <4 x float> %b)
440 ; Current (but legacy someday): a function-level attribute should also enable the fold.
442 define float @maxnum_intrinsic_nnan_attr_f32(float %a, float %b) #0 {
443 ; SSE-LABEL: maxnum_intrinsic_nnan_attr_f32:
445 ; SSE-NEXT: maxss %xmm1, %xmm0
448 ; AVX-LABEL: maxnum_intrinsic_nnan_attr_f32:
450 ; AVX-NEXT: vmaxss %xmm1, %xmm0, %xmm0
452 %r = tail call float @llvm.maxnum.f32(float %a, float %b)
456 ; Make sure vectors work too.
458 define <2 x double> @maxnum_intrinsic_nnan_attr_f64(<2 x double> %a, <2 x double> %b) #0 {
459 ; SSE-LABEL: maxnum_intrinsic_nnan_attr_f64:
461 ; SSE-NEXT: maxpd %xmm1, %xmm0
464 ; AVX-LABEL: maxnum_intrinsic_nnan_attr_f64:
466 ; AVX-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
468 %r = tail call <2 x double> @llvm.maxnum.v2f64(<2 x double> %a, <2 x double> %b)
472 define float @test_maxnum_const_op1(float %x) {
473 ; SSE-LABEL: test_maxnum_const_op1:
475 ; SSE-NEXT: maxss {{.*}}(%rip), %xmm0
478 ; AVX-LABEL: test_maxnum_const_op1:
480 ; AVX-NEXT: vmaxss {{.*}}(%rip), %xmm0, %xmm0
482 %r = call float @llvm.maxnum.f32(float 1.0, float %x)
486 define float @test_maxnum_const_op2(float %x) {
487 ; SSE-LABEL: test_maxnum_const_op2:
489 ; SSE-NEXT: maxss {{.*}}(%rip), %xmm0
492 ; AVX-LABEL: test_maxnum_const_op2:
494 ; AVX-NEXT: vmaxss {{.*}}(%rip), %xmm0, %xmm0
496 %r = call float @llvm.maxnum.f32(float %x, float 1.0)
500 attributes #0 = { "no-nans-fp-math"="true" }