1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512fp16 -mattr=+avx512vl -O3 | FileCheck %s --check-prefixes=AVX512-32
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512fp16 -mattr=+avx512vl -O3 | FileCheck %s --check-prefixes=AVX512-64
5 define <16 x i16> @test_v16f16_oeq_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
6 ; AVX512-32-LABEL: test_v16f16_oeq_q:
8 ; AVX512-32-NEXT: pushl %ebp
9 ; AVX512-32-NEXT: movl %esp, %ebp
10 ; AVX512-32-NEXT: andl $-32, %esp
11 ; AVX512-32-NEXT: subl $32, %esp
12 ; AVX512-32-NEXT: vcmpeqph 8(%ebp), %ymm2, %k1
13 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
14 ; AVX512-32-NEXT: movl %ebp, %esp
15 ; AVX512-32-NEXT: popl %ebp
16 ; AVX512-32-NEXT: retl
18 ; AVX512-64-LABEL: test_v16f16_oeq_q:
20 ; AVX512-64-NEXT: vcmpeqph %ymm3, %ymm2, %k1
21 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
22 ; AVX512-64-NEXT: retq
23 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
24 <16 x half> %f1, <16 x half> %f2, metadata !"oeq",
25 metadata !"fpexcept.strict") #0
26 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
30 define <16 x i16> @test_v16f16_ogt_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
31 ; AVX512-32-LABEL: test_v16f16_ogt_q:
33 ; AVX512-32-NEXT: pushl %ebp
34 ; AVX512-32-NEXT: movl %esp, %ebp
35 ; AVX512-32-NEXT: andl $-32, %esp
36 ; AVX512-32-NEXT: subl $32, %esp
37 ; AVX512-32-NEXT: vcmpgt_oqph 8(%ebp), %ymm2, %k1
38 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
39 ; AVX512-32-NEXT: movl %ebp, %esp
40 ; AVX512-32-NEXT: popl %ebp
41 ; AVX512-32-NEXT: retl
43 ; AVX512-64-LABEL: test_v16f16_ogt_q:
45 ; AVX512-64-NEXT: vcmplt_oqph %ymm2, %ymm3, %k1
46 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
47 ; AVX512-64-NEXT: retq
48 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
49 <16 x half> %f1, <16 x half> %f2, metadata !"ogt",
50 metadata !"fpexcept.strict") #0
51 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
55 define <16 x i16> @test_v16f16_oge_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
56 ; AVX512-32-LABEL: test_v16f16_oge_q:
58 ; AVX512-32-NEXT: pushl %ebp
59 ; AVX512-32-NEXT: movl %esp, %ebp
60 ; AVX512-32-NEXT: andl $-32, %esp
61 ; AVX512-32-NEXT: subl $32, %esp
62 ; AVX512-32-NEXT: vcmpge_oqph 8(%ebp), %ymm2, %k1
63 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
64 ; AVX512-32-NEXT: movl %ebp, %esp
65 ; AVX512-32-NEXT: popl %ebp
66 ; AVX512-32-NEXT: retl
68 ; AVX512-64-LABEL: test_v16f16_oge_q:
70 ; AVX512-64-NEXT: vcmple_oqph %ymm2, %ymm3, %k1
71 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
72 ; AVX512-64-NEXT: retq
73 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
74 <16 x half> %f1, <16 x half> %f2, metadata !"oge",
75 metadata !"fpexcept.strict") #0
76 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
80 define <16 x i16> @test_v16f16_olt_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
81 ; AVX512-32-LABEL: test_v16f16_olt_q:
83 ; AVX512-32-NEXT: pushl %ebp
84 ; AVX512-32-NEXT: movl %esp, %ebp
85 ; AVX512-32-NEXT: andl $-32, %esp
86 ; AVX512-32-NEXT: subl $32, %esp
87 ; AVX512-32-NEXT: vcmplt_oqph 8(%ebp), %ymm2, %k1
88 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
89 ; AVX512-32-NEXT: movl %ebp, %esp
90 ; AVX512-32-NEXT: popl %ebp
91 ; AVX512-32-NEXT: retl
93 ; AVX512-64-LABEL: test_v16f16_olt_q:
95 ; AVX512-64-NEXT: vcmplt_oqph %ymm3, %ymm2, %k1
96 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
97 ; AVX512-64-NEXT: retq
98 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
99 <16 x half> %f1, <16 x half> %f2, metadata !"olt",
100 metadata !"fpexcept.strict") #0
101 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
105 define <16 x i16> @test_v16f16_ole_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
106 ; AVX512-32-LABEL: test_v16f16_ole_q:
107 ; AVX512-32: # %bb.0:
108 ; AVX512-32-NEXT: pushl %ebp
109 ; AVX512-32-NEXT: movl %esp, %ebp
110 ; AVX512-32-NEXT: andl $-32, %esp
111 ; AVX512-32-NEXT: subl $32, %esp
112 ; AVX512-32-NEXT: vcmple_oqph 8(%ebp), %ymm2, %k1
113 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
114 ; AVX512-32-NEXT: movl %ebp, %esp
115 ; AVX512-32-NEXT: popl %ebp
116 ; AVX512-32-NEXT: retl
118 ; AVX512-64-LABEL: test_v16f16_ole_q:
119 ; AVX512-64: # %bb.0:
120 ; AVX512-64-NEXT: vcmple_oqph %ymm3, %ymm2, %k1
121 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
122 ; AVX512-64-NEXT: retq
123 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
124 <16 x half> %f1, <16 x half> %f2, metadata !"ole",
125 metadata !"fpexcept.strict") #0
126 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
130 define <16 x i16> @test_v16f16_one_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
131 ; AVX512-32-LABEL: test_v16f16_one_q:
132 ; AVX512-32: # %bb.0:
133 ; AVX512-32-NEXT: pushl %ebp
134 ; AVX512-32-NEXT: movl %esp, %ebp
135 ; AVX512-32-NEXT: andl $-32, %esp
136 ; AVX512-32-NEXT: subl $32, %esp
137 ; AVX512-32-NEXT: vcmpneq_oqph 8(%ebp), %ymm2, %k1
138 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
139 ; AVX512-32-NEXT: movl %ebp, %esp
140 ; AVX512-32-NEXT: popl %ebp
141 ; AVX512-32-NEXT: retl
143 ; AVX512-64-LABEL: test_v16f16_one_q:
144 ; AVX512-64: # %bb.0:
145 ; AVX512-64-NEXT: vcmpneq_oqph %ymm3, %ymm2, %k1
146 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
147 ; AVX512-64-NEXT: retq
148 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
149 <16 x half> %f1, <16 x half> %f2, metadata !"one",
150 metadata !"fpexcept.strict") #0
151 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
155 define <16 x i16> @test_v16f16_ord_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
156 ; AVX512-32-LABEL: test_v16f16_ord_q:
157 ; AVX512-32: # %bb.0:
158 ; AVX512-32-NEXT: pushl %ebp
159 ; AVX512-32-NEXT: movl %esp, %ebp
160 ; AVX512-32-NEXT: andl $-32, %esp
161 ; AVX512-32-NEXT: subl $32, %esp
162 ; AVX512-32-NEXT: vcmpordph 8(%ebp), %ymm2, %k1
163 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
164 ; AVX512-32-NEXT: movl %ebp, %esp
165 ; AVX512-32-NEXT: popl %ebp
166 ; AVX512-32-NEXT: retl
168 ; AVX512-64-LABEL: test_v16f16_ord_q:
169 ; AVX512-64: # %bb.0:
170 ; AVX512-64-NEXT: vcmpordph %ymm3, %ymm2, %k1
171 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
172 ; AVX512-64-NEXT: retq
173 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
174 <16 x half> %f1, <16 x half> %f2, metadata !"ord",
175 metadata !"fpexcept.strict") #0
176 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
180 define <16 x i16> @test_v16f16_ueq_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
181 ; AVX512-32-LABEL: test_v16f16_ueq_q:
182 ; AVX512-32: # %bb.0:
183 ; AVX512-32-NEXT: pushl %ebp
184 ; AVX512-32-NEXT: movl %esp, %ebp
185 ; AVX512-32-NEXT: andl $-32, %esp
186 ; AVX512-32-NEXT: subl $32, %esp
187 ; AVX512-32-NEXT: vcmpeq_uqph 8(%ebp), %ymm2, %k1
188 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
189 ; AVX512-32-NEXT: movl %ebp, %esp
190 ; AVX512-32-NEXT: popl %ebp
191 ; AVX512-32-NEXT: retl
193 ; AVX512-64-LABEL: test_v16f16_ueq_q:
194 ; AVX512-64: # %bb.0:
195 ; AVX512-64-NEXT: vcmpeq_uqph %ymm3, %ymm2, %k1
196 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
197 ; AVX512-64-NEXT: retq
198 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
199 <16 x half> %f1, <16 x half> %f2, metadata !"ueq",
200 metadata !"fpexcept.strict") #0
201 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
205 define <16 x i16> @test_v16f16_ugt_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
206 ; AVX512-32-LABEL: test_v16f16_ugt_q:
207 ; AVX512-32: # %bb.0:
208 ; AVX512-32-NEXT: pushl %ebp
209 ; AVX512-32-NEXT: movl %esp, %ebp
210 ; AVX512-32-NEXT: andl $-32, %esp
211 ; AVX512-32-NEXT: subl $32, %esp
212 ; AVX512-32-NEXT: vcmpnle_uqph 8(%ebp), %ymm2, %k1
213 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
214 ; AVX512-32-NEXT: movl %ebp, %esp
215 ; AVX512-32-NEXT: popl %ebp
216 ; AVX512-32-NEXT: retl
218 ; AVX512-64-LABEL: test_v16f16_ugt_q:
219 ; AVX512-64: # %bb.0:
220 ; AVX512-64-NEXT: vcmpnle_uqph %ymm3, %ymm2, %k1
221 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
222 ; AVX512-64-NEXT: retq
223 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
224 <16 x half> %f1, <16 x half> %f2, metadata !"ugt",
225 metadata !"fpexcept.strict") #0
226 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
230 define <16 x i16> @test_v16f16_uge_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
231 ; AVX512-32-LABEL: test_v16f16_uge_q:
232 ; AVX512-32: # %bb.0:
233 ; AVX512-32-NEXT: pushl %ebp
234 ; AVX512-32-NEXT: movl %esp, %ebp
235 ; AVX512-32-NEXT: andl $-32, %esp
236 ; AVX512-32-NEXT: subl $32, %esp
237 ; AVX512-32-NEXT: vcmpnlt_uqph 8(%ebp), %ymm2, %k1
238 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
239 ; AVX512-32-NEXT: movl %ebp, %esp
240 ; AVX512-32-NEXT: popl %ebp
241 ; AVX512-32-NEXT: retl
243 ; AVX512-64-LABEL: test_v16f16_uge_q:
244 ; AVX512-64: # %bb.0:
245 ; AVX512-64-NEXT: vcmpnlt_uqph %ymm3, %ymm2, %k1
246 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
247 ; AVX512-64-NEXT: retq
248 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
249 <16 x half> %f1, <16 x half> %f2, metadata !"uge",
250 metadata !"fpexcept.strict") #0
251 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
255 define <16 x i16> @test_v16f16_ult_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
256 ; AVX512-32-LABEL: test_v16f16_ult_q:
257 ; AVX512-32: # %bb.0:
258 ; AVX512-32-NEXT: pushl %ebp
259 ; AVX512-32-NEXT: movl %esp, %ebp
260 ; AVX512-32-NEXT: andl $-32, %esp
261 ; AVX512-32-NEXT: subl $32, %esp
262 ; AVX512-32-NEXT: vcmpnge_uqph 8(%ebp), %ymm2, %k1
263 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
264 ; AVX512-32-NEXT: movl %ebp, %esp
265 ; AVX512-32-NEXT: popl %ebp
266 ; AVX512-32-NEXT: retl
268 ; AVX512-64-LABEL: test_v16f16_ult_q:
269 ; AVX512-64: # %bb.0:
270 ; AVX512-64-NEXT: vcmpnle_uqph %ymm2, %ymm3, %k1
271 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
272 ; AVX512-64-NEXT: retq
273 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
274 <16 x half> %f1, <16 x half> %f2, metadata !"ult",
275 metadata !"fpexcept.strict") #0
276 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
280 define <16 x i16> @test_v16f16_ule_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
281 ; AVX512-32-LABEL: test_v16f16_ule_q:
282 ; AVX512-32: # %bb.0:
283 ; AVX512-32-NEXT: pushl %ebp
284 ; AVX512-32-NEXT: movl %esp, %ebp
285 ; AVX512-32-NEXT: andl $-32, %esp
286 ; AVX512-32-NEXT: subl $32, %esp
287 ; AVX512-32-NEXT: vcmpngt_uqph 8(%ebp), %ymm2, %k1
288 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
289 ; AVX512-32-NEXT: movl %ebp, %esp
290 ; AVX512-32-NEXT: popl %ebp
291 ; AVX512-32-NEXT: retl
293 ; AVX512-64-LABEL: test_v16f16_ule_q:
294 ; AVX512-64: # %bb.0:
295 ; AVX512-64-NEXT: vcmpnlt_uqph %ymm2, %ymm3, %k1
296 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
297 ; AVX512-64-NEXT: retq
298 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
299 <16 x half> %f1, <16 x half> %f2, metadata !"ule",
300 metadata !"fpexcept.strict") #0
301 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
305 define <16 x i16> @test_v16f16_une_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
306 ; AVX512-32-LABEL: test_v16f16_une_q:
307 ; AVX512-32: # %bb.0:
308 ; AVX512-32-NEXT: pushl %ebp
309 ; AVX512-32-NEXT: movl %esp, %ebp
310 ; AVX512-32-NEXT: andl $-32, %esp
311 ; AVX512-32-NEXT: subl $32, %esp
312 ; AVX512-32-NEXT: vcmpneqph 8(%ebp), %ymm2, %k1
313 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
314 ; AVX512-32-NEXT: movl %ebp, %esp
315 ; AVX512-32-NEXT: popl %ebp
316 ; AVX512-32-NEXT: retl
318 ; AVX512-64-LABEL: test_v16f16_une_q:
319 ; AVX512-64: # %bb.0:
320 ; AVX512-64-NEXT: vcmpneqph %ymm3, %ymm2, %k1
321 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
322 ; AVX512-64-NEXT: retq
323 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
324 <16 x half> %f1, <16 x half> %f2, metadata !"une",
325 metadata !"fpexcept.strict") #0
326 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
330 define <16 x i16> @test_v16f16_uno_q(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
331 ; AVX512-32-LABEL: test_v16f16_uno_q:
332 ; AVX512-32: # %bb.0:
333 ; AVX512-32-NEXT: pushl %ebp
334 ; AVX512-32-NEXT: movl %esp, %ebp
335 ; AVX512-32-NEXT: andl $-32, %esp
336 ; AVX512-32-NEXT: subl $32, %esp
337 ; AVX512-32-NEXT: vcmpunordph 8(%ebp), %ymm2, %k1
338 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
339 ; AVX512-32-NEXT: movl %ebp, %esp
340 ; AVX512-32-NEXT: popl %ebp
341 ; AVX512-32-NEXT: retl
343 ; AVX512-64-LABEL: test_v16f16_uno_q:
344 ; AVX512-64: # %bb.0:
345 ; AVX512-64-NEXT: vcmpunordph %ymm3, %ymm2, %k1
346 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
347 ; AVX512-64-NEXT: retq
348 %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(
349 <16 x half> %f1, <16 x half> %f2, metadata !"uno",
350 metadata !"fpexcept.strict") #0
351 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
355 define <16 x i16> @test_v16f16_oeq_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
356 ; AVX512-32-LABEL: test_v16f16_oeq_s:
357 ; AVX512-32: # %bb.0:
358 ; AVX512-32-NEXT: pushl %ebp
359 ; AVX512-32-NEXT: movl %esp, %ebp
360 ; AVX512-32-NEXT: andl $-32, %esp
361 ; AVX512-32-NEXT: subl $32, %esp
362 ; AVX512-32-NEXT: vcmpeq_osph 8(%ebp), %ymm2, %k1
363 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
364 ; AVX512-32-NEXT: movl %ebp, %esp
365 ; AVX512-32-NEXT: popl %ebp
366 ; AVX512-32-NEXT: retl
368 ; AVX512-64-LABEL: test_v16f16_oeq_s:
369 ; AVX512-64: # %bb.0:
370 ; AVX512-64-NEXT: vcmpeq_osph %ymm3, %ymm2, %k1
371 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
372 ; AVX512-64-NEXT: retq
373 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
374 <16 x half> %f1, <16 x half> %f2, metadata !"oeq",
375 metadata !"fpexcept.strict") #0
376 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
380 define <16 x i16> @test_v16f16_ogt_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
381 ; AVX512-32-LABEL: test_v16f16_ogt_s:
382 ; AVX512-32: # %bb.0:
383 ; AVX512-32-NEXT: pushl %ebp
384 ; AVX512-32-NEXT: movl %esp, %ebp
385 ; AVX512-32-NEXT: andl $-32, %esp
386 ; AVX512-32-NEXT: subl $32, %esp
387 ; AVX512-32-NEXT: vcmpgtph 8(%ebp), %ymm2, %k1
388 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
389 ; AVX512-32-NEXT: movl %ebp, %esp
390 ; AVX512-32-NEXT: popl %ebp
391 ; AVX512-32-NEXT: retl
393 ; AVX512-64-LABEL: test_v16f16_ogt_s:
394 ; AVX512-64: # %bb.0:
395 ; AVX512-64-NEXT: vcmpltph %ymm2, %ymm3, %k1
396 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
397 ; AVX512-64-NEXT: retq
398 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
399 <16 x half> %f1, <16 x half> %f2, metadata !"ogt",
400 metadata !"fpexcept.strict") #0
401 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
405 define <16 x i16> @test_v16f16_oge_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
406 ; AVX512-32-LABEL: test_v16f16_oge_s:
407 ; AVX512-32: # %bb.0:
408 ; AVX512-32-NEXT: pushl %ebp
409 ; AVX512-32-NEXT: movl %esp, %ebp
410 ; AVX512-32-NEXT: andl $-32, %esp
411 ; AVX512-32-NEXT: subl $32, %esp
412 ; AVX512-32-NEXT: vcmpgeph 8(%ebp), %ymm2, %k1
413 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
414 ; AVX512-32-NEXT: movl %ebp, %esp
415 ; AVX512-32-NEXT: popl %ebp
416 ; AVX512-32-NEXT: retl
418 ; AVX512-64-LABEL: test_v16f16_oge_s:
419 ; AVX512-64: # %bb.0:
420 ; AVX512-64-NEXT: vcmpleph %ymm2, %ymm3, %k1
421 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
422 ; AVX512-64-NEXT: retq
423 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
424 <16 x half> %f1, <16 x half> %f2, metadata !"oge",
425 metadata !"fpexcept.strict") #0
426 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
430 define <16 x i16> @test_v16f16_olt_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
431 ; AVX512-32-LABEL: test_v16f16_olt_s:
432 ; AVX512-32: # %bb.0:
433 ; AVX512-32-NEXT: pushl %ebp
434 ; AVX512-32-NEXT: movl %esp, %ebp
435 ; AVX512-32-NEXT: andl $-32, %esp
436 ; AVX512-32-NEXT: subl $32, %esp
437 ; AVX512-32-NEXT: vcmpltph 8(%ebp), %ymm2, %k1
438 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
439 ; AVX512-32-NEXT: movl %ebp, %esp
440 ; AVX512-32-NEXT: popl %ebp
441 ; AVX512-32-NEXT: retl
443 ; AVX512-64-LABEL: test_v16f16_olt_s:
444 ; AVX512-64: # %bb.0:
445 ; AVX512-64-NEXT: vcmpltph %ymm3, %ymm2, %k1
446 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
447 ; AVX512-64-NEXT: retq
448 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
449 <16 x half> %f1, <16 x half> %f2, metadata !"olt",
450 metadata !"fpexcept.strict") #0
451 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
455 define <16 x i16> @test_v16f16_ole_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
456 ; AVX512-32-LABEL: test_v16f16_ole_s:
457 ; AVX512-32: # %bb.0:
458 ; AVX512-32-NEXT: pushl %ebp
459 ; AVX512-32-NEXT: movl %esp, %ebp
460 ; AVX512-32-NEXT: andl $-32, %esp
461 ; AVX512-32-NEXT: subl $32, %esp
462 ; AVX512-32-NEXT: vcmpleph 8(%ebp), %ymm2, %k1
463 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
464 ; AVX512-32-NEXT: movl %ebp, %esp
465 ; AVX512-32-NEXT: popl %ebp
466 ; AVX512-32-NEXT: retl
468 ; AVX512-64-LABEL: test_v16f16_ole_s:
469 ; AVX512-64: # %bb.0:
470 ; AVX512-64-NEXT: vcmpleph %ymm3, %ymm2, %k1
471 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
472 ; AVX512-64-NEXT: retq
473 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
474 <16 x half> %f1, <16 x half> %f2, metadata !"ole",
475 metadata !"fpexcept.strict") #0
476 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
480 define <16 x i16> @test_v16f16_one_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
481 ; AVX512-32-LABEL: test_v16f16_one_s:
482 ; AVX512-32: # %bb.0:
483 ; AVX512-32-NEXT: pushl %ebp
484 ; AVX512-32-NEXT: movl %esp, %ebp
485 ; AVX512-32-NEXT: andl $-32, %esp
486 ; AVX512-32-NEXT: subl $32, %esp
487 ; AVX512-32-NEXT: vcmpneq_osph 8(%ebp), %ymm2, %k1
488 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
489 ; AVX512-32-NEXT: movl %ebp, %esp
490 ; AVX512-32-NEXT: popl %ebp
491 ; AVX512-32-NEXT: retl
493 ; AVX512-64-LABEL: test_v16f16_one_s:
494 ; AVX512-64: # %bb.0:
495 ; AVX512-64-NEXT: vcmpneq_osph %ymm3, %ymm2, %k1
496 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
497 ; AVX512-64-NEXT: retq
498 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
499 <16 x half> %f1, <16 x half> %f2, metadata !"one",
500 metadata !"fpexcept.strict") #0
501 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
505 define <16 x i16> @test_v16f16_ord_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
506 ; AVX512-32-LABEL: test_v16f16_ord_s:
507 ; AVX512-32: # %bb.0:
508 ; AVX512-32-NEXT: pushl %ebp
509 ; AVX512-32-NEXT: movl %esp, %ebp
510 ; AVX512-32-NEXT: andl $-32, %esp
511 ; AVX512-32-NEXT: subl $32, %esp
512 ; AVX512-32-NEXT: vcmpord_sph 8(%ebp), %ymm2, %k1
513 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
514 ; AVX512-32-NEXT: movl %ebp, %esp
515 ; AVX512-32-NEXT: popl %ebp
516 ; AVX512-32-NEXT: retl
518 ; AVX512-64-LABEL: test_v16f16_ord_s:
519 ; AVX512-64: # %bb.0:
520 ; AVX512-64-NEXT: vcmpord_sph %ymm3, %ymm2, %k1
521 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
522 ; AVX512-64-NEXT: retq
523 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
524 <16 x half> %f1, <16 x half> %f2, metadata !"ord",
525 metadata !"fpexcept.strict") #0
526 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
530 define <16 x i16> @test_v16f16_ueq_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
531 ; AVX512-32-LABEL: test_v16f16_ueq_s:
532 ; AVX512-32: # %bb.0:
533 ; AVX512-32-NEXT: pushl %ebp
534 ; AVX512-32-NEXT: movl %esp, %ebp
535 ; AVX512-32-NEXT: andl $-32, %esp
536 ; AVX512-32-NEXT: subl $32, %esp
537 ; AVX512-32-NEXT: vcmpeq_usph 8(%ebp), %ymm2, %k1
538 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
539 ; AVX512-32-NEXT: movl %ebp, %esp
540 ; AVX512-32-NEXT: popl %ebp
541 ; AVX512-32-NEXT: retl
543 ; AVX512-64-LABEL: test_v16f16_ueq_s:
544 ; AVX512-64: # %bb.0:
545 ; AVX512-64-NEXT: vcmpeq_usph %ymm3, %ymm2, %k1
546 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
547 ; AVX512-64-NEXT: retq
548 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
549 <16 x half> %f1, <16 x half> %f2, metadata !"ueq",
550 metadata !"fpexcept.strict") #0
551 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
555 define <16 x i16> @test_v16f16_ugt_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
556 ; AVX512-32-LABEL: test_v16f16_ugt_s:
557 ; AVX512-32: # %bb.0:
558 ; AVX512-32-NEXT: pushl %ebp
559 ; AVX512-32-NEXT: movl %esp, %ebp
560 ; AVX512-32-NEXT: andl $-32, %esp
561 ; AVX512-32-NEXT: subl $32, %esp
562 ; AVX512-32-NEXT: vcmpnleph 8(%ebp), %ymm2, %k1
563 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
564 ; AVX512-32-NEXT: movl %ebp, %esp
565 ; AVX512-32-NEXT: popl %ebp
566 ; AVX512-32-NEXT: retl
568 ; AVX512-64-LABEL: test_v16f16_ugt_s:
569 ; AVX512-64: # %bb.0:
570 ; AVX512-64-NEXT: vcmpnleph %ymm3, %ymm2, %k1
571 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
572 ; AVX512-64-NEXT: retq
573 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
574 <16 x half> %f1, <16 x half> %f2, metadata !"ugt",
575 metadata !"fpexcept.strict") #0
576 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
580 define <16 x i16> @test_v16f16_uge_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
581 ; AVX512-32-LABEL: test_v16f16_uge_s:
582 ; AVX512-32: # %bb.0:
583 ; AVX512-32-NEXT: pushl %ebp
584 ; AVX512-32-NEXT: movl %esp, %ebp
585 ; AVX512-32-NEXT: andl $-32, %esp
586 ; AVX512-32-NEXT: subl $32, %esp
587 ; AVX512-32-NEXT: vcmpnltph 8(%ebp), %ymm2, %k1
588 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
589 ; AVX512-32-NEXT: movl %ebp, %esp
590 ; AVX512-32-NEXT: popl %ebp
591 ; AVX512-32-NEXT: retl
593 ; AVX512-64-LABEL: test_v16f16_uge_s:
594 ; AVX512-64: # %bb.0:
595 ; AVX512-64-NEXT: vcmpnltph %ymm3, %ymm2, %k1
596 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
597 ; AVX512-64-NEXT: retq
598 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
599 <16 x half> %f1, <16 x half> %f2, metadata !"uge",
600 metadata !"fpexcept.strict") #0
601 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
605 define <16 x i16> @test_v16f16_ult_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
606 ; AVX512-32-LABEL: test_v16f16_ult_s:
607 ; AVX512-32: # %bb.0:
608 ; AVX512-32-NEXT: pushl %ebp
609 ; AVX512-32-NEXT: movl %esp, %ebp
610 ; AVX512-32-NEXT: andl $-32, %esp
611 ; AVX512-32-NEXT: subl $32, %esp
612 ; AVX512-32-NEXT: vcmpngeph 8(%ebp), %ymm2, %k1
613 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
614 ; AVX512-32-NEXT: movl %ebp, %esp
615 ; AVX512-32-NEXT: popl %ebp
616 ; AVX512-32-NEXT: retl
618 ; AVX512-64-LABEL: test_v16f16_ult_s:
619 ; AVX512-64: # %bb.0:
620 ; AVX512-64-NEXT: vcmpnleph %ymm2, %ymm3, %k1
621 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
622 ; AVX512-64-NEXT: retq
623 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
624 <16 x half> %f1, <16 x half> %f2, metadata !"ult",
625 metadata !"fpexcept.strict") #0
626 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
630 define <16 x i16> @test_v16f16_ule_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
631 ; AVX512-32-LABEL: test_v16f16_ule_s:
632 ; AVX512-32: # %bb.0:
633 ; AVX512-32-NEXT: pushl %ebp
634 ; AVX512-32-NEXT: movl %esp, %ebp
635 ; AVX512-32-NEXT: andl $-32, %esp
636 ; AVX512-32-NEXT: subl $32, %esp
637 ; AVX512-32-NEXT: vcmpngtph 8(%ebp), %ymm2, %k1
638 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
639 ; AVX512-32-NEXT: movl %ebp, %esp
640 ; AVX512-32-NEXT: popl %ebp
641 ; AVX512-32-NEXT: retl
643 ; AVX512-64-LABEL: test_v16f16_ule_s:
644 ; AVX512-64: # %bb.0:
645 ; AVX512-64-NEXT: vcmpnltph %ymm2, %ymm3, %k1
646 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
647 ; AVX512-64-NEXT: retq
648 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
649 <16 x half> %f1, <16 x half> %f2, metadata !"ule",
650 metadata !"fpexcept.strict") #0
651 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
655 define <16 x i16> @test_v16f16_une_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
656 ; AVX512-32-LABEL: test_v16f16_une_s:
657 ; AVX512-32: # %bb.0:
658 ; AVX512-32-NEXT: pushl %ebp
659 ; AVX512-32-NEXT: movl %esp, %ebp
660 ; AVX512-32-NEXT: andl $-32, %esp
661 ; AVX512-32-NEXT: subl $32, %esp
662 ; AVX512-32-NEXT: vcmpneq_usph 8(%ebp), %ymm2, %k1
663 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
664 ; AVX512-32-NEXT: movl %ebp, %esp
665 ; AVX512-32-NEXT: popl %ebp
666 ; AVX512-32-NEXT: retl
668 ; AVX512-64-LABEL: test_v16f16_une_s:
669 ; AVX512-64: # %bb.0:
670 ; AVX512-64-NEXT: vcmpneq_usph %ymm3, %ymm2, %k1
671 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
672 ; AVX512-64-NEXT: retq
673 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
674 <16 x half> %f1, <16 x half> %f2, metadata !"une",
675 metadata !"fpexcept.strict") #0
676 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
680 define <16 x i16> @test_v16f16_uno_s(<16 x i16> %a, <16 x i16> %b, <16 x half> %f1, <16 x half> %f2) #0 {
681 ; AVX512-32-LABEL: test_v16f16_uno_s:
682 ; AVX512-32: # %bb.0:
683 ; AVX512-32-NEXT: pushl %ebp
684 ; AVX512-32-NEXT: movl %esp, %ebp
685 ; AVX512-32-NEXT: andl $-32, %esp
686 ; AVX512-32-NEXT: subl $32, %esp
687 ; AVX512-32-NEXT: vcmpunord_sph 8(%ebp), %ymm2, %k1
688 ; AVX512-32-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
689 ; AVX512-32-NEXT: movl %ebp, %esp
690 ; AVX512-32-NEXT: popl %ebp
691 ; AVX512-32-NEXT: retl
693 ; AVX512-64-LABEL: test_v16f16_uno_s:
694 ; AVX512-64: # %bb.0:
695 ; AVX512-64-NEXT: vcmpunord_sph %ymm3, %ymm2, %k1
696 ; AVX512-64-NEXT: vpblendmw %ymm0, %ymm1, %ymm0 {%k1}
697 ; AVX512-64-NEXT: retq
698 %cond = call <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(
699 <16 x half> %f1, <16 x half> %f2, metadata !"uno",
700 metadata !"fpexcept.strict") #0
701 %res = select <16 x i1> %cond, <16 x i16> %a, <16 x i16> %b
705 attributes #0 = { strictfp nounwind }
707 declare <16 x i1> @llvm.experimental.constrained.fcmp.v16f16(<16 x half>, <16 x half>, metadata, metadata)
708 declare <16 x i1> @llvm.experimental.constrained.fcmps.v16f16(<16 x half>, <16 x half>, metadata, metadata)