source: Daodan/MinGW/lib/gcc/mingw32/5.3.0/include/avx512bwintrin.h@ 1063

Last change on this file since 1063 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 89.4 KB
RevLine 
[1046]1/* Copyright (C) 2014-2015 Free Software Foundation, Inc.
2
3 This file is part of GCC.
4
5 GCC is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
8 any later version.
9
10 GCC is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 Under Section 7 of GPL version 3, you are granted additional
16 permissions described in the GCC Runtime Library Exception, version
17 3.1, as published by the Free Software Foundation.
18
19 You should have received a copy of the GNU General Public License and
20 a copy of the GCC Runtime Library Exception along with this program;
21 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22 <http://www.gnu.org/licenses/>. */
23
24#ifndef _IMMINTRIN_H_INCLUDED
25#error "Never use <avx512bwintrin.h> directly; include <immintrin.h> instead."
26#endif
27
28#ifndef _AVX512BWINTRIN_H_INCLUDED
29#define _AVX512BWINTRIN_H_INCLUDED
30
31#ifndef __AVX512BW__
32#pragma GCC push_options
33#pragma GCC target("avx512bw")
34#define __DISABLE_AVX512BW__
35#endif /* __AVX512BW__ */
36
37/* Internal data types for implementing the intrinsics. */
38typedef short __v32hi __attribute__ ((__vector_size__ (64)));
39typedef char __v64qi __attribute__ ((__vector_size__ (64)));
40
41typedef unsigned long long __mmask64;
42
43extern __inline __m512i
44__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
45_mm512_setzero_qi (void)
46{
47 return __extension__ (__m512i)(__v64qi){ 0, 0, 0, 0, 0, 0, 0, 0,
48 0, 0, 0, 0, 0, 0, 0, 0,
49 0, 0, 0, 0, 0, 0, 0, 0,
50 0, 0, 0, 0, 0, 0, 0, 0,
51 0, 0, 0, 0, 0, 0, 0, 0,
52 0, 0, 0, 0, 0, 0, 0, 0,
53 0, 0, 0, 0, 0, 0, 0, 0,
54 0, 0, 0, 0, 0, 0, 0, 0 };
55}
56
57extern __inline __m512i
58__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
59_mm512_setzero_hi (void)
60{
61 return __extension__ (__m512i)(__v32hi){ 0, 0, 0, 0, 0, 0, 0, 0,
62 0, 0, 0, 0, 0, 0, 0, 0,
63 0, 0, 0, 0, 0, 0, 0, 0,
64 0, 0, 0, 0, 0, 0, 0, 0 };
65}
66
67extern __inline __m512i
68__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
69_mm512_mask_mov_epi16 (__m512i __W, __mmask32 __U, __m512i __A)
70{
71 return (__m512i) __builtin_ia32_movdquhi512_mask ((__v32hi) __A,
72 (__v32hi) __W,
73 (__mmask32) __U);
74}
75
76extern __inline __m512i
77__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
78_mm512_maskz_mov_epi16 (__mmask32 __U, __m512i __A)
79{
80 return (__m512i) __builtin_ia32_movdquhi512_mask ((__v32hi) __A,
81 (__v32hi)
82 _mm512_setzero_hi (),
83 (__mmask32) __U);
84}
85
86extern __inline __m512i
87__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
88_mm512_mask_loadu_epi16 (__m512i __W, __mmask32 __U, void const *__P)
89{
90 return (__m512i) __builtin_ia32_loaddquhi512_mask ((__v32hi *) __P,
91 (__v32hi) __W,
92 (__mmask32) __U);
93}
94
95extern __inline __m512i
96__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
97_mm512_maskz_loadu_epi16 (__mmask32 __U, void const *__P)
98{
99 return (__m512i) __builtin_ia32_loaddquhi512_mask ((__v32hi *) __P,
100 (__v32hi)
101 _mm512_setzero_hi (),
102 (__mmask32) __U);
103}
104
105extern __inline void
106__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
107_mm512_mask_storeu_epi16 (void *__P, __mmask32 __U, __m512i __A)
108{
109 __builtin_ia32_storedquhi512_mask ((__v32hi *) __P,
110 (__v32hi) __A,
111 (__mmask32) __U);
112}
113
114extern __inline __m512i
115__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
116_mm512_mask_mov_epi8 (__m512i __W, __mmask64 __U, __m512i __A)
117{
118 return (__m512i) __builtin_ia32_movdquqi512_mask ((__v64qi) __A,
119 (__v64qi) __W,
120 (__mmask64) __U);
121}
122
123extern __inline __m512i
124__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
125_mm512_maskz_mov_epi8 (__mmask64 __U, __m512i __A)
126{
127 return (__m512i) __builtin_ia32_movdquqi512_mask ((__v64qi) __A,
128 (__v64qi)
129 _mm512_setzero_hi (),
130 (__mmask64) __U);
131}
132
133extern __inline __mmask32
134__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
135_mm512_kunpackw (__mmask32 __A, __mmask32 __B)
136{
137 return (__mmask32) __builtin_ia32_kunpcksi ((__mmask32) __A,
138 (__mmask32) __B);
139}
140
141extern __inline __mmask64
142__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
143_mm512_kunpackd (__mmask64 __A, __mmask64 __B)
144{
145 return (__mmask64) __builtin_ia32_kunpckdi ((__mmask64) __A,
146 (__mmask64) __B);
147}
148
149extern __inline __m512i
150__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
151_mm512_mask_loadu_epi8 (__m512i __W, __mmask64 __U, void const *__P)
152{
153 return (__m512i) __builtin_ia32_loaddquqi512_mask ((__v64qi *) __P,
154 (__v64qi) __W,
155 (__mmask64) __U);
156}
157
158extern __inline __m512i
159__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
160_mm512_maskz_loadu_epi8 (__mmask64 __U, void const *__P)
161{
162 return (__m512i) __builtin_ia32_loaddquqi512_mask ((__v64qi *) __P,
163 (__v64qi)
164 _mm512_setzero_hi (),
165 (__mmask64) __U);
166}
167
168extern __inline void
169__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
170_mm512_mask_storeu_epi8 (void *__P, __mmask64 __U, __m512i __A)
171{
172 __builtin_ia32_storedquqi512_mask ((__v64qi *) __P,
173 (__v64qi) __A,
174 (__mmask64) __U);
175}
176
177extern __inline __m512i
178__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
179_mm512_sad_epu8 (__m512i __A, __m512i __B)
180{
181 return (__m512i) __builtin_ia32_psadbw512 ((__v64qi) __A,
182 (__v64qi) __B);
183}
184
185extern __inline __m256i
186__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
187_mm512_cvtepi16_epi8 (__m512i __A)
188{
189 return (__m256i) __builtin_ia32_pmovwb512_mask ((__v32hi) __A,
190 (__v32qi) _mm256_undefined_si256(),
191 (__mmask32) -1);
192}
193
194extern __inline __m256i
195__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
196_mm512_mask_cvtepi16_epi8 (__m256i __O, __mmask32 __M, __m512i __A)
197{
198 return (__m256i) __builtin_ia32_pmovwb512_mask ((__v32hi) __A,
199 (__v32qi) __O, __M);
200}
201
202extern __inline __m256i
203__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
204_mm512_maskz_cvtepi16_epi8 (__mmask32 __M, __m512i __A)
205{
206 return (__m256i) __builtin_ia32_pmovwb512_mask ((__v32hi) __A,
207 (__v32qi)
208 _mm256_setzero_si256 (),
209 __M);
210}
211
212extern __inline __m256i
213__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
214_mm512_cvtsepi16_epi8 (__m512i __A)
215{
216 return (__m256i) __builtin_ia32_pmovswb512_mask ((__v32hi) __A,
217 (__v32qi)_mm256_undefined_si256(),
218 (__mmask32) -1);
219}
220
221extern __inline __m256i
222__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
223_mm512_mask_cvtsepi16_epi8 (__m256i __O, __mmask32 __M, __m512i __A)
224{
225 return (__m256i) __builtin_ia32_pmovswb512_mask ((__v32hi) __A,
226 (__v32qi)__O,
227 __M);
228}
229
230extern __inline __m256i
231__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
232_mm512_maskz_cvtsepi16_epi8 (__mmask32 __M, __m512i __A)
233{
234 return (__m256i) __builtin_ia32_pmovswb512_mask ((__v32hi) __A,
235 (__v32qi)
236 _mm256_setzero_si256 (),
237 __M);
238}
239
240extern __inline __m256i
241__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
242_mm512_cvtusepi16_epi8 (__m512i __A)
243{
244 return (__m256i) __builtin_ia32_pmovuswb512_mask ((__v32hi) __A,
245 (__v32qi)_mm256_undefined_si256(),
246 (__mmask32) -1);
247}
248
249extern __inline __m256i
250__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
251_mm512_mask_cvtusepi16_epi8 (__m256i __O, __mmask32 __M, __m512i __A)
252{
253 return (__m256i) __builtin_ia32_pmovuswb512_mask ((__v32hi) __A,
254 (__v32qi) __O,
255 __M);
256}
257
258extern __inline __m256i
259__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
260_mm512_maskz_cvtusepi16_epi8 (__mmask32 __M, __m512i __A)
261{
262 return (__m256i) __builtin_ia32_pmovuswb512_mask ((__v32hi) __A,
263 (__v32qi)
264 _mm256_setzero_si256 (),
265 __M);
266}
267
268extern __inline __m512i
269__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
270_mm512_broadcastb_epi8 (__m128i __A)
271{
272 return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A,
273 (__v64qi)_mm512_undefined_si512(),
274 (__mmask64) -
275 1);
276}
277
278extern __inline __m512i
279__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
280_mm512_mask_broadcastb_epi8 (__m512i __O, __mmask64 __M, __m128i __A)
281{
282 return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A,
283 (__v64qi) __O,
284 __M);
285}
286
287extern __inline __m512i
288__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
289_mm512_maskz_broadcastb_epi8 (__mmask64 __M, __m128i __A)
290{
291 return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A,
292 (__v64qi)
293 _mm512_setzero_qi(),
294 __M);
295}
296
297extern __inline __m512i
298__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
299_mm512_mask_set1_epi8 (__m512i __O, __mmask64 __M, char __A)
300{
301 return (__m512i) __builtin_ia32_pbroadcastb512_gpr_mask (__A,
302 (__v64qi) __O,
303 __M);
304}
305
306extern __inline __m512i
307__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
308_mm512_maskz_set1_epi8 (__mmask64 __M, char __A)
309{
310 return (__m512i) __builtin_ia32_pbroadcastb512_gpr_mask (__A,
311 (__v64qi)
312 _mm512_setzero_qi(),
313 __M);
314}
315
316extern __inline __m512i
317__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
318_mm512_broadcastw_epi16 (__m128i __A)
319{
320 return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A,
321 (__v32hi)_mm512_undefined_si512(),
322 (__mmask32)-1);
323}
324
325extern __inline __m512i
326__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
327_mm512_mask_broadcastw_epi16 (__m512i __O, __mmask32 __M, __m128i __A)
328{
329 return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A,
330 (__v32hi) __O,
331 __M);
332}
333
334extern __inline __m512i
335__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
336_mm512_maskz_broadcastw_epi16 (__mmask32 __M, __m128i __A)
337{
338 return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A,
339 (__v32hi)
340 _mm512_setzero_hi(),
341 __M);
342}
343
344extern __inline __m512i
345__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
346_mm512_mask_set1_epi16 (__m512i __O, __mmask32 __M, short __A)
347{
348 return (__m512i) __builtin_ia32_pbroadcastw512_gpr_mask (__A,
349 (__v32hi) __O,
350 __M);
351}
352
353extern __inline __m512i
354__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
355_mm512_maskz_set1_epi16 (__mmask32 __M, short __A)
356{
357 return (__m512i) __builtin_ia32_pbroadcastw512_gpr_mask (__A,
358 (__v32hi)
359 _mm512_setzero_hi(),
360 __M);
361}
362
363extern __inline __m512i
364__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
365_mm512_mulhrs_epi16 (__m512i __A, __m512i __B)
366{
367 return (__m512i) __builtin_ia32_pmulhrsw512_mask ((__v32hi) __A,
368 (__v32hi) __B,
369 (__v32hi)
370 _mm512_setzero_hi (),
371 (__mmask32) -1);
372}
373
374extern __inline __m512i
375__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
376_mm512_mask_mulhrs_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
377 __m512i __B)
378{
379 return (__m512i) __builtin_ia32_pmulhrsw512_mask ((__v32hi) __A,
380 (__v32hi) __B,
381 (__v32hi) __W,
382 (__mmask32) __U);
383}
384
385extern __inline __m512i
386__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
387_mm512_maskz_mulhrs_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
388{
389 return (__m512i) __builtin_ia32_pmulhrsw512_mask ((__v32hi) __A,
390 (__v32hi) __B,
391 (__v32hi)
392 _mm512_setzero_hi (),
393 (__mmask32) __U);
394}
395
396extern __inline __m512i
397__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
398_mm512_mulhi_epi16 (__m512i __A, __m512i __B)
399{
400 return (__m512i) __builtin_ia32_pmulhw512_mask ((__v32hi) __A,
401 (__v32hi) __B,
402 (__v32hi)
403 _mm512_setzero_hi (),
404 (__mmask32) -1);
405}
406
407extern __inline __m512i
408__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
409_mm512_mask_mulhi_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
410 __m512i __B)
411{
412 return (__m512i) __builtin_ia32_pmulhw512_mask ((__v32hi) __A,
413 (__v32hi) __B,
414 (__v32hi) __W,
415 (__mmask32) __U);
416}
417
418extern __inline __m512i
419__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
420_mm512_maskz_mulhi_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
421{
422 return (__m512i) __builtin_ia32_pmulhw512_mask ((__v32hi) __A,
423 (__v32hi) __B,
424 (__v32hi)
425 _mm512_setzero_hi (),
426 (__mmask32) __U);
427}
428
429extern __inline __m512i
430__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
431_mm512_mulhi_epu16 (__m512i __A, __m512i __B)
432{
433 return (__m512i) __builtin_ia32_pmulhuw512_mask ((__v32hi) __A,
434 (__v32hi) __B,
435 (__v32hi)
436 _mm512_setzero_hi (),
437 (__mmask32) -1);
438}
439
440extern __inline __m512i
441__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
442_mm512_mask_mulhi_epu16 (__m512i __W, __mmask32 __U, __m512i __A,
443 __m512i __B)
444{
445 return (__m512i) __builtin_ia32_pmulhuw512_mask ((__v32hi) __A,
446 (__v32hi) __B,
447 (__v32hi) __W,
448 (__mmask32) __U);
449}
450
451extern __inline __m512i
452__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
453_mm512_maskz_mulhi_epu16 (__mmask32 __U, __m512i __A, __m512i __B)
454{
455 return (__m512i) __builtin_ia32_pmulhuw512_mask ((__v32hi) __A,
456 (__v32hi) __B,
457 (__v32hi)
458 _mm512_setzero_hi (),
459 (__mmask32) __U);
460}
461
462extern __inline __m512i
463__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
464_mm512_mullo_epi16 (__m512i __A, __m512i __B)
465{
466 return (__m512i) ((__v32hu) __A * (__v32hu) __B);
467}
468
469extern __inline __m512i
470__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
471_mm512_mask_mullo_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
472 __m512i __B)
473{
474 return (__m512i) __builtin_ia32_pmullw512_mask ((__v32hi) __A,
475 (__v32hi) __B,
476 (__v32hi) __W,
477 (__mmask32) __U);
478}
479
480extern __inline __m512i
481__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
482_mm512_maskz_mullo_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
483{
484 return (__m512i) __builtin_ia32_pmullw512_mask ((__v32hi) __A,
485 (__v32hi) __B,
486 (__v32hi)
487 _mm512_setzero_hi (),
488 (__mmask32) __U);
489}
490
491extern __inline __m512i
492__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
493_mm512_cvtepi8_epi16 (__m256i __A)
494{
495 return (__m512i) __builtin_ia32_pmovsxbw512_mask ((__v32qi) __A,
496 (__v32hi)
497 _mm512_setzero_hi (),
498 (__mmask32) -1);
499}
500
501extern __inline __m512i
502__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
503_mm512_mask_cvtepi8_epi16 (__m512i __W, __mmask32 __U, __m256i __A)
504{
505 return (__m512i) __builtin_ia32_pmovsxbw512_mask ((__v32qi) __A,
506 (__v32hi) __W,
507 (__mmask32) __U);
508}
509
510extern __inline __m512i
511__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
512_mm512_maskz_cvtepi8_epi16 (__mmask32 __U, __m256i __A)
513{
514 return (__m512i) __builtin_ia32_pmovsxbw512_mask ((__v32qi) __A,
515 (__v32hi)
516 _mm512_setzero_hi(),
517 (__mmask32) __U);
518}
519
520extern __inline __m512i
521__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
522_mm512_cvtepu8_epi16 (__m256i __A)
523{
524 return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
525 (__v32hi)
526 _mm512_setzero_hi (),
527 (__mmask32) -1);
528}
529
530extern __inline __m512i
531__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
532_mm512_mask_cvtepu8_epi16 (__m512i __W, __mmask32 __U, __m256i __A)
533{
534 return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
535 (__v32hi) __W,
536 (__mmask32) __U);
537}
538
539extern __inline __m512i
540__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
541_mm512_maskz_cvtepu8_epi16 (__mmask32 __U, __m256i __A)
542{
543 return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
544 (__v32hi)
545 _mm512_setzero_hi(),
546 (__mmask32) __U);
547}
548
549extern __inline __m512i
550__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
551_mm512_permutexvar_epi16 (__m512i __A, __m512i __B)
552{
553 return (__m512i) __builtin_ia32_permvarhi512_mask ((__v32hi) __B,
554 (__v32hi) __A,
555 (__v32hi)
556 _mm512_setzero_hi (),
557 (__mmask32) -1);
558}
559
560extern __inline __m512i
561__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
562_mm512_maskz_permutexvar_epi16 (__mmask32 __M, __m512i __A,
563 __m512i __B)
564{
565 return (__m512i) __builtin_ia32_permvarhi512_mask ((__v32hi) __B,
566 (__v32hi) __A,
567 (__v32hi)
568 _mm512_setzero_hi(),
569 (__mmask32) __M);
570}
571
572extern __inline __m512i
573__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
574_mm512_mask_permutexvar_epi16 (__m512i __W, __mmask32 __M, __m512i __A,
575 __m512i __B)
576{
577 return (__m512i) __builtin_ia32_permvarhi512_mask ((__v32hi) __B,
578 (__v32hi) __A,
579 (__v32hi) __W,
580 (__mmask32) __M);
581}
582
583extern __inline __m512i
584__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
585_mm512_permutex2var_epi16 (__m512i __A, __m512i __I, __m512i __B)
586{
587 return (__m512i) __builtin_ia32_vpermt2varhi512_mask ((__v32hi) __I
588 /* idx */ ,
589 (__v32hi) __A,
590 (__v32hi) __B,
591 (__mmask32) -
592 1);
593}
594
595extern __inline __m512i
596__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
597_mm512_mask_permutex2var_epi16 (__m512i __A, __mmask32 __U,
598 __m512i __I, __m512i __B)
599{
600 return (__m512i) __builtin_ia32_vpermt2varhi512_mask ((__v32hi) __I
601 /* idx */ ,
602 (__v32hi) __A,
603 (__v32hi) __B,
604 (__mmask32)
605 __U);
606}
607
608extern __inline __m512i
609__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
610_mm512_mask2_permutex2var_epi16 (__m512i __A, __m512i __I,
611 __mmask32 __U, __m512i __B)
612{
613 return (__m512i) __builtin_ia32_vpermi2varhi512_mask ((__v32hi) __A,
614 (__v32hi) __I
615 /* idx */ ,
616 (__v32hi) __B,
617 (__mmask32)
618 __U);
619}
620
621extern __inline __m512i
622__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
623_mm512_maskz_permutex2var_epi16 (__mmask32 __U, __m512i __A,
624 __m512i __I, __m512i __B)
625{
626 return (__m512i) __builtin_ia32_vpermt2varhi512_maskz ((__v32hi) __I
627 /* idx */ ,
628 (__v32hi) __A,
629 (__v32hi) __B,
630 (__mmask32)
631 __U);
632}
633
634extern __inline __m512i
635__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
636_mm512_avg_epu8 (__m512i __A, __m512i __B)
637{
638 return (__m512i) __builtin_ia32_pavgb512_mask ((__v64qi) __A,
639 (__v64qi) __B,
640 (__v64qi)
641 _mm512_setzero_qi (),
642 (__mmask64) -1);
643}
644
645extern __inline __m512i
646__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
647_mm512_mask_avg_epu8 (__m512i __W, __mmask64 __U, __m512i __A,
648 __m512i __B)
649{
650 return (__m512i) __builtin_ia32_pavgb512_mask ((__v64qi) __A,
651 (__v64qi) __B,
652 (__v64qi) __W,
653 (__mmask64) __U);
654}
655
656extern __inline __m512i
657__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
658_mm512_maskz_avg_epu8 (__mmask64 __U, __m512i __A, __m512i __B)
659{
660 return (__m512i) __builtin_ia32_pavgb512_mask ((__v64qi) __A,
661 (__v64qi) __B,
662 (__v64qi)
663 _mm512_setzero_qi(),
664 (__mmask64) __U);
665}
666
667extern __inline __m512i
668__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
669_mm512_add_epi8 (__m512i __A, __m512i __B)
670{
671 return (__m512i) ((__v64qu) __A + (__v64qu) __B);
672}
673
674extern __inline __m512i
675__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
676_mm512_mask_add_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
677 __m512i __B)
678{
679 return (__m512i) __builtin_ia32_paddb512_mask ((__v64qi) __A,
680 (__v64qi) __B,
681 (__v64qi) __W,
682 (__mmask64) __U);
683}
684
685extern __inline __m512i
686__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
687_mm512_maskz_add_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
688{
689 return (__m512i) __builtin_ia32_paddb512_mask ((__v64qi) __A,
690 (__v64qi) __B,
691 (__v64qi)
692 _mm512_setzero_qi (),
693 (__mmask64) __U);
694}
695
696extern __inline __m512i
697__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
698_mm512_sub_epi8 (__m512i __A, __m512i __B)
699{
700 return (__m512i) ((__v64qu) __A - (__v64qu) __B);
701}
702
703extern __inline __m512i
704__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
705_mm512_mask_sub_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
706 __m512i __B)
707{
708 return (__m512i) __builtin_ia32_psubb512_mask ((__v64qi) __A,
709 (__v64qi) __B,
710 (__v64qi) __W,
711 (__mmask64) __U);
712}
713
714extern __inline __m512i
715__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
716_mm512_maskz_sub_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
717{
718 return (__m512i) __builtin_ia32_psubb512_mask ((__v64qi) __A,
719 (__v64qi) __B,
720 (__v64qi)
721 _mm512_setzero_qi (),
722 (__mmask64) __U);
723}
724
725extern __inline __m512i
726__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
727_mm512_avg_epu16 (__m512i __A, __m512i __B)
728{
729 return (__m512i) __builtin_ia32_pavgw512_mask ((__v32hi) __A,
730 (__v32hi) __B,
731 (__v32hi)
732 _mm512_setzero_hi (),
733 (__mmask32) -1);
734}
735
736extern __inline __m512i
737__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
738_mm512_mask_avg_epu16 (__m512i __W, __mmask32 __U, __m512i __A,
739 __m512i __B)
740{
741 return (__m512i) __builtin_ia32_pavgw512_mask ((__v32hi) __A,
742 (__v32hi) __B,
743 (__v32hi) __W,
744 (__mmask32) __U);
745}
746
747extern __inline __m512i
748__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
749_mm512_maskz_avg_epu16 (__mmask32 __U, __m512i __A, __m512i __B)
750{
751 return (__m512i) __builtin_ia32_pavgw512_mask ((__v32hi) __A,
752 (__v32hi) __B,
753 (__v32hi)
754 _mm512_setzero_hi(),
755 (__mmask32) __U);
756}
757
758extern __inline __m512i
759__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
760_mm512_subs_epi8 (__m512i __A, __m512i __B)
761{
762 return (__m512i) __builtin_ia32_psubsb512_mask ((__v64qi) __A,
763 (__v64qi) __B,
764 (__v64qi)
765 _mm512_setzero_qi (),
766 (__mmask64) -1);
767}
768
769extern __inline __m512i
770__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
771_mm512_mask_subs_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
772 __m512i __B)
773{
774 return (__m512i) __builtin_ia32_psubsb512_mask ((__v64qi) __A,
775 (__v64qi) __B,
776 (__v64qi) __W,
777 (__mmask64) __U);
778}
779
780extern __inline __m512i
781__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
782_mm512_maskz_subs_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
783{
784 return (__m512i) __builtin_ia32_psubsb512_mask ((__v64qi) __A,
785 (__v64qi) __B,
786 (__v64qi)
787 _mm512_setzero_qi (),
788 (__mmask64) __U);
789}
790
791extern __inline __m512i
792__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
793_mm512_subs_epu8 (__m512i __A, __m512i __B)
794{
795 return (__m512i) __builtin_ia32_psubusb512_mask ((__v64qi) __A,
796 (__v64qi) __B,
797 (__v64qi)
798 _mm512_setzero_qi (),
799 (__mmask64) -1);
800}
801
802extern __inline __m512i
803__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
804_mm512_mask_subs_epu8 (__m512i __W, __mmask64 __U, __m512i __A,
805 __m512i __B)
806{
807 return (__m512i) __builtin_ia32_psubusb512_mask ((__v64qi) __A,
808 (__v64qi) __B,
809 (__v64qi) __W,
810 (__mmask64) __U);
811}
812
813extern __inline __m512i
814__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
815_mm512_maskz_subs_epu8 (__mmask64 __U, __m512i __A, __m512i __B)
816{
817 return (__m512i) __builtin_ia32_psubusb512_mask ((__v64qi) __A,
818 (__v64qi) __B,
819 (__v64qi)
820 _mm512_setzero_qi (),
821 (__mmask64) __U);
822}
823
824extern __inline __m512i
825__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
826_mm512_adds_epi8 (__m512i __A, __m512i __B)
827{
828 return (__m512i) __builtin_ia32_paddsb512_mask ((__v64qi) __A,
829 (__v64qi) __B,
830 (__v64qi)
831 _mm512_setzero_qi (),
832 (__mmask64) -1);
833}
834
835extern __inline __m512i
836__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
837_mm512_mask_adds_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
838 __m512i __B)
839{
840 return (__m512i) __builtin_ia32_paddsb512_mask ((__v64qi) __A,
841 (__v64qi) __B,
842 (__v64qi) __W,
843 (__mmask64) __U);
844}
845
846extern __inline __m512i
847__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
848_mm512_maskz_adds_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
849{
850 return (__m512i) __builtin_ia32_paddsb512_mask ((__v64qi) __A,
851 (__v64qi) __B,
852 (__v64qi)
853 _mm512_setzero_qi (),
854 (__mmask64) __U);
855}
856
857extern __inline __m512i
858__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
859_mm512_adds_epu8 (__m512i __A, __m512i __B)
860{
861 return (__m512i) __builtin_ia32_paddusb512_mask ((__v64qi) __A,
862 (__v64qi) __B,
863 (__v64qi)
864 _mm512_setzero_qi (),
865 (__mmask64) -1);
866}
867
868extern __inline __m512i
869__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
870_mm512_mask_adds_epu8 (__m512i __W, __mmask64 __U, __m512i __A,
871 __m512i __B)
872{
873 return (__m512i) __builtin_ia32_paddusb512_mask ((__v64qi) __A,
874 (__v64qi) __B,
875 (__v64qi) __W,
876 (__mmask64) __U);
877}
878
879extern __inline __m512i
880__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
881_mm512_maskz_adds_epu8 (__mmask64 __U, __m512i __A, __m512i __B)
882{
883 return (__m512i) __builtin_ia32_paddusb512_mask ((__v64qi) __A,
884 (__v64qi) __B,
885 (__v64qi)
886 _mm512_setzero_qi (),
887 (__mmask64) __U);
888}
889
890extern __inline __m512i
891__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
892_mm512_sub_epi16 (__m512i __A, __m512i __B)
893{
894 return (__m512i) ((__v32hu) __A - (__v32hu) __B);
895}
896
897extern __inline __m512i
898__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
899_mm512_mask_sub_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
900 __m512i __B)
901{
902 return (__m512i) __builtin_ia32_psubw512_mask ((__v32hi) __A,
903 (__v32hi) __B,
904 (__v32hi) __W,
905 (__mmask32) __U);
906}
907
908extern __inline __m512i
909__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
910_mm512_maskz_sub_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
911{
912 return (__m512i) __builtin_ia32_psubw512_mask ((__v32hi) __A,
913 (__v32hi) __B,
914 (__v32hi)
915 _mm512_setzero_hi (),
916 (__mmask32) __U);
917}
918
919extern __inline __m512i
920__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
921_mm512_subs_epi16 (__m512i __A, __m512i __B)
922{
923 return (__m512i) __builtin_ia32_psubsw512_mask ((__v32hi) __A,
924 (__v32hi) __B,
925 (__v32hi)
926 _mm512_setzero_hi (),
927 (__mmask32) -1);
928}
929
930extern __inline __m512i
931__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
932_mm512_mask_subs_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
933 __m512i __B)
934{
935 return (__m512i) __builtin_ia32_psubsw512_mask ((__v32hi) __A,
936 (__v32hi) __B,
937 (__v32hi) __W,
938 (__mmask32) __U);
939}
940
941extern __inline __m512i
942__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
943_mm512_maskz_subs_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
944{
945 return (__m512i) __builtin_ia32_psubsw512_mask ((__v32hi) __A,
946 (__v32hi) __B,
947 (__v32hi)
948 _mm512_setzero_hi (),
949 (__mmask32) __U);
950}
951
952extern __inline __m512i
953__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
954_mm512_subs_epu16 (__m512i __A, __m512i __B)
955{
956 return (__m512i) __builtin_ia32_psubusw512_mask ((__v32hi) __A,
957 (__v32hi) __B,
958 (__v32hi)
959 _mm512_setzero_hi (),
960 (__mmask32) -1);
961}
962
963extern __inline __m512i
964__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
965_mm512_mask_subs_epu16 (__m512i __W, __mmask32 __U, __m512i __A,
966 __m512i __B)
967{
968 return (__m512i) __builtin_ia32_psubusw512_mask ((__v32hi) __A,
969 (__v32hi) __B,
970 (__v32hi) __W,
971 (__mmask32) __U);
972}
973
974extern __inline __m512i
975__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
976_mm512_maskz_subs_epu16 (__mmask32 __U, __m512i __A, __m512i __B)
977{
978 return (__m512i) __builtin_ia32_psubusw512_mask ((__v32hi) __A,
979 (__v32hi) __B,
980 (__v32hi)
981 _mm512_setzero_hi (),
982 (__mmask32) __U);
983}
984
985extern __inline __m512i
986__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
987_mm512_add_epi16 (__m512i __A, __m512i __B)
988{
989 return (__m512i) ((__v32hu) __A + (__v32hu) __B);
990}
991
992extern __inline __m512i
993__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
994_mm512_mask_add_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
995 __m512i __B)
996{
997 return (__m512i) __builtin_ia32_paddw512_mask ((__v32hi) __A,
998 (__v32hi) __B,
999 (__v32hi) __W,
1000 (__mmask32) __U);
1001}
1002
1003extern __inline __m512i
1004__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1005_mm512_maskz_add_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1006{
1007 return (__m512i) __builtin_ia32_paddw512_mask ((__v32hi) __A,
1008 (__v32hi) __B,
1009 (__v32hi)
1010 _mm512_setzero_hi (),
1011 (__mmask32) __U);
1012}
1013
1014extern __inline __m512i
1015__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1016_mm512_adds_epi16 (__m512i __A, __m512i __B)
1017{
1018 return (__m512i) __builtin_ia32_paddsw512_mask ((__v32hi) __A,
1019 (__v32hi) __B,
1020 (__v32hi)
1021 _mm512_setzero_hi (),
1022 (__mmask32) -1);
1023}
1024
1025extern __inline __m512i
1026__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1027_mm512_mask_adds_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1028 __m512i __B)
1029{
1030 return (__m512i) __builtin_ia32_paddsw512_mask ((__v32hi) __A,
1031 (__v32hi) __B,
1032 (__v32hi) __W,
1033 (__mmask32) __U);
1034}
1035
1036extern __inline __m512i
1037__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1038_mm512_maskz_adds_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1039{
1040 return (__m512i) __builtin_ia32_paddsw512_mask ((__v32hi) __A,
1041 (__v32hi) __B,
1042 (__v32hi)
1043 _mm512_setzero_hi (),
1044 (__mmask32) __U);
1045}
1046
1047extern __inline __m512i
1048__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1049_mm512_adds_epu16 (__m512i __A, __m512i __B)
1050{
1051 return (__m512i) __builtin_ia32_paddusw512_mask ((__v32hi) __A,
1052 (__v32hi) __B,
1053 (__v32hi)
1054 _mm512_setzero_hi (),
1055 (__mmask32) -1);
1056}
1057
1058extern __inline __m512i
1059__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1060_mm512_mask_adds_epu16 (__m512i __W, __mmask32 __U, __m512i __A,
1061 __m512i __B)
1062{
1063 return (__m512i) __builtin_ia32_paddusw512_mask ((__v32hi) __A,
1064 (__v32hi) __B,
1065 (__v32hi) __W,
1066 (__mmask32) __U);
1067}
1068
1069extern __inline __m512i
1070__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1071_mm512_maskz_adds_epu16 (__mmask32 __U, __m512i __A, __m512i __B)
1072{
1073 return (__m512i) __builtin_ia32_paddusw512_mask ((__v32hi) __A,
1074 (__v32hi) __B,
1075 (__v32hi)
1076 _mm512_setzero_hi (),
1077 (__mmask32) __U);
1078}
1079
1080extern __inline __m512i
1081__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1082_mm512_srl_epi16 (__m512i __A, __m128i __B)
1083{
1084 return (__m512i) __builtin_ia32_psrlw512_mask ((__v32hi) __A,
1085 (__v8hi) __B,
1086 (__v32hi)
1087 _mm512_setzero_hi (),
1088 (__mmask32) -1);
1089}
1090
1091extern __inline __m512i
1092__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1093_mm512_mask_srl_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1094 __m128i __B)
1095{
1096 return (__m512i) __builtin_ia32_psrlw512_mask ((__v32hi) __A,
1097 (__v8hi) __B,
1098 (__v32hi) __W,
1099 (__mmask32) __U);
1100}
1101
1102extern __inline __m512i
1103__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1104_mm512_maskz_srl_epi16 (__mmask32 __U, __m512i __A, __m128i __B)
1105{
1106 return (__m512i) __builtin_ia32_psrlw512_mask ((__v32hi) __A,
1107 (__v8hi) __B,
1108 (__v32hi)
1109 _mm512_setzero_hi (),
1110 (__mmask32) __U);
1111}
1112
1113extern __inline __m512i
1114__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1115_mm512_packs_epi16 (__m512i __A, __m512i __B)
1116{
1117 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A,
1118 (__v32hi) __B,
1119 (__v64qi)
1120 _mm512_setzero_qi (),
1121 (__mmask64) -1);
1122}
1123
1124extern __inline __m512i
1125__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1126_mm512_sll_epi16 (__m512i __A, __m128i __B)
1127{
1128 return (__m512i) __builtin_ia32_psllw512_mask ((__v32hi) __A,
1129 (__v8hi) __B,
1130 (__v32hi)
1131 _mm512_setzero_hi (),
1132 (__mmask32) -1);
1133}
1134
1135extern __inline __m512i
1136__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1137_mm512_mask_sll_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1138 __m128i __B)
1139{
1140 return (__m512i) __builtin_ia32_psllw512_mask ((__v32hi) __A,
1141 (__v8hi) __B,
1142 (__v32hi) __W,
1143 (__mmask32) __U);
1144}
1145
1146extern __inline __m512i
1147__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1148_mm512_maskz_sll_epi16 (__mmask32 __U, __m512i __A, __m128i __B)
1149{
1150 return (__m512i) __builtin_ia32_psllw512_mask ((__v32hi) __A,
1151 (__v8hi) __B,
1152 (__v32hi)
1153 _mm512_setzero_hi (),
1154 (__mmask32) __U);
1155}
1156
1157extern __inline __m512i
1158__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1159_mm512_maddubs_epi16 (__m512i __X, __m512i __Y)
1160{
1161 return (__m512i) __builtin_ia32_pmaddubsw512_mask ((__v64qi) __X,
1162 (__v64qi) __Y,
1163 (__v32hi)
1164 _mm512_setzero_hi (),
1165 (__mmask32) -1);
1166}
1167
1168extern __inline __m512i
1169__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1170_mm512_mask_maddubs_epi16 (__m512i __W, __mmask32 __U, __m512i __X,
1171 __m512i __Y)
1172{
1173 return (__m512i) __builtin_ia32_pmaddubsw512_mask ((__v64qi) __X,
1174 (__v64qi) __Y,
1175 (__v32hi) __W,
1176 (__mmask32) __U);
1177}
1178
1179extern __inline __m512i
1180__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1181_mm512_maskz_maddubs_epi16 (__mmask32 __U, __m512i __X, __m512i __Y)
1182{
1183 return (__m512i) __builtin_ia32_pmaddubsw512_mask ((__v64qi) __X,
1184 (__v64qi) __Y,
1185 (__v32hi)
1186 _mm512_setzero_hi (),
1187 (__mmask32) __U);
1188}
1189
1190extern __inline __m512i
1191__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1192_mm512_madd_epi16 (__m512i __A, __m512i __B)
1193{
1194 return (__m512i) __builtin_ia32_pmaddwd512_mask ((__v32hi) __A,
1195 (__v32hi) __B,
1196 (__v16si)
1197 _mm512_setzero_si512 (),
1198 (__mmask16) -1);
1199}
1200
1201extern __inline __m512i
1202__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1203_mm512_mask_madd_epi16 (__m512i __W, __mmask16 __U, __m512i __A,
1204 __m512i __B)
1205{
1206 return (__m512i) __builtin_ia32_pmaddwd512_mask ((__v32hi) __A,
1207 (__v32hi) __B,
1208 (__v16si) __W,
1209 (__mmask16) __U);
1210}
1211
1212extern __inline __m512i
1213__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1214_mm512_maskz_madd_epi16 (__mmask16 __U, __m512i __A, __m512i __B)
1215{
1216 return (__m512i) __builtin_ia32_pmaddwd512_mask ((__v32hi) __A,
1217 (__v32hi) __B,
1218 (__v16si)
1219 _mm512_setzero_si512 (),
1220 (__mmask16) __U);
1221}
1222
1223extern __inline __m512i
1224__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1225_mm512_unpackhi_epi8 (__m512i __A, __m512i __B)
1226{
1227 return (__m512i) __builtin_ia32_punpckhbw512_mask ((__v64qi) __A,
1228 (__v64qi) __B,
1229 (__v64qi)
1230 _mm512_setzero_qi (),
1231 (__mmask64) -1);
1232}
1233
1234extern __inline __m512i
1235__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1236_mm512_mask_unpackhi_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
1237 __m512i __B)
1238{
1239 return (__m512i) __builtin_ia32_punpckhbw512_mask ((__v64qi) __A,
1240 (__v64qi) __B,
1241 (__v64qi) __W,
1242 (__mmask64) __U);
1243}
1244
1245extern __inline __m512i
1246__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1247_mm512_maskz_unpackhi_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
1248{
1249 return (__m512i) __builtin_ia32_punpckhbw512_mask ((__v64qi) __A,
1250 (__v64qi) __B,
1251 (__v64qi)
1252 _mm512_setzero_qi(),
1253 (__mmask64) __U);
1254}
1255
1256extern __inline __m512i
1257__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1258_mm512_unpackhi_epi16 (__m512i __A, __m512i __B)
1259{
1260 return (__m512i) __builtin_ia32_punpckhwd512_mask ((__v32hi) __A,
1261 (__v32hi) __B,
1262 (__v32hi)
1263 _mm512_setzero_hi (),
1264 (__mmask32) -1);
1265}
1266
1267extern __inline __m512i
1268__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1269_mm512_mask_unpackhi_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1270 __m512i __B)
1271{
1272 return (__m512i) __builtin_ia32_punpckhwd512_mask ((__v32hi) __A,
1273 (__v32hi) __B,
1274 (__v32hi) __W,
1275 (__mmask32) __U);
1276}
1277
1278extern __inline __m512i
1279__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1280_mm512_maskz_unpackhi_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1281{
1282 return (__m512i) __builtin_ia32_punpckhwd512_mask ((__v32hi) __A,
1283 (__v32hi) __B,
1284 (__v32hi)
1285 _mm512_setzero_hi(),
1286 (__mmask32) __U);
1287}
1288
1289extern __inline __m512i
1290__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1291_mm512_unpacklo_epi8 (__m512i __A, __m512i __B)
1292{
1293 return (__m512i) __builtin_ia32_punpcklbw512_mask ((__v64qi) __A,
1294 (__v64qi) __B,
1295 (__v64qi)
1296 _mm512_setzero_qi (),
1297 (__mmask64) -1);
1298}
1299
1300extern __inline __m512i
1301__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1302_mm512_mask_unpacklo_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
1303 __m512i __B)
1304{
1305 return (__m512i) __builtin_ia32_punpcklbw512_mask ((__v64qi) __A,
1306 (__v64qi) __B,
1307 (__v64qi) __W,
1308 (__mmask64) __U);
1309}
1310
1311extern __inline __m512i
1312__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1313_mm512_maskz_unpacklo_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
1314{
1315 return (__m512i) __builtin_ia32_punpcklbw512_mask ((__v64qi) __A,
1316 (__v64qi) __B,
1317 (__v64qi)
1318 _mm512_setzero_qi(),
1319 (__mmask64) __U);
1320}
1321
1322extern __inline __m512i
1323__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1324_mm512_unpacklo_epi16 (__m512i __A, __m512i __B)
1325{
1326 return (__m512i) __builtin_ia32_punpcklwd512_mask ((__v32hi) __A,
1327 (__v32hi) __B,
1328 (__v32hi)
1329 _mm512_setzero_hi (),
1330 (__mmask32) -1);
1331}
1332
1333extern __inline __m512i
1334__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1335_mm512_mask_unpacklo_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1336 __m512i __B)
1337{
1338 return (__m512i) __builtin_ia32_punpcklwd512_mask ((__v32hi) __A,
1339 (__v32hi) __B,
1340 (__v32hi) __W,
1341 (__mmask32) __U);
1342}
1343
1344extern __inline __m512i
1345__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1346_mm512_maskz_unpacklo_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1347{
1348 return (__m512i) __builtin_ia32_punpcklwd512_mask ((__v32hi) __A,
1349 (__v32hi) __B,
1350 (__v32hi)
1351 _mm512_setzero_hi(),
1352 (__mmask32) __U);
1353}
1354
1355extern __inline __mmask64
1356__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1357_mm512_cmpeq_epu8_mask (__m512i __A, __m512i __B)
1358{
1359 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A,
1360 (__v64qi) __B, 0,
1361 (__mmask64) -1);
1362}
1363
1364extern __inline __mmask64
1365__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1366_mm512_cmpeq_epi8_mask (__m512i __A, __m512i __B)
1367{
1368 return (__mmask64) __builtin_ia32_pcmpeqb512_mask ((__v64qi) __A,
1369 (__v64qi) __B,
1370 (__mmask64) -1);
1371}
1372
1373extern __inline __mmask64
1374__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1375_mm512_mask_cmpeq_epu8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1376{
1377 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A,
1378 (__v64qi) __B, 0,
1379 __U);
1380}
1381
1382extern __inline __mmask64
1383__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1384_mm512_mask_cmpeq_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1385{
1386 return (__mmask64) __builtin_ia32_pcmpeqb512_mask ((__v64qi) __A,
1387 (__v64qi) __B,
1388 __U);
1389}
1390
1391extern __inline __mmask32
1392__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1393_mm512_cmpeq_epu16_mask (__m512i __A, __m512i __B)
1394{
1395 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A,
1396 (__v32hi) __B, 0,
1397 (__mmask32) -1);
1398}
1399
1400extern __inline __mmask32
1401__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1402_mm512_cmpeq_epi16_mask (__m512i __A, __m512i __B)
1403{
1404 return (__mmask32) __builtin_ia32_pcmpeqw512_mask ((__v32hi) __A,
1405 (__v32hi) __B,
1406 (__mmask32) -1);
1407}
1408
1409extern __inline __mmask32
1410__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1411_mm512_mask_cmpeq_epu16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1412{
1413 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A,
1414 (__v32hi) __B, 0,
1415 __U);
1416}
1417
1418extern __inline __mmask32
1419__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1420_mm512_mask_cmpeq_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1421{
1422 return (__mmask32) __builtin_ia32_pcmpeqw512_mask ((__v32hi) __A,
1423 (__v32hi) __B,
1424 __U);
1425}
1426
1427extern __inline __mmask64
1428__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1429_mm512_cmpgt_epu8_mask (__m512i __A, __m512i __B)
1430{
1431 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A,
1432 (__v64qi) __B, 6,
1433 (__mmask64) -1);
1434}
1435
1436extern __inline __mmask64
1437__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1438_mm512_cmpgt_epi8_mask (__m512i __A, __m512i __B)
1439{
1440 return (__mmask64) __builtin_ia32_pcmpgtb512_mask ((__v64qi) __A,
1441 (__v64qi) __B,
1442 (__mmask64) -1);
1443}
1444
1445extern __inline __mmask64
1446__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1447_mm512_mask_cmpgt_epu8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1448{
1449 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A,
1450 (__v64qi) __B, 6,
1451 __U);
1452}
1453
1454extern __inline __mmask64
1455__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1456_mm512_mask_cmpgt_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1457{
1458 return (__mmask64) __builtin_ia32_pcmpgtb512_mask ((__v64qi) __A,
1459 (__v64qi) __B,
1460 __U);
1461}
1462
1463extern __inline __mmask32
1464__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1465_mm512_cmpgt_epu16_mask (__m512i __A, __m512i __B)
1466{
1467 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A,
1468 (__v32hi) __B, 6,
1469 (__mmask32) -1);
1470}
1471
1472extern __inline __mmask32
1473__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1474_mm512_cmpgt_epi16_mask (__m512i __A, __m512i __B)
1475{
1476 return (__mmask32) __builtin_ia32_pcmpgtw512_mask ((__v32hi) __A,
1477 (__v32hi) __B,
1478 (__mmask32) -1);
1479}
1480
1481extern __inline __mmask32
1482__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1483_mm512_mask_cmpgt_epu16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1484{
1485 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A,
1486 (__v32hi) __B, 6,
1487 __U);
1488}
1489
1490extern __inline __mmask32
1491__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1492_mm512_mask_cmpgt_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1493{
1494 return (__mmask32) __builtin_ia32_pcmpgtw512_mask ((__v32hi) __A,
1495 (__v32hi) __B,
1496 __U);
1497}
1498
1499extern __inline __mmask64
1500__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1501_mm512_movepi8_mask (__m512i __A)
1502{
1503 return (__mmask64) __builtin_ia32_cvtb2mask512 ((__v64qi) __A);
1504}
1505
1506extern __inline __mmask32
1507__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1508_mm512_movepi16_mask (__m512i __A)
1509{
1510 return (__mmask32) __builtin_ia32_cvtw2mask512 ((__v32hi) __A);
1511}
1512
1513extern __inline __m512i
1514__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1515_mm512_movm_epi8 (__mmask64 __A)
1516{
1517 return (__m512i) __builtin_ia32_cvtmask2b512 (__A);
1518}
1519
1520extern __inline __m512i
1521__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1522_mm512_movm_epi16 (__mmask32 __A)
1523{
1524 return (__m512i) __builtin_ia32_cvtmask2w512 (__A);
1525}
1526
1527extern __inline __mmask64
1528__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1529_mm512_test_epi8_mask (__m512i __A, __m512i __B)
1530{
1531 return (__mmask64) __builtin_ia32_ptestmb512 ((__v64qi) __A,
1532 (__v64qi) __B,
1533 (__mmask64) -1);
1534}
1535
1536extern __inline __mmask64
1537__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1538_mm512_mask_test_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1539{
1540 return (__mmask64) __builtin_ia32_ptestmb512 ((__v64qi) __A,
1541 (__v64qi) __B, __U);
1542}
1543
1544extern __inline __mmask32
1545__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1546_mm512_test_epi16_mask (__m512i __A, __m512i __B)
1547{
1548 return (__mmask32) __builtin_ia32_ptestmw512 ((__v32hi) __A,
1549 (__v32hi) __B,
1550 (__mmask32) -1);
1551}
1552
1553extern __inline __mmask32
1554__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1555_mm512_mask_test_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1556{
1557 return (__mmask32) __builtin_ia32_ptestmw512 ((__v32hi) __A,
1558 (__v32hi) __B, __U);
1559}
1560
1561extern __inline __mmask64
1562__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1563_mm512_testn_epi8_mask (__m512i __A, __m512i __B)
1564{
1565 return (__mmask64) __builtin_ia32_ptestnmb512 ((__v64qi) __A,
1566 (__v64qi) __B,
1567 (__mmask64) -1);
1568}
1569
1570extern __inline __mmask64
1571__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1572_mm512_mask_testn_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1573{
1574 return (__mmask64) __builtin_ia32_ptestnmb512 ((__v64qi) __A,
1575 (__v64qi) __B, __U);
1576}
1577
1578extern __inline __mmask32
1579__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1580_mm512_testn_epi16_mask (__m512i __A, __m512i __B)
1581{
1582 return (__mmask32) __builtin_ia32_ptestnmw512 ((__v32hi) __A,
1583 (__v32hi) __B,
1584 (__mmask32) -1);
1585}
1586
1587extern __inline __mmask32
1588__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1589_mm512_mask_testn_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1590{
1591 return (__mmask32) __builtin_ia32_ptestnmw512 ((__v32hi) __A,
1592 (__v32hi) __B, __U);
1593}
1594
1595extern __inline __m512i
1596__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1597_mm512_shuffle_epi8 (__m512i __A, __m512i __B)
1598{
1599 return (__m512i) __builtin_ia32_pshufb512_mask ((__v64qi) __A,
1600 (__v64qi) __B,
1601 (__v64qi)
1602 _mm512_setzero_qi (),
1603 (__mmask64) -1);
1604}
1605
1606extern __inline __m512i
1607__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1608_mm512_mask_shuffle_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
1609 __m512i __B)
1610{
1611 return (__m512i) __builtin_ia32_pshufb512_mask ((__v64qi) __A,
1612 (__v64qi) __B,
1613 (__v64qi) __W,
1614 (__mmask64) __U);
1615}
1616
1617extern __inline __m512i
1618__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1619_mm512_maskz_shuffle_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
1620{
1621 return (__m512i) __builtin_ia32_pshufb512_mask ((__v64qi) __A,
1622 (__v64qi) __B,
1623 (__v64qi)
1624 _mm512_setzero_qi (),
1625 (__mmask64) __U);
1626}
1627
1628extern __inline __m512i
1629__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1630_mm512_min_epu16 (__m512i __A, __m512i __B)
1631{
1632 return (__m512i) __builtin_ia32_pminuw512_mask ((__v32hi) __A,
1633 (__v32hi) __B,
1634 (__v32hi)
1635 _mm512_setzero_hi (),
1636 (__mmask32) -1);
1637}
1638
1639extern __inline __m512i
1640__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1641_mm512_maskz_min_epu16 (__mmask32 __M, __m512i __A, __m512i __B)
1642{
1643 return (__m512i) __builtin_ia32_pminuw512_mask ((__v32hi) __A,
1644 (__v32hi) __B,
1645 (__v32hi)
1646 _mm512_setzero_hi(),
1647 (__mmask32) __M);
1648}
1649
1650extern __inline __m512i
1651__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1652_mm512_mask_min_epu16 (__m512i __W, __mmask32 __M, __m512i __A,
1653 __m512i __B)
1654{
1655 return (__m512i) __builtin_ia32_pminuw512_mask ((__v32hi) __A,
1656 (__v32hi) __B,
1657 (__v32hi) __W,
1658 (__mmask32) __M);
1659}
1660
1661extern __inline __m512i
1662__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1663_mm512_min_epi16 (__m512i __A, __m512i __B)
1664{
1665 return (__m512i) __builtin_ia32_pminsw512_mask ((__v32hi) __A,
1666 (__v32hi) __B,
1667 (__v32hi)
1668 _mm512_setzero_hi (),
1669 (__mmask32) -1);
1670}
1671
1672extern __inline __m512i
1673__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1674_mm512_maskz_min_epi16 (__mmask32 __M, __m512i __A, __m512i __B)
1675{
1676 return (__m512i) __builtin_ia32_pminsw512_mask ((__v32hi) __A,
1677 (__v32hi) __B,
1678 (__v32hi)
1679 _mm512_setzero_hi(),
1680 (__mmask32) __M);
1681}
1682
1683extern __inline __m512i
1684__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1685_mm512_mask_min_epi16 (__m512i __W, __mmask32 __M, __m512i __A,
1686 __m512i __B)
1687{
1688 return (__m512i) __builtin_ia32_pminsw512_mask ((__v32hi) __A,
1689 (__v32hi) __B,
1690 (__v32hi) __W,
1691 (__mmask32) __M);
1692}
1693
1694extern __inline __m512i
1695__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1696_mm512_max_epu8 (__m512i __A, __m512i __B)
1697{
1698 return (__m512i) __builtin_ia32_pmaxub512_mask ((__v64qi) __A,
1699 (__v64qi) __B,
1700 (__v64qi)
1701 _mm512_setzero_qi (),
1702 (__mmask64) -1);
1703}
1704
1705extern __inline __m512i
1706__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1707_mm512_maskz_max_epu8 (__mmask64 __M, __m512i __A, __m512i __B)
1708{
1709 return (__m512i) __builtin_ia32_pmaxub512_mask ((__v64qi) __A,
1710 (__v64qi) __B,
1711 (__v64qi)
1712 _mm512_setzero_qi(),
1713 (__mmask64) __M);
1714}
1715
1716extern __inline __m512i
1717__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1718_mm512_mask_max_epu8 (__m512i __W, __mmask64 __M, __m512i __A,
1719 __m512i __B)
1720{
1721 return (__m512i) __builtin_ia32_pmaxub512_mask ((__v64qi) __A,
1722 (__v64qi) __B,
1723 (__v64qi) __W,
1724 (__mmask64) __M);
1725}
1726
1727extern __inline __m512i
1728__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1729_mm512_max_epi8 (__m512i __A, __m512i __B)
1730{
1731 return (__m512i) __builtin_ia32_pmaxsb512_mask ((__v64qi) __A,
1732 (__v64qi) __B,
1733 (__v64qi)
1734 _mm512_setzero_qi (),
1735 (__mmask64) -1);
1736}
1737
1738extern __inline __m512i
1739__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1740_mm512_maskz_max_epi8 (__mmask64 __M, __m512i __A, __m512i __B)
1741{
1742 return (__m512i) __builtin_ia32_pmaxsb512_mask ((__v64qi) __A,
1743 (__v64qi) __B,
1744 (__v64qi)
1745 _mm512_setzero_qi(),
1746 (__mmask64) __M);
1747}
1748
1749extern __inline __m512i
1750__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1751_mm512_mask_max_epi8 (__m512i __W, __mmask64 __M, __m512i __A,
1752 __m512i __B)
1753{
1754 return (__m512i) __builtin_ia32_pmaxsb512_mask ((__v64qi) __A,
1755 (__v64qi) __B,
1756 (__v64qi) __W,
1757 (__mmask64) __M);
1758}
1759
1760extern __inline __m512i
1761__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1762_mm512_min_epu8 (__m512i __A, __m512i __B)
1763{
1764 return (__m512i) __builtin_ia32_pminub512_mask ((__v64qi) __A,
1765 (__v64qi) __B,
1766 (__v64qi)
1767 _mm512_setzero_qi (),
1768 (__mmask64) -1);
1769}
1770
1771extern __inline __m512i
1772__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1773_mm512_maskz_min_epu8 (__mmask64 __M, __m512i __A, __m512i __B)
1774{
1775 return (__m512i) __builtin_ia32_pminub512_mask ((__v64qi) __A,
1776 (__v64qi) __B,
1777 (__v64qi)
1778 _mm512_setzero_qi(),
1779 (__mmask64) __M);
1780}
1781
1782extern __inline __m512i
1783__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1784_mm512_mask_min_epu8 (__m512i __W, __mmask64 __M, __m512i __A,
1785 __m512i __B)
1786{
1787 return (__m512i) __builtin_ia32_pminub512_mask ((__v64qi) __A,
1788 (__v64qi) __B,
1789 (__v64qi) __W,
1790 (__mmask64) __M);
1791}
1792
1793extern __inline __m512i
1794__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1795_mm512_min_epi8 (__m512i __A, __m512i __B)
1796{
1797 return (__m512i) __builtin_ia32_pminsb512_mask ((__v64qi) __A,
1798 (__v64qi) __B,
1799 (__v64qi)
1800 _mm512_setzero_qi (),
1801 (__mmask64) -1);
1802}
1803
1804extern __inline __m512i
1805__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1806_mm512_maskz_min_epi8 (__mmask64 __M, __m512i __A, __m512i __B)
1807{
1808 return (__m512i) __builtin_ia32_pminsb512_mask ((__v64qi) __A,
1809 (__v64qi) __B,
1810 (__v64qi)
1811 _mm512_setzero_qi(),
1812 (__mmask64) __M);
1813}
1814
1815extern __inline __m512i
1816__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1817_mm512_mask_min_epi8 (__m512i __W, __mmask64 __M, __m512i __A,
1818 __m512i __B)
1819{
1820 return (__m512i) __builtin_ia32_pminsb512_mask ((__v64qi) __A,
1821 (__v64qi) __B,
1822 (__v64qi) __W,
1823 (__mmask64) __M);
1824}
1825
1826extern __inline __m512i
1827__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1828_mm512_max_epi16 (__m512i __A, __m512i __B)
1829{
1830 return (__m512i) __builtin_ia32_pmaxsw512_mask ((__v32hi) __A,
1831 (__v32hi) __B,
1832 (__v32hi)
1833 _mm512_setzero_hi (),
1834 (__mmask32) -1);
1835}
1836
1837extern __inline __m512i
1838__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1839_mm512_maskz_max_epi16 (__mmask32 __M, __m512i __A, __m512i __B)
1840{
1841 return (__m512i) __builtin_ia32_pmaxsw512_mask ((__v32hi) __A,
1842 (__v32hi) __B,
1843 (__v32hi)
1844 _mm512_setzero_hi(),
1845 (__mmask32) __M);
1846}
1847
1848extern __inline __m512i
1849__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1850_mm512_mask_max_epi16 (__m512i __W, __mmask32 __M, __m512i __A,
1851 __m512i __B)
1852{
1853 return (__m512i) __builtin_ia32_pmaxsw512_mask ((__v32hi) __A,
1854 (__v32hi) __B,
1855 (__v32hi) __W,
1856 (__mmask32) __M);
1857}
1858
1859extern __inline __m512i
1860__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1861_mm512_max_epu16 (__m512i __A, __m512i __B)
1862{
1863 return (__m512i) __builtin_ia32_pmaxuw512_mask ((__v32hi) __A,
1864 (__v32hi) __B,
1865 (__v32hi)
1866 _mm512_setzero_hi (),
1867 (__mmask32) -1);
1868}
1869
1870extern __inline __m512i
1871__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1872_mm512_maskz_max_epu16 (__mmask32 __M, __m512i __A, __m512i __B)
1873{
1874 return (__m512i) __builtin_ia32_pmaxuw512_mask ((__v32hi) __A,
1875 (__v32hi) __B,
1876 (__v32hi)
1877 _mm512_setzero_hi(),
1878 (__mmask32) __M);
1879}
1880
1881extern __inline __m512i
1882__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1883_mm512_mask_max_epu16 (__m512i __W, __mmask32 __M, __m512i __A,
1884 __m512i __B)
1885{
1886 return (__m512i) __builtin_ia32_pmaxuw512_mask ((__v32hi) __A,
1887 (__v32hi) __B,
1888 (__v32hi) __W,
1889 (__mmask32) __M);
1890}
1891
1892extern __inline __m512i
1893__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1894_mm512_sra_epi16 (__m512i __A, __m128i __B)
1895{
1896 return (__m512i) __builtin_ia32_psraw512_mask ((__v32hi) __A,
1897 (__v8hi) __B,
1898 (__v32hi)
1899 _mm512_setzero_hi (),
1900 (__mmask32) -1);
1901}
1902
1903extern __inline __m512i
1904__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1905_mm512_mask_sra_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1906 __m128i __B)
1907{
1908 return (__m512i) __builtin_ia32_psraw512_mask ((__v32hi) __A,
1909 (__v8hi) __B,
1910 (__v32hi) __W,
1911 (__mmask32) __U);
1912}
1913
1914extern __inline __m512i
1915__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1916_mm512_maskz_sra_epi16 (__mmask32 __U, __m512i __A, __m128i __B)
1917{
1918 return (__m512i) __builtin_ia32_psraw512_mask ((__v32hi) __A,
1919 (__v8hi) __B,
1920 (__v32hi)
1921 _mm512_setzero_hi (),
1922 (__mmask32) __U);
1923}
1924
1925extern __inline __m512i
1926__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1927_mm512_srav_epi16 (__m512i __A, __m512i __B)
1928{
1929 return (__m512i) __builtin_ia32_psrav32hi_mask ((__v32hi) __A,
1930 (__v32hi) __B,
1931 (__v32hi)
1932 _mm512_setzero_hi (),
1933 (__mmask32) -1);
1934}
1935
1936extern __inline __m512i
1937__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1938_mm512_mask_srav_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1939 __m512i __B)
1940{
1941 return (__m512i) __builtin_ia32_psrav32hi_mask ((__v32hi) __A,
1942 (__v32hi) __B,
1943 (__v32hi) __W,
1944 (__mmask32) __U);
1945}
1946
1947extern __inline __m512i
1948__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1949_mm512_maskz_srav_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1950{
1951 return (__m512i) __builtin_ia32_psrav32hi_mask ((__v32hi) __A,
1952 (__v32hi) __B,
1953 (__v32hi)
1954 _mm512_setzero_hi (),
1955 (__mmask32) __U);
1956}
1957
1958extern __inline __m512i
1959__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1960_mm512_srlv_epi16 (__m512i __A, __m512i __B)
1961{
1962 return (__m512i) __builtin_ia32_psrlv32hi_mask ((__v32hi) __A,
1963 (__v32hi) __B,
1964 (__v32hi)
1965 _mm512_setzero_hi (),
1966 (__mmask32) -1);
1967}
1968
1969extern __inline __m512i
1970__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1971_mm512_mask_srlv_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1972 __m512i __B)
1973{
1974 return (__m512i) __builtin_ia32_psrlv32hi_mask ((__v32hi) __A,
1975 (__v32hi) __B,
1976 (__v32hi) __W,
1977 (__mmask32) __U);
1978}
1979
1980extern __inline __m512i
1981__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1982_mm512_maskz_srlv_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1983{
1984 return (__m512i) __builtin_ia32_psrlv32hi_mask ((__v32hi) __A,
1985 (__v32hi) __B,
1986 (__v32hi)
1987 _mm512_setzero_hi (),
1988 (__mmask32) __U);
1989}
1990
1991extern __inline __m512i
1992__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1993_mm512_sllv_epi16 (__m512i __A, __m512i __B)
1994{
1995 return (__m512i) __builtin_ia32_psllv32hi_mask ((__v32hi) __A,
1996 (__v32hi) __B,
1997 (__v32hi)
1998 _mm512_setzero_hi (),
1999 (__mmask32) -1);
2000}
2001
2002extern __inline __m512i
2003__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2004_mm512_mask_sllv_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2005 __m512i __B)
2006{
2007 return (__m512i) __builtin_ia32_psllv32hi_mask ((__v32hi) __A,
2008 (__v32hi) __B,
2009 (__v32hi) __W,
2010 (__mmask32) __U);
2011}
2012
2013extern __inline __m512i
2014__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2015_mm512_maskz_sllv_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
2016{
2017 return (__m512i) __builtin_ia32_psllv32hi_mask ((__v32hi) __A,
2018 (__v32hi) __B,
2019 (__v32hi)
2020 _mm512_setzero_hi (),
2021 (__mmask32) __U);
2022}
2023
2024extern __inline __m512i
2025__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2026_mm512_mask_packs_epi16 (__m512i __W, __mmask64 __M, __m512i __A,
2027 __m512i __B)
2028{
2029 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A,
2030 (__v32hi) __B,
2031 (__v64qi) __W,
2032 (__mmask64) __M);
2033}
2034
2035extern __inline __m512i
2036__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2037_mm512_maskz_packs_epi16 (__mmask64 __M, __m512i __A, __m512i __B)
2038{
2039 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A,
2040 (__v32hi) __B,
2041 (__v64qi)
2042 _mm512_setzero_qi(),
2043 __M);
2044}
2045
2046extern __inline __m512i
2047__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2048_mm512_packus_epi16 (__m512i __A, __m512i __B)
2049{
2050 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A,
2051 (__v32hi) __B,
2052 (__v64qi)
2053 _mm512_setzero_qi (),
2054 (__mmask64) -1);
2055}
2056
2057extern __inline __m512i
2058__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2059_mm512_mask_packus_epi16 (__m512i __W, __mmask64 __M, __m512i __A,
2060 __m512i __B)
2061{
2062 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A,
2063 (__v32hi) __B,
2064 (__v64qi) __W,
2065 (__mmask64) __M);
2066}
2067
2068extern __inline __m512i
2069__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2070_mm512_maskz_packus_epi16 (__mmask64 __M, __m512i __A, __m512i __B)
2071{
2072 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A,
2073 (__v32hi) __B,
2074 (__v64qi)
2075 _mm512_setzero_qi(),
2076 (__mmask64) __M);
2077}
2078
2079extern __inline __m512i
2080__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2081_mm512_abs_epi8 (__m512i __A)
2082{
2083 return (__m512i) __builtin_ia32_pabsb512_mask ((__v64qi) __A,
2084 (__v64qi)
2085 _mm512_setzero_qi (),
2086 (__mmask64) -1);
2087}
2088
2089extern __inline __m512i
2090__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2091_mm512_mask_abs_epi8 (__m512i __W, __mmask64 __U, __m512i __A)
2092{
2093 return (__m512i) __builtin_ia32_pabsb512_mask ((__v64qi) __A,
2094 (__v64qi) __W,
2095 (__mmask64) __U);
2096}
2097
2098extern __inline __m512i
2099__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2100_mm512_maskz_abs_epi8 (__mmask64 __U, __m512i __A)
2101{
2102 return (__m512i) __builtin_ia32_pabsb512_mask ((__v64qi) __A,
2103 (__v64qi)
2104 _mm512_setzero_qi (),
2105 (__mmask64) __U);
2106}
2107
2108extern __inline __m512i
2109__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2110_mm512_abs_epi16 (__m512i __A)
2111{
2112 return (__m512i) __builtin_ia32_pabsw512_mask ((__v32hi) __A,
2113 (__v32hi)
2114 _mm512_setzero_hi (),
2115 (__mmask32) -1);
2116}
2117
2118extern __inline __m512i
2119__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2120_mm512_mask_abs_epi16 (__m512i __W, __mmask32 __U, __m512i __A)
2121{
2122 return (__m512i) __builtin_ia32_pabsw512_mask ((__v32hi) __A,
2123 (__v32hi) __W,
2124 (__mmask32) __U);
2125}
2126
2127extern __inline __m512i
2128__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2129_mm512_maskz_abs_epi16 (__mmask32 __U, __m512i __A)
2130{
2131 return (__m512i) __builtin_ia32_pabsw512_mask ((__v32hi) __A,
2132 (__v32hi)
2133 _mm512_setzero_hi (),
2134 (__mmask32) __U);
2135}
2136
2137extern __inline __mmask64
2138__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2139_mm512_mask_cmpneq_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2140{
2141 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2142 (__v64qi) __Y, 4,
2143 (__mmask64) __M);
2144}
2145
2146extern __inline __mmask64
2147__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2148_mm512_mask_cmplt_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2149{
2150 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2151 (__v64qi) __Y, 1,
2152 (__mmask64) __M);
2153}
2154
2155extern __inline __mmask64
2156__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2157_mm512_mask_cmpge_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2158{
2159 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2160 (__v64qi) __Y, 5,
2161 (__mmask64) __M);
2162}
2163
2164extern __inline __mmask64
2165__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2166_mm512_mask_cmple_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2167{
2168 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2169 (__v64qi) __Y, 2,
2170 (__mmask64) __M);
2171}
2172
2173extern __inline __mmask32
2174__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2175_mm512_mask_cmpneq_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2176{
2177 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2178 (__v32hi) __Y, 4,
2179 (__mmask32) __M);
2180}
2181
2182extern __inline __mmask32
2183__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2184_mm512_mask_cmplt_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2185{
2186 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2187 (__v32hi) __Y, 1,
2188 (__mmask32) __M);
2189}
2190
2191extern __inline __mmask32
2192__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2193_mm512_mask_cmpge_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2194{
2195 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2196 (__v32hi) __Y, 5,
2197 (__mmask32) __M);
2198}
2199
2200extern __inline __mmask32
2201__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2202_mm512_mask_cmple_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2203{
2204 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2205 (__v32hi) __Y, 2,
2206 (__mmask32) __M);
2207}
2208
2209extern __inline __mmask64
2210__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2211_mm512_mask_cmpneq_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2212{
2213 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2214 (__v64qi) __Y, 4,
2215 (__mmask64) __M);
2216}
2217
2218extern __inline __mmask64
2219__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2220_mm512_mask_cmplt_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2221{
2222 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2223 (__v64qi) __Y, 1,
2224 (__mmask64) __M);
2225}
2226
2227extern __inline __mmask64
2228__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2229_mm512_mask_cmpge_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2230{
2231 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2232 (__v64qi) __Y, 5,
2233 (__mmask64) __M);
2234}
2235
2236extern __inline __mmask64
2237__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2238_mm512_mask_cmple_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2239{
2240 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2241 (__v64qi) __Y, 2,
2242 (__mmask64) __M);
2243}
2244
2245extern __inline __mmask32
2246__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2247_mm512_mask_cmpneq_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2248{
2249 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2250 (__v32hi) __Y, 4,
2251 (__mmask32) __M);
2252}
2253
2254extern __inline __mmask32
2255__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2256_mm512_mask_cmplt_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2257{
2258 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2259 (__v32hi) __Y, 1,
2260 (__mmask32) __M);
2261}
2262
2263extern __inline __mmask32
2264__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2265_mm512_mask_cmpge_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2266{
2267 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2268 (__v32hi) __Y, 5,
2269 (__mmask32) __M);
2270}
2271
2272extern __inline __mmask32
2273__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2274_mm512_mask_cmple_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2275{
2276 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2277 (__v32hi) __Y, 2,
2278 (__mmask32) __M);
2279}
2280
2281extern __inline __mmask64
2282__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2283_mm512_cmpneq_epu8_mask (__m512i __X, __m512i __Y)
2284{
2285 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2286 (__v64qi) __Y, 4,
2287 (__mmask64) - 1);
2288}
2289
2290extern __inline __mmask64
2291__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2292_mm512_cmplt_epu8_mask (__m512i __X, __m512i __Y)
2293{
2294 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2295 (__v64qi) __Y, 1,
2296 (__mmask64) - 1);
2297}
2298
2299extern __inline __mmask64
2300__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2301_mm512_cmpge_epu8_mask (__m512i __X, __m512i __Y)
2302{
2303 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2304 (__v64qi) __Y, 5,
2305 (__mmask64) - 1);
2306}
2307
2308extern __inline __mmask64
2309__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2310_mm512_cmple_epu8_mask (__m512i __X, __m512i __Y)
2311{
2312 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2313 (__v64qi) __Y, 2,
2314 (__mmask64) - 1);
2315}
2316
2317extern __inline __mmask32
2318__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2319_mm512_cmpneq_epu16_mask (__m512i __X, __m512i __Y)
2320{
2321 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2322 (__v32hi) __Y, 4,
2323 (__mmask32) - 1);
2324}
2325
2326extern __inline __mmask32
2327__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2328_mm512_cmplt_epu16_mask (__m512i __X, __m512i __Y)
2329{
2330 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2331 (__v32hi) __Y, 1,
2332 (__mmask32) - 1);
2333}
2334
2335extern __inline __mmask32
2336__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2337_mm512_cmpge_epu16_mask (__m512i __X, __m512i __Y)
2338{
2339 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2340 (__v32hi) __Y, 5,
2341 (__mmask32) - 1);
2342}
2343
2344extern __inline __mmask32
2345__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2346_mm512_cmple_epu16_mask (__m512i __X, __m512i __Y)
2347{
2348 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2349 (__v32hi) __Y, 2,
2350 (__mmask32) - 1);
2351}
2352
2353extern __inline __mmask64
2354__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2355_mm512_cmpneq_epi8_mask (__m512i __X, __m512i __Y)
2356{
2357 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2358 (__v64qi) __Y, 4,
2359 (__mmask64) - 1);
2360}
2361
2362extern __inline __mmask64
2363__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2364_mm512_cmplt_epi8_mask (__m512i __X, __m512i __Y)
2365{
2366 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2367 (__v64qi) __Y, 1,
2368 (__mmask64) - 1);
2369}
2370
2371extern __inline __mmask64
2372__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2373_mm512_cmpge_epi8_mask (__m512i __X, __m512i __Y)
2374{
2375 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2376 (__v64qi) __Y, 5,
2377 (__mmask64) - 1);
2378}
2379
2380extern __inline __mmask64
2381__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2382_mm512_cmple_epi8_mask (__m512i __X, __m512i __Y)
2383{
2384 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2385 (__v64qi) __Y, 2,
2386 (__mmask64) - 1);
2387}
2388
2389extern __inline __mmask32
2390__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2391_mm512_cmpneq_epi16_mask (__m512i __X, __m512i __Y)
2392{
2393 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2394 (__v32hi) __Y, 4,
2395 (__mmask32) - 1);
2396}
2397
2398extern __inline __mmask32
2399__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2400_mm512_cmplt_epi16_mask (__m512i __X, __m512i __Y)
2401{
2402 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2403 (__v32hi) __Y, 1,
2404 (__mmask32) - 1);
2405}
2406
2407extern __inline __mmask32
2408__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2409_mm512_cmpge_epi16_mask (__m512i __X, __m512i __Y)
2410{
2411 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2412 (__v32hi) __Y, 5,
2413 (__mmask32) - 1);
2414}
2415
2416extern __inline __mmask32
2417__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2418_mm512_cmple_epi16_mask (__m512i __X, __m512i __Y)
2419{
2420 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2421 (__v32hi) __Y, 2,
2422 (__mmask32) - 1);
2423}
2424
2425#ifdef __OPTIMIZE__
2426extern __inline __m512i
2427__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2428_mm512_alignr_epi8 (__m512i __A, __m512i __B, const int __N)
2429{
2430 return (__m512i) __builtin_ia32_palignr512 ((__v8di) __A,
2431 (__v8di) __B, __N * 8);
2432}
2433
2434extern __inline __m512i
2435__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2436_mm512_mask_alignr_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
2437 __m512i __B, const int __N)
2438{
2439 return (__m512i) __builtin_ia32_palignr512_mask ((__v8di) __A,
2440 (__v8di) __B,
2441 __N * 8,
2442 (__v8di) __W,
2443 (__mmask64) __U);
2444}
2445
2446extern __inline __m512i
2447__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2448_mm512_maskz_alignr_epi8 (__mmask64 __U, __m512i __A, __m512i __B,
2449 const int __N)
2450{
2451 return (__m512i) __builtin_ia32_palignr512_mask ((__v8di) __A,
2452 (__v8di) __B,
2453 __N * 8,
2454 (__v8di)
2455 _mm512_setzero_si512 (),
2456 (__mmask64) __U);
2457}
2458
2459extern __inline __m512i
2460__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2461_mm512_dbsad_epu8 (__m512i __A, __m512i __B, const int __imm)
2462{
2463 return (__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi) __A,
2464 (__v64qi) __B,
2465 __imm,
2466 (__v32hi)
2467 _mm512_setzero_hi (),
2468 (__mmask32) -1);
2469}
2470
2471extern __inline __m512i
2472__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2473_mm512_mask_dbsad_epu8 (__m512i __W, __mmask32 __U, __m512i __A,
2474 __m512i __B, const int __imm)
2475{
2476 return (__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi) __A,
2477 (__v64qi) __B,
2478 __imm,
2479 (__v32hi) __W,
2480 (__mmask32) __U);
2481}
2482
2483extern __inline __m512i
2484__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2485_mm512_maskz_dbsad_epu8 (__mmask32 __U, __m512i __A, __m512i __B,
2486 const int __imm)
2487{
2488 return (__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi) __A,
2489 (__v64qi) __B,
2490 __imm,
2491 (__v32hi)
2492 _mm512_setzero_hi(),
2493 (__mmask32) __U);
2494}
2495
2496extern __inline __m512i
2497__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2498_mm512_srli_epi16 (__m512i __A, const int __imm)
2499{
2500 return (__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi) __A, __imm,
2501 (__v32hi)
2502 _mm512_setzero_hi (),
2503 (__mmask32) -1);
2504}
2505
2506extern __inline __m512i
2507__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2508_mm512_mask_srli_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2509 const int __imm)
2510{
2511 return (__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi) __A, __imm,
2512 (__v32hi) __W,
2513 (__mmask32) __U);
2514}
2515
2516extern __inline __m512i
2517__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2518_mm512_maskz_srli_epi16 (__mmask32 __U, __m512i __A, const int __imm)
2519{
2520 return (__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi) __A, __imm,
2521 (__v32hi)
2522 _mm512_setzero_hi (),
2523 (__mmask32) __U);
2524}
2525
2526extern __inline __m512i
2527__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2528_mm512_slli_epi16 (__m512i __A, const int __B)
2529{
2530 return (__m512i) __builtin_ia32_psllwi512_mask ((__v32hi) __A, __B,
2531 (__v32hi)
2532 _mm512_setzero_hi (),
2533 (__mmask32) -1);
2534}
2535
2536extern __inline __m512i
2537__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2538_mm512_mask_slli_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2539 const int __B)
2540{
2541 return (__m512i) __builtin_ia32_psllwi512_mask ((__v32hi) __A, __B,
2542 (__v32hi) __W,
2543 (__mmask32) __U);
2544}
2545
2546extern __inline __m512i
2547__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2548_mm512_maskz_slli_epi16 (__mmask32 __U, __m512i __A, const int __B)
2549{
2550 return (__m512i) __builtin_ia32_psllwi512_mask ((__v32hi) __A, __B,
2551 (__v32hi)
2552 _mm512_setzero_hi (),
2553 (__mmask32) __U);
2554}
2555
2556extern __inline __m512i
2557__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2558_mm512_shufflehi_epi16 (__m512i __A, const int __imm)
2559{
2560 return (__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi) __A,
2561 __imm,
2562 (__v32hi)
2563 _mm512_setzero_hi (),
2564 (__mmask32) -1);
2565}
2566
2567extern __inline __m512i
2568__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2569_mm512_mask_shufflehi_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2570 const int __imm)
2571{
2572 return (__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi) __A,
2573 __imm,
2574 (__v32hi) __W,
2575 (__mmask32) __U);
2576}
2577
2578extern __inline __m512i
2579__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2580_mm512_maskz_shufflehi_epi16 (__mmask32 __U, __m512i __A,
2581 const int __imm)
2582{
2583 return (__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi) __A,
2584 __imm,
2585 (__v32hi)
2586 _mm512_setzero_hi (),
2587 (__mmask32) __U);
2588}
2589
2590extern __inline __m512i
2591__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2592_mm512_shufflelo_epi16 (__m512i __A, const int __imm)
2593{
2594 return (__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi) __A,
2595 __imm,
2596 (__v32hi)
2597 _mm512_setzero_hi (),
2598 (__mmask32) -1);
2599}
2600
2601extern __inline __m512i
2602__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2603_mm512_mask_shufflelo_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2604 const int __imm)
2605{
2606 return (__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi) __A,
2607 __imm,
2608 (__v32hi) __W,
2609 (__mmask32) __U);
2610}
2611
2612extern __inline __m512i
2613__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2614_mm512_maskz_shufflelo_epi16 (__mmask32 __U, __m512i __A,
2615 const int __imm)
2616{
2617 return (__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi) __A,
2618 __imm,
2619 (__v32hi)
2620 _mm512_setzero_hi (),
2621 (__mmask32) __U);
2622}
2623
2624extern __inline __m512i
2625__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2626_mm512_srai_epi16 (__m512i __A, const int __imm)
2627{
2628 return (__m512i) __builtin_ia32_psrawi512_mask ((__v32hi) __A, __imm,
2629 (__v32hi)
2630 _mm512_setzero_hi (),
2631 (__mmask32) -1);
2632}
2633
2634extern __inline __m512i
2635__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2636_mm512_mask_srai_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2637 const int __imm)
2638{
2639 return (__m512i) __builtin_ia32_psrawi512_mask ((__v32hi) __A, __imm,
2640 (__v32hi) __W,
2641 (__mmask32) __U);
2642}
2643
2644extern __inline __m512i
2645__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2646_mm512_maskz_srai_epi16 (__mmask32 __U, __m512i __A, const int __imm)
2647{
2648 return (__m512i) __builtin_ia32_psrawi512_mask ((__v32hi) __A, __imm,
2649 (__v32hi)
2650 _mm512_setzero_hi (),
2651 (__mmask32) __U);
2652}
2653
2654extern __inline __m512i
2655__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2656_mm512_mask_blend_epi16 (__mmask32 __U, __m512i __A, __m512i __W)
2657{
2658 return (__m512i) __builtin_ia32_blendmw_512_mask ((__v32hi) __A,
2659 (__v32hi) __W,
2660 (__mmask32) __U);
2661}
2662
2663extern __inline __m512i
2664__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2665_mm512_mask_blend_epi8 (__mmask64 __U, __m512i __A, __m512i __W)
2666{
2667 return (__m512i) __builtin_ia32_blendmb_512_mask ((__v64qi) __A,
2668 (__v64qi) __W,
2669 (__mmask64) __U);
2670}
2671
2672extern __inline __mmask32
2673__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2674_mm512_mask_cmp_epi16_mask (__mmask32 __U, __m512i __X, __m512i __Y,
2675 const int __P)
2676{
2677 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2678 (__v32hi) __Y, __P,
2679 (__mmask32) __U);
2680}
2681
2682extern __inline __mmask32
2683__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2684_mm512_cmp_epi16_mask (__m512i __X, __m512i __Y, const int __P)
2685{
2686 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2687 (__v32hi) __Y, __P,
2688 (__mmask32) -1);
2689}
2690
2691extern __inline __mmask64
2692__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2693_mm512_mask_cmp_epi8_mask (__mmask32 __U, __m512i __X, __m512i __Y,
2694 const int __P)
2695{
2696 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2697 (__v64qi) __Y, __P,
2698 (__mmask64) __U);
2699}
2700
2701extern __inline __mmask64
2702__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2703_mm512_cmp_epi8_mask (__m512i __X, __m512i __Y, const int __P)
2704{
2705 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2706 (__v64qi) __Y, __P,
2707 (__mmask64) -1);
2708}
2709
2710extern __inline __mmask32
2711__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2712_mm512_mask_cmp_epu16_mask (__mmask32 __U, __m512i __X, __m512i __Y,
2713 const int __P)
2714{
2715 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2716 (__v32hi) __Y, __P,
2717 (__mmask32) __U);
2718}
2719
2720extern __inline __mmask32
2721__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2722_mm512_cmp_epu16_mask (__m512i __X, __m512i __Y, const int __P)
2723{
2724 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2725 (__v32hi) __Y, __P,
2726 (__mmask32) -1);
2727}
2728
2729extern __inline __mmask64
2730__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2731_mm512_mask_cmp_epu8_mask (__mmask32 __U, __m512i __X, __m512i __Y,
2732 const int __P)
2733{
2734 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2735 (__v64qi) __Y, __P,
2736 (__mmask64) __U);
2737}
2738
2739extern __inline __mmask64
2740__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2741_mm512_cmp_epu8_mask (__m512i __X, __m512i __Y, const int __P)
2742{
2743 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2744 (__v64qi) __Y, __P,
2745 (__mmask64) -1);
2746}
2747
2748extern __inline __m512i
2749__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2750_mm512_packs_epi32 (__m512i __A, __m512i __B)
2751{
2752 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
2753 (__v16si) __B,
2754 (__v32hi)
2755 _mm512_setzero_hi (),
2756 (__mmask32) -1);
2757}
2758
2759extern __inline __m512i
2760__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2761_mm512_maskz_packs_epi32 (__mmask32 __M, __m512i __A, __m512i __B)
2762{
2763 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
2764 (__v16si) __B,
2765 (__v32hi)
2766 _mm512_setzero_hi(),
2767 __M);
2768}
2769
2770extern __inline __m512i
2771__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2772_mm512_mask_packs_epi32 (__m512i __W, __mmask32 __M, __m512i __A,
2773 __m512i __B)
2774{
2775 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
2776 (__v16si) __B,
2777 (__v32hi) __W,
2778 __M);
2779}
2780
2781extern __inline __m512i
2782__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2783_mm512_packus_epi32 (__m512i __A, __m512i __B)
2784{
2785 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
2786 (__v16si) __B,
2787 (__v32hi)
2788 _mm512_setzero_hi (),
2789 (__mmask32) -1);
2790}
2791
2792extern __inline __m512i
2793__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2794_mm512_maskz_packus_epi32 (__mmask32 __M, __m512i __A, __m512i __B)
2795{
2796 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
2797 (__v16si) __B,
2798 (__v32hi)
2799 _mm512_setzero_hi(),
2800 __M);
2801}
2802
2803extern __inline __m512i
2804__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2805_mm512_mask_packus_epi32 (__m512i __W, __mmask32 __M, __m512i __A,
2806 __m512i __B)
2807{
2808 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
2809 (__v16si) __B,
2810 (__v32hi) __W,
2811 __M);
2812}
2813
2814extern __inline __m512i
2815__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2816_mm512_bslli_epi128 (__m512i __A, const int __N)
2817{
2818 return (__m512i) __builtin_ia32_pslldq512 (__A, __N * 8);
2819}
2820
2821extern __inline __m512i
2822__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2823_mm512_bsrli_epi128 (__m512i __A, const int __N)
2824{
2825 return (__m512i) __builtin_ia32_psrldq512 (__A, __N * 8);
2826}
2827
2828#else
2829#define _mm512_alignr_epi8(X, Y, N) \
2830 ((__m512i) __builtin_ia32_palignr512 ((__v8di)(__m512i)(X), \
2831 (__v8di)(__m512i)(Y), \
2832 (int)(N * 8)))
2833
2834#define _mm512_mask_alignr_epi8(W, U, X, Y, N) \
2835 ((__m512i) __builtin_ia32_palignr512_mask ((__v8di)(__m512i)(X), \
2836 (__v8di)(__m512i)(Y), (int)(N * 8), \
2837 (__v8di)(__m512i)(W), (__mmask64)(U)))
2838
2839#define _mm512_maskz_alignr_epi8(U, X, Y, N) \
2840 ((__m512i) __builtin_ia32_palignr512_mask ((__v8di)(__m512i)(X), \
2841 (__v8di)(__m512i)(Y), (int)(N * 8), \
2842 (__v8di)(__m512i)_mm512_setzero_si512 (), \
2843 (__mmask64)(U)))
2844
2845#define _mm512_dbsad_epu8(X, Y, C) \
2846 ((__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi)(__m512i) (X), \
2847 (__v64qi)(__m512i) (Y), (int) (C), \
2848 (__v32hi)(__m512i)_mm512_setzero_si512 (),\
2849 (__mmask32)-1))
2850
2851#define _mm512_mask_dbsad_epu8(W, U, X, Y, C) \
2852 ((__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi)(__m512i) (X), \
2853 (__v64qi)(__m512i) (Y), (int) (C), \
2854 (__v32hi)(__m512i)(W), \
2855 (__mmask32)(U)))
2856
2857#define _mm512_maskz_dbsad_epu8(U, X, Y, C) \
2858 ((__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi)(__m512i) (X), \
2859 (__v64qi)(__m512i) (Y), (int) (C), \
2860 (__v32hi)(__m512i)_mm512_setzero_si512 (),\
2861 (__mmask32)(U)))
2862
2863#define _mm512_srli_epi16(A, B) \
2864 ((__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi)(__m512i)(A), \
2865 (int)(B), (__v32hi)_mm512_setzero_hi(), (__mmask32)-1))
2866
2867#define _mm512_mask_srli_epi16(W, U, A, B) \
2868 ((__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi)(__m512i)(A), \
2869 (int)(B), (__v32hi)(__m512i)(W), (__mmask32)(U)))
2870
2871#define _mm512_maskz_srli_epi16(U, A, B) \
2872 ((__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi)(__m512i)(A), \
2873 (int)(B), (__v32hi)_mm512_setzero_hi(), (__mmask32)(U)))
2874
2875#define _mm512_slli_epi16(X, C) \
2876 ((__m512i)__builtin_ia32_psllwi512_mask ((__v32hi)(__m512i)(X), (int)(C),\
2877 (__v32hi)(__m512i)_mm512_setzero_hi(),\
2878 (__mmask32)-1))
2879
2880#define _mm512_mask_slli_epi16(W, U, X, C) \
2881 ((__m512i)__builtin_ia32_psllwi512_mask ((__v32hi)(__m512i)(X), (int)(C),\
2882 (__v32hi)(__m512i)(W),\
2883 (__mmask32)(U)))
2884
2885#define _mm512_maskz_slli_epi16(U, X, C) \
2886 ((__m512i)__builtin_ia32_psllwi512_mask ((__v32hi)(__m512i)(X), (int)(C),\
2887 (__v32hi)(__m512i)_mm512_setzero_hi(),\
2888 (__mmask32)(U)))
2889
2890#define _mm512_shufflehi_epi16(A, B) \
2891 ((__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2892 (__v32hi)(__m512i)_mm512_setzero_hi(), \
2893 (__mmask32)-1))
2894
2895#define _mm512_mask_shufflehi_epi16(W, U, A, B) \
2896 ((__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2897 (__v32hi)(__m512i)(W), \
2898 (__mmask32)(U)))
2899
2900#define _mm512_maskz_shufflehi_epi16(U, A, B) \
2901 ((__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2902 (__v32hi)(__m512i)_mm512_setzero_hi(), \
2903 (__mmask32)(U)))
2904
2905#define _mm512_shufflelo_epi16(A, B) \
2906 ((__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2907 (__v32hi)(__m512i)_mm512_setzero_hi(), \
2908 (__mmask32)-1))
2909
2910#define _mm512_mask_shufflelo_epi16(W, U, A, B) \
2911 ((__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2912 (__v32hi)(__m512i)(W), \
2913 (__mmask32)(U)))
2914
2915#define _mm512_maskz_shufflelo_epi16(U, A, B) \
2916 ((__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2917 (__v32hi)(__m512i)_mm512_setzero_hi(), \
2918 (__mmask32)(U)))
2919
2920#define _mm512_srai_epi16(A, B) \
2921 ((__m512i) __builtin_ia32_psrawi512_mask ((__v32hi)(__m512i)(A), \
2922 (int)(B), (__v32hi)_mm512_setzero_hi(), (__mmask32)-1))
2923
2924#define _mm512_mask_srai_epi16(W, U, A, B) \
2925 ((__m512i) __builtin_ia32_psrawi512_mask ((__v32hi)(__m512i)(A), \
2926 (int)(B), (__v32hi)(__m512i)(W), (__mmask32)(U)))
2927
2928#define _mm512_maskz_srai_epi16(U, A, B) \
2929 ((__m512i) __builtin_ia32_psrawi512_mask ((__v32hi)(__m512i)(A), \
2930 (int)(B), (__v32hi)_mm512_setzero_hi(), (__mmask32)(U)))
2931
2932#define _mm512_mask_blend_epi16(__U, __A, __W) \
2933 ((__m512i) __builtin_ia32_blendmw_512_mask ((__v32hi) (__A), \
2934 (__v32hi) (__W), \
2935 (__mmask32) (__U)))
2936
2937#define _mm512_mask_blend_epi8(__U, __A, __W) \
2938 ((__m512i) __builtin_ia32_blendmb_512_mask ((__v64qi) (__A), \
2939 (__v64qi) (__W), \
2940 (__mmask64) (__U)))
2941
2942#define _mm512_cmp_epi16_mask(X, Y, P) \
2943 ((__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi)(__m512i)(X), \
2944 (__v32hi)(__m512i)(Y), (int)(P),\
2945 (__mmask32)(-1)))
2946
2947#define _mm512_cmp_epi8_mask(X, Y, P) \
2948 ((__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi)(__m512i)(X), \
2949 (__v64qi)(__m512i)(Y), (int)(P),\
2950 (__mmask64)(-1)))
2951
2952#define _mm512_cmp_epu16_mask(X, Y, P) \
2953 ((__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi)(__m512i)(X), \
2954 (__v32hi)(__m512i)(Y), (int)(P),\
2955 (__mmask32)(-1)))
2956
2957#define _mm512_cmp_epu8_mask(X, Y, P) \
2958 ((__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi)(__m512i)(X), \
2959 (__v64qi)(__m512i)(Y), (int)(P),\
2960 (__mmask64)(-1)))
2961
2962#define _mm512_mask_cmp_epi16_mask(M, X, Y, P) \
2963 ((__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi)(__m512i)(X), \
2964 (__v32hi)(__m512i)(Y), (int)(P),\
2965 (__mmask32)(M)))
2966
2967#define _mm512_mask_cmp_epi8_mask(M, X, Y, P) \
2968 ((__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi)(__m512i)(X), \
2969 (__v64qi)(__m512i)(Y), (int)(P),\
2970 (__mmask64)(M)))
2971
2972#define _mm512_mask_cmp_epu16_mask(M, X, Y, P) \
2973 ((__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi)(__m512i)(X), \
2974 (__v32hi)(__m512i)(Y), (int)(P),\
2975 (__mmask32)(M)))
2976
2977#define _mm512_mask_cmp_epu8_mask(M, X, Y, P) \
2978 ((__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi)(__m512i)(X), \
2979 (__v64qi)(__m512i)(Y), (int)(P),\
2980 (__mmask64)(M)))
2981
2982#define _mm512_bslli_epi128(A, N) \
2983 ((__m512i)__builtin_ia32_pslldq512 ((__m512i)(A), (int)(N) * 8))
2984
2985#define _mm512_bsrli_epi128(A, N) \
2986 ((__m512i)__builtin_ia32_psrldq512 ((__m512i)(A), (int)(N) * 8))
2987
2988#endif
2989
2990#ifdef __DISABLE_AVX512BW__
2991#undef __DISABLE_AVX512BW__
2992#pragma GCC pop_options
2993#endif /* __DISABLE_AVX512BW__ */
2994
2995#endif /* _AVX512BWINTRIN_H_INCLUDED */
Note: See TracBrowser for help on using the repository browser.