1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw,+avx512vl | FileCheck %s --check-prefix=AVX512BWVL
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw | FileCheck %s --check-prefix=AVX512BW
5 ; Function Attrs: norecurse nounwind readnone
6 define zeroext i16 @TEST_mm_test_epi8_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
7 ; AVX512BWVL-LABEL: TEST_mm_test_epi8_mask:
8 ; AVX512BWVL: # %bb.0: # %entry
9 ; AVX512BWVL-NEXT: vptestmb %xmm0, %xmm1, %k0
10 ; AVX512BWVL-NEXT: kmovd %k0, %eax
11 ; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
12 ; AVX512BWVL-NEXT: retq
14 ; AVX512BW-LABEL: TEST_mm_test_epi8_mask:
15 ; AVX512BW: # %bb.0: # %entry
16 ; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
17 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
18 ; AVX512BW-NEXT: vptestmb %zmm0, %zmm1, %k0
19 ; AVX512BW-NEXT: kmovd %k0, %eax
20 ; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
21 ; AVX512BW-NEXT: vzeroupper
24 %and.i.i = and <2 x i64> %__B, %__A
25 %0 = bitcast <2 x i64> %and.i.i to <16 x i8>
26 %1 = icmp ne <16 x i8> %0, zeroinitializer
27 %2 = bitcast <16 x i1> %1 to i16
31 ; Function Attrs: norecurse nounwind readnone
32 define zeroext i16 @TEST_mm_mask_test_epi8_mask(i16 zeroext %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
33 ; AVX512BWVL-LABEL: TEST_mm_mask_test_epi8_mask:
34 ; AVX512BWVL: # %bb.0: # %entry
35 ; AVX512BWVL-NEXT: vptestmb %xmm0, %xmm1, %k0
36 ; AVX512BWVL-NEXT: kmovd %k0, %eax
37 ; AVX512BWVL-NEXT: andl %edi, %eax
38 ; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
39 ; AVX512BWVL-NEXT: retq
41 ; AVX512BW-LABEL: TEST_mm_mask_test_epi8_mask:
42 ; AVX512BW: # %bb.0: # %entry
43 ; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
44 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
45 ; AVX512BW-NEXT: vptestmb %zmm0, %zmm1, %k0
46 ; AVX512BW-NEXT: kmovd %k0, %eax
47 ; AVX512BW-NEXT: andl %edi, %eax
48 ; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
49 ; AVX512BW-NEXT: vzeroupper
52 %and.i.i = and <2 x i64> %__B, %__A
53 %0 = bitcast <2 x i64> %and.i.i to <16 x i8>
54 %1 = icmp ne <16 x i8> %0, zeroinitializer
55 %2 = bitcast i16 %__U to <16 x i1>
56 %3 = and <16 x i1> %1, %2
57 %4 = bitcast <16 x i1> %3 to i16
61 ; Function Attrs: norecurse nounwind readnone
62 define zeroext i8 @TEST_mm_test_epi16_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
63 ; AVX512BWVL-LABEL: TEST_mm_test_epi16_mask:
64 ; AVX512BWVL: # %bb.0: # %entry
65 ; AVX512BWVL-NEXT: vptestmw %xmm0, %xmm1, %k0
66 ; AVX512BWVL-NEXT: kmovd %k0, %eax
67 ; AVX512BWVL-NEXT: # kill: def $al killed $al killed $eax
68 ; AVX512BWVL-NEXT: retq
70 ; AVX512BW-LABEL: TEST_mm_test_epi16_mask:
71 ; AVX512BW: # %bb.0: # %entry
72 ; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
73 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
74 ; AVX512BW-NEXT: vptestmw %zmm0, %zmm1, %k0
75 ; AVX512BW-NEXT: kmovd %k0, %eax
76 ; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
77 ; AVX512BW-NEXT: vzeroupper
80 %and.i.i = and <2 x i64> %__B, %__A
81 %0 = bitcast <2 x i64> %and.i.i to <8 x i16>
82 %1 = icmp ne <8 x i16> %0, zeroinitializer
83 %2 = bitcast <8 x i1> %1 to i8
87 ; Function Attrs: norecurse nounwind readnone
88 define zeroext i8 @TEST_mm_mask_test_epi16_mask(i8 zeroext %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
89 ; AVX512BWVL-LABEL: TEST_mm_mask_test_epi16_mask:
90 ; AVX512BWVL: # %bb.0: # %entry
91 ; AVX512BWVL-NEXT: vptestmw %xmm0, %xmm1, %k0
92 ; AVX512BWVL-NEXT: kmovd %k0, %eax
93 ; AVX512BWVL-NEXT: andb %dil, %al
94 ; AVX512BWVL-NEXT: # kill: def $al killed $al killed $eax
95 ; AVX512BWVL-NEXT: retq
97 ; AVX512BW-LABEL: TEST_mm_mask_test_epi16_mask:
98 ; AVX512BW: # %bb.0: # %entry
99 ; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
100 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
101 ; AVX512BW-NEXT: vptestmw %zmm0, %zmm1, %k0
102 ; AVX512BW-NEXT: kmovd %k0, %eax
103 ; AVX512BW-NEXT: andb %dil, %al
104 ; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
105 ; AVX512BW-NEXT: vzeroupper
106 ; AVX512BW-NEXT: retq
108 %and.i.i = and <2 x i64> %__B, %__A
109 %0 = bitcast <2 x i64> %and.i.i to <8 x i16>
110 %1 = icmp ne <8 x i16> %0, zeroinitializer
111 %2 = bitcast i8 %__U to <8 x i1>
112 %3 = and <8 x i1> %1, %2
113 %4 = bitcast <8 x i1> %3 to i8
117 ; Function Attrs: norecurse nounwind readnone
118 define zeroext i16 @TEST_mm_testn_epi8_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
119 ; AVX512BWVL-LABEL: TEST_mm_testn_epi8_mask:
120 ; AVX512BWVL: # %bb.0: # %entry
121 ; AVX512BWVL-NEXT: vptestnmb %xmm0, %xmm1, %k0
122 ; AVX512BWVL-NEXT: kmovd %k0, %eax
123 ; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
124 ; AVX512BWVL-NEXT: retq
126 ; AVX512BW-LABEL: TEST_mm_testn_epi8_mask:
127 ; AVX512BW: # %bb.0: # %entry
128 ; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
129 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
130 ; AVX512BW-NEXT: vptestnmb %zmm0, %zmm1, %k0
131 ; AVX512BW-NEXT: kmovd %k0, %eax
132 ; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
133 ; AVX512BW-NEXT: vzeroupper
134 ; AVX512BW-NEXT: retq
136 %and.i.i = and <2 x i64> %__B, %__A
137 %0 = bitcast <2 x i64> %and.i.i to <16 x i8>
138 %1 = icmp eq <16 x i8> %0, zeroinitializer
139 %2 = bitcast <16 x i1> %1 to i16
143 ; Function Attrs: norecurse nounwind readnone
144 define zeroext i16 @TEST_mm_mask_testn_epi8_mask(i16 zeroext %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
145 ; AVX512BWVL-LABEL: TEST_mm_mask_testn_epi8_mask:
146 ; AVX512BWVL: # %bb.0: # %entry
147 ; AVX512BWVL-NEXT: vptestnmb %xmm0, %xmm1, %k0
148 ; AVX512BWVL-NEXT: kmovd %k0, %eax
149 ; AVX512BWVL-NEXT: andl %edi, %eax
150 ; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
151 ; AVX512BWVL-NEXT: retq
153 ; AVX512BW-LABEL: TEST_mm_mask_testn_epi8_mask:
154 ; AVX512BW: # %bb.0: # %entry
155 ; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
156 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
157 ; AVX512BW-NEXT: vptestnmb %zmm0, %zmm1, %k0
158 ; AVX512BW-NEXT: kmovd %k0, %eax
159 ; AVX512BW-NEXT: andl %edi, %eax
160 ; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
161 ; AVX512BW-NEXT: vzeroupper
162 ; AVX512BW-NEXT: retq
164 %and.i.i = and <2 x i64> %__B, %__A
165 %0 = bitcast <2 x i64> %and.i.i to <16 x i8>
166 %1 = icmp eq <16 x i8> %0, zeroinitializer
167 %2 = bitcast i16 %__U to <16 x i1>
168 %3 = and <16 x i1> %1, %2
169 %4 = bitcast <16 x i1> %3 to i16
173 ; Function Attrs: norecurse nounwind readnone
174 define zeroext i8 @TEST_mm_testn_epi16_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
175 ; AVX512BWVL-LABEL: TEST_mm_testn_epi16_mask:
176 ; AVX512BWVL: # %bb.0: # %entry
177 ; AVX512BWVL-NEXT: vptestnmw %xmm0, %xmm1, %k0
178 ; AVX512BWVL-NEXT: kmovd %k0, %eax
179 ; AVX512BWVL-NEXT: # kill: def $al killed $al killed $eax
180 ; AVX512BWVL-NEXT: retq
182 ; AVX512BW-LABEL: TEST_mm_testn_epi16_mask:
183 ; AVX512BW: # %bb.0: # %entry
184 ; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
185 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
186 ; AVX512BW-NEXT: vptestnmw %zmm0, %zmm1, %k0
187 ; AVX512BW-NEXT: kmovd %k0, %eax
188 ; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
189 ; AVX512BW-NEXT: vzeroupper
190 ; AVX512BW-NEXT: retq
192 %and.i.i = and <2 x i64> %__B, %__A
193 %0 = bitcast <2 x i64> %and.i.i to <8 x i16>
194 %1 = icmp eq <8 x i16> %0, zeroinitializer
195 %2 = bitcast <8 x i1> %1 to i8
199 ; Function Attrs: norecurse nounwind readnone
200 define zeroext i8 @TEST_mm_mask_testn_epi16_mask(i8 zeroext %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
201 ; AVX512BWVL-LABEL: TEST_mm_mask_testn_epi16_mask:
202 ; AVX512BWVL: # %bb.0: # %entry
203 ; AVX512BWVL-NEXT: vptestnmw %xmm0, %xmm1, %k0
204 ; AVX512BWVL-NEXT: kmovd %k0, %eax
205 ; AVX512BWVL-NEXT: andb %dil, %al
206 ; AVX512BWVL-NEXT: # kill: def $al killed $al killed $eax
207 ; AVX512BWVL-NEXT: retq
209 ; AVX512BW-LABEL: TEST_mm_mask_testn_epi16_mask:
210 ; AVX512BW: # %bb.0: # %entry
211 ; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
212 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
213 ; AVX512BW-NEXT: vptestnmw %zmm0, %zmm1, %k0
214 ; AVX512BW-NEXT: kmovd %k0, %eax
215 ; AVX512BW-NEXT: andb %dil, %al
216 ; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
217 ; AVX512BW-NEXT: vzeroupper
218 ; AVX512BW-NEXT: retq
220 %and.i.i = and <2 x i64> %__B, %__A
221 %0 = bitcast <2 x i64> %and.i.i to <8 x i16>
222 %1 = icmp eq <8 x i16> %0, zeroinitializer
223 %2 = bitcast i8 %__U to <8 x i1>
224 %3 = and <8 x i1> %1, %2
225 %4 = bitcast <8 x i1> %3 to i8
229 ; Function Attrs: norecurse nounwind readnone
230 define i32 @TEST_mm256_test_epi8_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
231 ; AVX512BWVL-LABEL: TEST_mm256_test_epi8_mask:
232 ; AVX512BWVL: # %bb.0: # %entry
233 ; AVX512BWVL-NEXT: vptestmb %ymm0, %ymm1, %k0
234 ; AVX512BWVL-NEXT: kmovd %k0, %eax
235 ; AVX512BWVL-NEXT: vzeroupper
236 ; AVX512BWVL-NEXT: retq
238 ; AVX512BW-LABEL: TEST_mm256_test_epi8_mask:
239 ; AVX512BW: # %bb.0: # %entry
240 ; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
241 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
242 ; AVX512BW-NEXT: vptestmb %zmm0, %zmm1, %k0
243 ; AVX512BW-NEXT: kmovd %k0, %eax
244 ; AVX512BW-NEXT: vzeroupper
245 ; AVX512BW-NEXT: retq
247 %and.i.i = and <4 x i64> %__B, %__A
248 %0 = bitcast <4 x i64> %and.i.i to <32 x i8>
249 %1 = icmp ne <32 x i8> %0, zeroinitializer
250 %2 = bitcast <32 x i1> %1 to i32
254 ; Function Attrs: norecurse nounwind readnone
255 define i32 @TEST_mm256_mask_test_epi8_mask(i32 %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
256 ; AVX512BWVL-LABEL: TEST_mm256_mask_test_epi8_mask:
257 ; AVX512BWVL: # %bb.0: # %entry
258 ; AVX512BWVL-NEXT: vptestmb %ymm0, %ymm1, %k0
259 ; AVX512BWVL-NEXT: kmovd %k0, %eax
260 ; AVX512BWVL-NEXT: andl %edi, %eax
261 ; AVX512BWVL-NEXT: vzeroupper
262 ; AVX512BWVL-NEXT: retq
264 ; AVX512BW-LABEL: TEST_mm256_mask_test_epi8_mask:
265 ; AVX512BW: # %bb.0: # %entry
266 ; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
267 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
268 ; AVX512BW-NEXT: vptestmb %zmm0, %zmm1, %k0
269 ; AVX512BW-NEXT: kmovd %k0, %eax
270 ; AVX512BW-NEXT: andl %edi, %eax
271 ; AVX512BW-NEXT: vzeroupper
272 ; AVX512BW-NEXT: retq
274 %and.i.i = and <4 x i64> %__B, %__A
275 %0 = bitcast <4 x i64> %and.i.i to <32 x i8>
276 %1 = icmp ne <32 x i8> %0, zeroinitializer
277 %2 = bitcast i32 %__U to <32 x i1>
278 %3 = and <32 x i1> %1, %2
279 %4 = bitcast <32 x i1> %3 to i32
283 ; Function Attrs: norecurse nounwind readnone
284 define zeroext i16 @TEST_mm256_test_epi16_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
285 ; AVX512BWVL-LABEL: TEST_mm256_test_epi16_mask:
286 ; AVX512BWVL: # %bb.0: # %entry
287 ; AVX512BWVL-NEXT: vptestmw %ymm0, %ymm1, %k0
288 ; AVX512BWVL-NEXT: kmovd %k0, %eax
289 ; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
290 ; AVX512BWVL-NEXT: vzeroupper
291 ; AVX512BWVL-NEXT: retq
293 ; AVX512BW-LABEL: TEST_mm256_test_epi16_mask:
294 ; AVX512BW: # %bb.0: # %entry
295 ; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
296 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
297 ; AVX512BW-NEXT: vptestmw %zmm0, %zmm1, %k0
298 ; AVX512BW-NEXT: kmovd %k0, %eax
299 ; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
300 ; AVX512BW-NEXT: vzeroupper
301 ; AVX512BW-NEXT: retq
303 %and.i.i = and <4 x i64> %__B, %__A
304 %0 = bitcast <4 x i64> %and.i.i to <16 x i16>
305 %1 = icmp ne <16 x i16> %0, zeroinitializer
306 %2 = bitcast <16 x i1> %1 to i16
310 ; Function Attrs: norecurse nounwind readnone
311 define zeroext i16 @TEST_mm256_mask_test_epi16_mask(i16 zeroext %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
312 ; AVX512BWVL-LABEL: TEST_mm256_mask_test_epi16_mask:
313 ; AVX512BWVL: # %bb.0: # %entry
314 ; AVX512BWVL-NEXT: vptestmw %ymm0, %ymm1, %k0
315 ; AVX512BWVL-NEXT: kmovd %k0, %eax
316 ; AVX512BWVL-NEXT: andl %edi, %eax
317 ; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
318 ; AVX512BWVL-NEXT: vzeroupper
319 ; AVX512BWVL-NEXT: retq
321 ; AVX512BW-LABEL: TEST_mm256_mask_test_epi16_mask:
322 ; AVX512BW: # %bb.0: # %entry
323 ; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
324 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
325 ; AVX512BW-NEXT: vptestmw %zmm0, %zmm1, %k0
326 ; AVX512BW-NEXT: kmovd %k0, %eax
327 ; AVX512BW-NEXT: andl %edi, %eax
328 ; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
329 ; AVX512BW-NEXT: vzeroupper
330 ; AVX512BW-NEXT: retq
332 %and.i.i = and <4 x i64> %__B, %__A
333 %0 = bitcast <4 x i64> %and.i.i to <16 x i16>
334 %1 = icmp ne <16 x i16> %0, zeroinitializer
335 %2 = bitcast i16 %__U to <16 x i1>
336 %3 = and <16 x i1> %1, %2
337 %4 = bitcast <16 x i1> %3 to i16
341 ; Function Attrs: norecurse nounwind readnone
342 define i32 @TEST_mm256_testn_epi8_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
343 ; AVX512BWVL-LABEL: TEST_mm256_testn_epi8_mask:
344 ; AVX512BWVL: # %bb.0: # %entry
345 ; AVX512BWVL-NEXT: vptestnmb %ymm0, %ymm1, %k0
346 ; AVX512BWVL-NEXT: kmovd %k0, %eax
347 ; AVX512BWVL-NEXT: vzeroupper
348 ; AVX512BWVL-NEXT: retq
350 ; AVX512BW-LABEL: TEST_mm256_testn_epi8_mask:
351 ; AVX512BW: # %bb.0: # %entry
352 ; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
353 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
354 ; AVX512BW-NEXT: vptestnmb %zmm0, %zmm1, %k0
355 ; AVX512BW-NEXT: kmovd %k0, %eax
356 ; AVX512BW-NEXT: vzeroupper
357 ; AVX512BW-NEXT: retq
359 %and.i.i = and <4 x i64> %__B, %__A
360 %0 = bitcast <4 x i64> %and.i.i to <32 x i8>
361 %1 = icmp eq <32 x i8> %0, zeroinitializer
362 %2 = bitcast <32 x i1> %1 to i32
366 ; Function Attrs: norecurse nounwind readnone
367 define i32 @TEST_mm256_mask_testn_epi8_mask(i32 %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
368 ; AVX512BWVL-LABEL: TEST_mm256_mask_testn_epi8_mask:
369 ; AVX512BWVL: # %bb.0: # %entry
370 ; AVX512BWVL-NEXT: vptestnmb %ymm0, %ymm1, %k0
371 ; AVX512BWVL-NEXT: kmovd %k0, %eax
372 ; AVX512BWVL-NEXT: andl %edi, %eax
373 ; AVX512BWVL-NEXT: vzeroupper
374 ; AVX512BWVL-NEXT: retq
376 ; AVX512BW-LABEL: TEST_mm256_mask_testn_epi8_mask:
377 ; AVX512BW: # %bb.0: # %entry
378 ; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
379 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
380 ; AVX512BW-NEXT: vptestnmb %zmm0, %zmm1, %k0
381 ; AVX512BW-NEXT: kmovd %k0, %eax
382 ; AVX512BW-NEXT: andl %edi, %eax
383 ; AVX512BW-NEXT: vzeroupper
384 ; AVX512BW-NEXT: retq
386 %and.i.i = and <4 x i64> %__B, %__A
387 %0 = bitcast <4 x i64> %and.i.i to <32 x i8>
388 %1 = icmp eq <32 x i8> %0, zeroinitializer
389 %2 = bitcast i32 %__U to <32 x i1>
390 %3 = and <32 x i1> %1, %2
391 %4 = bitcast <32 x i1> %3 to i32
395 ; Function Attrs: norecurse nounwind readnone
396 define zeroext i16 @TEST_mm256_testn_epi16_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
397 ; AVX512BWVL-LABEL: TEST_mm256_testn_epi16_mask:
398 ; AVX512BWVL: # %bb.0: # %entry
399 ; AVX512BWVL-NEXT: vptestnmw %ymm0, %ymm1, %k0
400 ; AVX512BWVL-NEXT: kmovd %k0, %eax
401 ; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
402 ; AVX512BWVL-NEXT: vzeroupper
403 ; AVX512BWVL-NEXT: retq
405 ; AVX512BW-LABEL: TEST_mm256_testn_epi16_mask:
406 ; AVX512BW: # %bb.0: # %entry
407 ; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
408 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
409 ; AVX512BW-NEXT: vptestnmw %zmm0, %zmm1, %k0
410 ; AVX512BW-NEXT: kmovd %k0, %eax
411 ; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
412 ; AVX512BW-NEXT: vzeroupper
413 ; AVX512BW-NEXT: retq
415 %and.i.i = and <4 x i64> %__B, %__A
416 %0 = bitcast <4 x i64> %and.i.i to <16 x i16>
417 %1 = icmp eq <16 x i16> %0, zeroinitializer
418 %2 = bitcast <16 x i1> %1 to i16
422 ; Function Attrs: norecurse nounwind readnone
423 define zeroext i16 @TEST_mm256_mask_testn_epi16_mask(i16 zeroext %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
424 ; AVX512BWVL-LABEL: TEST_mm256_mask_testn_epi16_mask:
425 ; AVX512BWVL: # %bb.0: # %entry
426 ; AVX512BWVL-NEXT: vptestnmw %ymm0, %ymm1, %k0
427 ; AVX512BWVL-NEXT: kmovd %k0, %eax
428 ; AVX512BWVL-NEXT: andl %edi, %eax
429 ; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
430 ; AVX512BWVL-NEXT: vzeroupper
431 ; AVX512BWVL-NEXT: retq
433 ; AVX512BW-LABEL: TEST_mm256_mask_testn_epi16_mask:
434 ; AVX512BW: # %bb.0: # %entry
435 ; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
436 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
437 ; AVX512BW-NEXT: vptestnmw %zmm0, %zmm1, %k0
438 ; AVX512BW-NEXT: kmovd %k0, %eax
439 ; AVX512BW-NEXT: andl %edi, %eax
440 ; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
441 ; AVX512BW-NEXT: vzeroupper
442 ; AVX512BW-NEXT: retq
444 %and.i.i = and <4 x i64> %__B, %__A
445 %0 = bitcast <4 x i64> %and.i.i to <16 x i16>
446 %1 = icmp eq <16 x i16> %0, zeroinitializer
447 %2 = bitcast i16 %__U to <16 x i1>
448 %3 = and <16 x i1> %1, %2
449 %4 = bitcast <16 x i1> %3 to i16