1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512fp16 -O3 | FileCheck %s --check-prefixes=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512fp16 -O3 | FileCheck %s --check-prefixes=X64
5 define <32 x i16> @test_v32f16_oeq_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
6 ; X86-LABEL: test_v32f16_oeq_q:
9 ; X86-NEXT: movl %esp, %ebp
10 ; X86-NEXT: andl $-64, %esp
11 ; X86-NEXT: subl $64, %esp
12 ; X86-NEXT: vcmpeqph 8(%ebp), %zmm2, %k1
13 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
14 ; X86-NEXT: movl %ebp, %esp
18 ; X64-LABEL: test_v32f16_oeq_q:
20 ; X64-NEXT: vcmpeqph %zmm3, %zmm2, %k1
21 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
23 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
24 <32 x half> %f1, <32 x half> %f2, metadata !"oeq",
25 metadata !"fpexcept.strict") #0
26 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
30 define <32 x i16> @test_v32f16_ogt_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
31 ; X86-LABEL: test_v32f16_ogt_q:
33 ; X86-NEXT: pushl %ebp
34 ; X86-NEXT: movl %esp, %ebp
35 ; X86-NEXT: andl $-64, %esp
36 ; X86-NEXT: subl $64, %esp
37 ; X86-NEXT: vcmpgt_oqph 8(%ebp), %zmm2, %k1
38 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
39 ; X86-NEXT: movl %ebp, %esp
43 ; X64-LABEL: test_v32f16_ogt_q:
45 ; X64-NEXT: vcmplt_oqph %zmm2, %zmm3, %k1
46 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
48 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
49 <32 x half> %f1, <32 x half> %f2, metadata !"ogt",
50 metadata !"fpexcept.strict") #0
51 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
55 define <32 x i16> @test_v32f16_oge_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
56 ; X86-LABEL: test_v32f16_oge_q:
58 ; X86-NEXT: pushl %ebp
59 ; X86-NEXT: movl %esp, %ebp
60 ; X86-NEXT: andl $-64, %esp
61 ; X86-NEXT: subl $64, %esp
62 ; X86-NEXT: vcmpge_oqph 8(%ebp), %zmm2, %k1
63 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
64 ; X86-NEXT: movl %ebp, %esp
68 ; X64-LABEL: test_v32f16_oge_q:
70 ; X64-NEXT: vcmple_oqph %zmm2, %zmm3, %k1
71 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
73 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
74 <32 x half> %f1, <32 x half> %f2, metadata !"oge",
75 metadata !"fpexcept.strict") #0
76 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
80 define <32 x i16> @test_v32f16_olt_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
81 ; X86-LABEL: test_v32f16_olt_q:
83 ; X86-NEXT: pushl %ebp
84 ; X86-NEXT: movl %esp, %ebp
85 ; X86-NEXT: andl $-64, %esp
86 ; X86-NEXT: subl $64, %esp
87 ; X86-NEXT: vcmplt_oqph 8(%ebp), %zmm2, %k1
88 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
89 ; X86-NEXT: movl %ebp, %esp
93 ; X64-LABEL: test_v32f16_olt_q:
95 ; X64-NEXT: vcmplt_oqph %zmm3, %zmm2, %k1
96 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
98 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
99 <32 x half> %f1, <32 x half> %f2, metadata !"olt",
100 metadata !"fpexcept.strict") #0
101 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
105 define <32 x i16> @test_v32f16_ole_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
106 ; X86-LABEL: test_v32f16_ole_q:
108 ; X86-NEXT: pushl %ebp
109 ; X86-NEXT: movl %esp, %ebp
110 ; X86-NEXT: andl $-64, %esp
111 ; X86-NEXT: subl $64, %esp
112 ; X86-NEXT: vcmple_oqph 8(%ebp), %zmm2, %k1
113 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
114 ; X86-NEXT: movl %ebp, %esp
115 ; X86-NEXT: popl %ebp
118 ; X64-LABEL: test_v32f16_ole_q:
120 ; X64-NEXT: vcmple_oqph %zmm3, %zmm2, %k1
121 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
123 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
124 <32 x half> %f1, <32 x half> %f2, metadata !"ole",
125 metadata !"fpexcept.strict") #0
126 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
130 define <32 x i16> @test_v32f16_one_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
131 ; X86-LABEL: test_v32f16_one_q:
133 ; X86-NEXT: pushl %ebp
134 ; X86-NEXT: movl %esp, %ebp
135 ; X86-NEXT: andl $-64, %esp
136 ; X86-NEXT: subl $64, %esp
137 ; X86-NEXT: vcmpneq_oqph 8(%ebp), %zmm2, %k1
138 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
139 ; X86-NEXT: movl %ebp, %esp
140 ; X86-NEXT: popl %ebp
143 ; X64-LABEL: test_v32f16_one_q:
145 ; X64-NEXT: vcmpneq_oqph %zmm3, %zmm2, %k1
146 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
148 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
149 <32 x half> %f1, <32 x half> %f2, metadata !"one",
150 metadata !"fpexcept.strict") #0
151 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
155 define <32 x i16> @test_v32f16_ord_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
156 ; X86-LABEL: test_v32f16_ord_q:
158 ; X86-NEXT: pushl %ebp
159 ; X86-NEXT: movl %esp, %ebp
160 ; X86-NEXT: andl $-64, %esp
161 ; X86-NEXT: subl $64, %esp
162 ; X86-NEXT: vcmpordph 8(%ebp), %zmm2, %k1
163 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
164 ; X86-NEXT: movl %ebp, %esp
165 ; X86-NEXT: popl %ebp
168 ; X64-LABEL: test_v32f16_ord_q:
170 ; X64-NEXT: vcmpordph %zmm3, %zmm2, %k1
171 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
173 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
174 <32 x half> %f1, <32 x half> %f2, metadata !"ord",
175 metadata !"fpexcept.strict") #0
176 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
180 define <32 x i16> @test_v32f16_ueq_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
181 ; X86-LABEL: test_v32f16_ueq_q:
183 ; X86-NEXT: pushl %ebp
184 ; X86-NEXT: movl %esp, %ebp
185 ; X86-NEXT: andl $-64, %esp
186 ; X86-NEXT: subl $64, %esp
187 ; X86-NEXT: vcmpeq_uqph 8(%ebp), %zmm2, %k1
188 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
189 ; X86-NEXT: movl %ebp, %esp
190 ; X86-NEXT: popl %ebp
193 ; X64-LABEL: test_v32f16_ueq_q:
195 ; X64-NEXT: vcmpeq_uqph %zmm3, %zmm2, %k1
196 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
198 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
199 <32 x half> %f1, <32 x half> %f2, metadata !"ueq",
200 metadata !"fpexcept.strict") #0
201 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
205 define <32 x i16> @test_v32f16_ugt_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
206 ; X86-LABEL: test_v32f16_ugt_q:
208 ; X86-NEXT: pushl %ebp
209 ; X86-NEXT: movl %esp, %ebp
210 ; X86-NEXT: andl $-64, %esp
211 ; X86-NEXT: subl $64, %esp
212 ; X86-NEXT: vcmpnle_uqph 8(%ebp), %zmm2, %k1
213 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
214 ; X86-NEXT: movl %ebp, %esp
215 ; X86-NEXT: popl %ebp
218 ; X64-LABEL: test_v32f16_ugt_q:
220 ; X64-NEXT: vcmpnle_uqph %zmm3, %zmm2, %k1
221 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
223 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
224 <32 x half> %f1, <32 x half> %f2, metadata !"ugt",
225 metadata !"fpexcept.strict") #0
226 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
230 define <32 x i16> @test_v32f16_uge_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
231 ; X86-LABEL: test_v32f16_uge_q:
233 ; X86-NEXT: pushl %ebp
234 ; X86-NEXT: movl %esp, %ebp
235 ; X86-NEXT: andl $-64, %esp
236 ; X86-NEXT: subl $64, %esp
237 ; X86-NEXT: vcmpnlt_uqph 8(%ebp), %zmm2, %k1
238 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
239 ; X86-NEXT: movl %ebp, %esp
240 ; X86-NEXT: popl %ebp
243 ; X64-LABEL: test_v32f16_uge_q:
245 ; X64-NEXT: vcmpnlt_uqph %zmm3, %zmm2, %k1
246 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
248 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
249 <32 x half> %f1, <32 x half> %f2, metadata !"uge",
250 metadata !"fpexcept.strict") #0
251 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
255 define <32 x i16> @test_v32f16_ult_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
256 ; X86-LABEL: test_v32f16_ult_q:
258 ; X86-NEXT: pushl %ebp
259 ; X86-NEXT: movl %esp, %ebp
260 ; X86-NEXT: andl $-64, %esp
261 ; X86-NEXT: subl $64, %esp
262 ; X86-NEXT: vcmpnge_uqph 8(%ebp), %zmm2, %k1
263 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
264 ; X86-NEXT: movl %ebp, %esp
265 ; X86-NEXT: popl %ebp
268 ; X64-LABEL: test_v32f16_ult_q:
270 ; X64-NEXT: vcmpnle_uqph %zmm2, %zmm3, %k1
271 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
273 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
274 <32 x half> %f1, <32 x half> %f2, metadata !"ult",
275 metadata !"fpexcept.strict") #0
276 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
280 define <32 x i16> @test_v32f16_ule_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
281 ; X86-LABEL: test_v32f16_ule_q:
283 ; X86-NEXT: pushl %ebp
284 ; X86-NEXT: movl %esp, %ebp
285 ; X86-NEXT: andl $-64, %esp
286 ; X86-NEXT: subl $64, %esp
287 ; X86-NEXT: vcmpngt_uqph 8(%ebp), %zmm2, %k1
288 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
289 ; X86-NEXT: movl %ebp, %esp
290 ; X86-NEXT: popl %ebp
293 ; X64-LABEL: test_v32f16_ule_q:
295 ; X64-NEXT: vcmpnlt_uqph %zmm2, %zmm3, %k1
296 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
298 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
299 <32 x half> %f1, <32 x half> %f2, metadata !"ule",
300 metadata !"fpexcept.strict") #0
301 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
305 define <32 x i16> @test_v32f16_une_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
306 ; X86-LABEL: test_v32f16_une_q:
308 ; X86-NEXT: pushl %ebp
309 ; X86-NEXT: movl %esp, %ebp
310 ; X86-NEXT: andl $-64, %esp
311 ; X86-NEXT: subl $64, %esp
312 ; X86-NEXT: vcmpneqph 8(%ebp), %zmm2, %k1
313 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
314 ; X86-NEXT: movl %ebp, %esp
315 ; X86-NEXT: popl %ebp
318 ; X64-LABEL: test_v32f16_une_q:
320 ; X64-NEXT: vcmpneqph %zmm3, %zmm2, %k1
321 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
323 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
324 <32 x half> %f1, <32 x half> %f2, metadata !"une",
325 metadata !"fpexcept.strict") #0
326 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
330 define <32 x i16> @test_v32f16_uno_q(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
331 ; X86-LABEL: test_v32f16_uno_q:
333 ; X86-NEXT: pushl %ebp
334 ; X86-NEXT: movl %esp, %ebp
335 ; X86-NEXT: andl $-64, %esp
336 ; X86-NEXT: subl $64, %esp
337 ; X86-NEXT: vcmpunordph 8(%ebp), %zmm2, %k1
338 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
339 ; X86-NEXT: movl %ebp, %esp
340 ; X86-NEXT: popl %ebp
343 ; X64-LABEL: test_v32f16_uno_q:
345 ; X64-NEXT: vcmpunordph %zmm3, %zmm2, %k1
346 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
348 %cond = call <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(
349 <32 x half> %f1, <32 x half> %f2, metadata !"uno",
350 metadata !"fpexcept.strict") #0
351 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
355 define <32 x i16> @test_v32f16_oeq_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
356 ; X86-LABEL: test_v32f16_oeq_s:
358 ; X86-NEXT: pushl %ebp
359 ; X86-NEXT: movl %esp, %ebp
360 ; X86-NEXT: andl $-64, %esp
361 ; X86-NEXT: subl $64, %esp
362 ; X86-NEXT: vcmpeq_osph 8(%ebp), %zmm2, %k1
363 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
364 ; X86-NEXT: movl %ebp, %esp
365 ; X86-NEXT: popl %ebp
368 ; X64-LABEL: test_v32f16_oeq_s:
370 ; X64-NEXT: vcmpeq_osph %zmm3, %zmm2, %k1
371 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
373 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
374 <32 x half> %f1, <32 x half> %f2, metadata !"oeq",
375 metadata !"fpexcept.strict") #0
376 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
380 define <32 x i16> @test_v32f16_ogt_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
381 ; X86-LABEL: test_v32f16_ogt_s:
383 ; X86-NEXT: pushl %ebp
384 ; X86-NEXT: movl %esp, %ebp
385 ; X86-NEXT: andl $-64, %esp
386 ; X86-NEXT: subl $64, %esp
387 ; X86-NEXT: vcmpgtph 8(%ebp), %zmm2, %k1
388 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
389 ; X86-NEXT: movl %ebp, %esp
390 ; X86-NEXT: popl %ebp
393 ; X64-LABEL: test_v32f16_ogt_s:
395 ; X64-NEXT: vcmpltph %zmm2, %zmm3, %k1
396 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
398 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
399 <32 x half> %f1, <32 x half> %f2, metadata !"ogt",
400 metadata !"fpexcept.strict") #0
401 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
405 define <32 x i16> @test_v32f16_oge_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
406 ; X86-LABEL: test_v32f16_oge_s:
408 ; X86-NEXT: pushl %ebp
409 ; X86-NEXT: movl %esp, %ebp
410 ; X86-NEXT: andl $-64, %esp
411 ; X86-NEXT: subl $64, %esp
412 ; X86-NEXT: vcmpgeph 8(%ebp), %zmm2, %k1
413 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
414 ; X86-NEXT: movl %ebp, %esp
415 ; X86-NEXT: popl %ebp
418 ; X64-LABEL: test_v32f16_oge_s:
420 ; X64-NEXT: vcmpleph %zmm2, %zmm3, %k1
421 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
423 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
424 <32 x half> %f1, <32 x half> %f2, metadata !"oge",
425 metadata !"fpexcept.strict") #0
426 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
430 define <32 x i16> @test_v32f16_olt_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
431 ; X86-LABEL: test_v32f16_olt_s:
433 ; X86-NEXT: pushl %ebp
434 ; X86-NEXT: movl %esp, %ebp
435 ; X86-NEXT: andl $-64, %esp
436 ; X86-NEXT: subl $64, %esp
437 ; X86-NEXT: vcmpltph 8(%ebp), %zmm2, %k1
438 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
439 ; X86-NEXT: movl %ebp, %esp
440 ; X86-NEXT: popl %ebp
443 ; X64-LABEL: test_v32f16_olt_s:
445 ; X64-NEXT: vcmpltph %zmm3, %zmm2, %k1
446 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
448 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
449 <32 x half> %f1, <32 x half> %f2, metadata !"olt",
450 metadata !"fpexcept.strict") #0
451 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
455 define <32 x i16> @test_v32f16_ole_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
456 ; X86-LABEL: test_v32f16_ole_s:
458 ; X86-NEXT: pushl %ebp
459 ; X86-NEXT: movl %esp, %ebp
460 ; X86-NEXT: andl $-64, %esp
461 ; X86-NEXT: subl $64, %esp
462 ; X86-NEXT: vcmpleph 8(%ebp), %zmm2, %k1
463 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
464 ; X86-NEXT: movl %ebp, %esp
465 ; X86-NEXT: popl %ebp
468 ; X64-LABEL: test_v32f16_ole_s:
470 ; X64-NEXT: vcmpleph %zmm3, %zmm2, %k1
471 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
473 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
474 <32 x half> %f1, <32 x half> %f2, metadata !"ole",
475 metadata !"fpexcept.strict") #0
476 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
480 define <32 x i16> @test_v32f16_one_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
481 ; X86-LABEL: test_v32f16_one_s:
483 ; X86-NEXT: pushl %ebp
484 ; X86-NEXT: movl %esp, %ebp
485 ; X86-NEXT: andl $-64, %esp
486 ; X86-NEXT: subl $64, %esp
487 ; X86-NEXT: vcmpneq_osph 8(%ebp), %zmm2, %k1
488 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
489 ; X86-NEXT: movl %ebp, %esp
490 ; X86-NEXT: popl %ebp
493 ; X64-LABEL: test_v32f16_one_s:
495 ; X64-NEXT: vcmpneq_osph %zmm3, %zmm2, %k1
496 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
498 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
499 <32 x half> %f1, <32 x half> %f2, metadata !"one",
500 metadata !"fpexcept.strict") #0
501 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
505 define <32 x i16> @test_v32f16_ord_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
506 ; X86-LABEL: test_v32f16_ord_s:
508 ; X86-NEXT: pushl %ebp
509 ; X86-NEXT: movl %esp, %ebp
510 ; X86-NEXT: andl $-64, %esp
511 ; X86-NEXT: subl $64, %esp
512 ; X86-NEXT: vcmpord_sph 8(%ebp), %zmm2, %k1
513 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
514 ; X86-NEXT: movl %ebp, %esp
515 ; X86-NEXT: popl %ebp
518 ; X64-LABEL: test_v32f16_ord_s:
520 ; X64-NEXT: vcmpord_sph %zmm3, %zmm2, %k1
521 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
523 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
524 <32 x half> %f1, <32 x half> %f2, metadata !"ord",
525 metadata !"fpexcept.strict") #0
526 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
530 define <32 x i16> @test_v32f16_ueq_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
531 ; X86-LABEL: test_v32f16_ueq_s:
533 ; X86-NEXT: pushl %ebp
534 ; X86-NEXT: movl %esp, %ebp
535 ; X86-NEXT: andl $-64, %esp
536 ; X86-NEXT: subl $64, %esp
537 ; X86-NEXT: vcmpeq_usph 8(%ebp), %zmm2, %k1
538 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
539 ; X86-NEXT: movl %ebp, %esp
540 ; X86-NEXT: popl %ebp
543 ; X64-LABEL: test_v32f16_ueq_s:
545 ; X64-NEXT: vcmpeq_usph %zmm3, %zmm2, %k1
546 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
548 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
549 <32 x half> %f1, <32 x half> %f2, metadata !"ueq",
550 metadata !"fpexcept.strict") #0
551 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
555 define <32 x i16> @test_v32f16_ugt_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
556 ; X86-LABEL: test_v32f16_ugt_s:
558 ; X86-NEXT: pushl %ebp
559 ; X86-NEXT: movl %esp, %ebp
560 ; X86-NEXT: andl $-64, %esp
561 ; X86-NEXT: subl $64, %esp
562 ; X86-NEXT: vcmpnleph 8(%ebp), %zmm2, %k1
563 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
564 ; X86-NEXT: movl %ebp, %esp
565 ; X86-NEXT: popl %ebp
568 ; X64-LABEL: test_v32f16_ugt_s:
570 ; X64-NEXT: vcmpnleph %zmm3, %zmm2, %k1
571 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
573 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
574 <32 x half> %f1, <32 x half> %f2, metadata !"ugt",
575 metadata !"fpexcept.strict") #0
576 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
580 define <32 x i16> @test_v32f16_uge_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
581 ; X86-LABEL: test_v32f16_uge_s:
583 ; X86-NEXT: pushl %ebp
584 ; X86-NEXT: movl %esp, %ebp
585 ; X86-NEXT: andl $-64, %esp
586 ; X86-NEXT: subl $64, %esp
587 ; X86-NEXT: vcmpnltph 8(%ebp), %zmm2, %k1
588 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
589 ; X86-NEXT: movl %ebp, %esp
590 ; X86-NEXT: popl %ebp
593 ; X64-LABEL: test_v32f16_uge_s:
595 ; X64-NEXT: vcmpnltph %zmm3, %zmm2, %k1
596 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
598 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
599 <32 x half> %f1, <32 x half> %f2, metadata !"uge",
600 metadata !"fpexcept.strict") #0
601 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
605 define <32 x i16> @test_v32f16_ult_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
606 ; X86-LABEL: test_v32f16_ult_s:
608 ; X86-NEXT: pushl %ebp
609 ; X86-NEXT: movl %esp, %ebp
610 ; X86-NEXT: andl $-64, %esp
611 ; X86-NEXT: subl $64, %esp
612 ; X86-NEXT: vcmpngeph 8(%ebp), %zmm2, %k1
613 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
614 ; X86-NEXT: movl %ebp, %esp
615 ; X86-NEXT: popl %ebp
618 ; X64-LABEL: test_v32f16_ult_s:
620 ; X64-NEXT: vcmpnleph %zmm2, %zmm3, %k1
621 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
623 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
624 <32 x half> %f1, <32 x half> %f2, metadata !"ult",
625 metadata !"fpexcept.strict") #0
626 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
630 define <32 x i16> @test_v32f16_ule_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
631 ; X86-LABEL: test_v32f16_ule_s:
633 ; X86-NEXT: pushl %ebp
634 ; X86-NEXT: movl %esp, %ebp
635 ; X86-NEXT: andl $-64, %esp
636 ; X86-NEXT: subl $64, %esp
637 ; X86-NEXT: vcmpngtph 8(%ebp), %zmm2, %k1
638 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
639 ; X86-NEXT: movl %ebp, %esp
640 ; X86-NEXT: popl %ebp
643 ; X64-LABEL: test_v32f16_ule_s:
645 ; X64-NEXT: vcmpnltph %zmm2, %zmm3, %k1
646 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
648 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
649 <32 x half> %f1, <32 x half> %f2, metadata !"ule",
650 metadata !"fpexcept.strict") #0
651 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
655 define <32 x i16> @test_v32f16_une_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
656 ; X86-LABEL: test_v32f16_une_s:
658 ; X86-NEXT: pushl %ebp
659 ; X86-NEXT: movl %esp, %ebp
660 ; X86-NEXT: andl $-64, %esp
661 ; X86-NEXT: subl $64, %esp
662 ; X86-NEXT: vcmpneq_usph 8(%ebp), %zmm2, %k1
663 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
664 ; X86-NEXT: movl %ebp, %esp
665 ; X86-NEXT: popl %ebp
668 ; X64-LABEL: test_v32f16_une_s:
670 ; X64-NEXT: vcmpneq_usph %zmm3, %zmm2, %k1
671 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
673 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
674 <32 x half> %f1, <32 x half> %f2, metadata !"une",
675 metadata !"fpexcept.strict") #0
676 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
680 define <32 x i16> @test_v32f16_uno_s(<32 x i16> %a, <32 x i16> %b, <32 x half> %f1, <32 x half> %f2) #0 {
681 ; X86-LABEL: test_v32f16_uno_s:
683 ; X86-NEXT: pushl %ebp
684 ; X86-NEXT: movl %esp, %ebp
685 ; X86-NEXT: andl $-64, %esp
686 ; X86-NEXT: subl $64, %esp
687 ; X86-NEXT: vcmpunord_sph 8(%ebp), %zmm2, %k1
688 ; X86-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
689 ; X86-NEXT: movl %ebp, %esp
690 ; X86-NEXT: popl %ebp
693 ; X64-LABEL: test_v32f16_uno_s:
695 ; X64-NEXT: vcmpunord_sph %zmm3, %zmm2, %k1
696 ; X64-NEXT: vpblendmw %zmm0, %zmm1, %zmm0 {%k1}
698 %cond = call <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(
699 <32 x half> %f1, <32 x half> %f2, metadata !"uno",
700 metadata !"fpexcept.strict") #0
701 %res = select <32 x i1> %cond, <32 x i16> %a, <32 x i16> %b
705 attributes #0 = { strictfp nounwind }
707 declare <32 x i1> @llvm.experimental.constrained.fcmp.v32f16(<32 x half>, <32 x half>, metadata, metadata)
708 declare <32 x i1> @llvm.experimental.constrained.fcmps.v32f16(<32 x half>, <32 x half>, metadata, metadata)