2016-11-17 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
[official-gcc.git] / gcc / config / i386 / avx512bwintrin.h
blob8f03249b55a6afd1a8e2c087fa9803ef70f9e08d
1 /* Copyright (C) 2014-2016 Free Software Foundation, Inc.
3 This file is part of GCC.
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.
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.
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.
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/>. */
24 #ifndef _IMMINTRIN_H_INCLUDED
25 #error "Never use <avx512bwintrin.h> directly; include <immintrin.h> instead."
26 #endif
28 #ifndef _AVX512BWINTRIN_H_INCLUDED
29 #define _AVX512BWINTRIN_H_INCLUDED
31 #ifndef __AVX512BW__
32 #pragma GCC push_options
33 #pragma GCC target("avx512bw")
34 #define __DISABLE_AVX512BW__
35 #endif /* __AVX512BW__ */
37 /* Internal data types for implementing the intrinsics. */
38 typedef short __v32hi __attribute__ ((__vector_size__ (64)));
39 typedef char __v64qi __attribute__ ((__vector_size__ (64)));
41 typedef unsigned long long __mmask64;
43 extern __inline __m512i
44 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
45 _mm512_setzero_qi (void)
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 };
57 extern __inline __m512i
58 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
59 _mm512_setzero_hi (void)
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 };
67 extern __inline __m512i
68 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
69 _mm512_mask_mov_epi16 (__m512i __W, __mmask32 __U, __m512i __A)
71 return (__m512i) __builtin_ia32_movdquhi512_mask ((__v32hi) __A,
72 (__v32hi) __W,
73 (__mmask32) __U);
76 extern __inline __m512i
77 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
78 _mm512_maskz_mov_epi16 (__mmask32 __U, __m512i __A)
80 return (__m512i) __builtin_ia32_movdquhi512_mask ((__v32hi) __A,
81 (__v32hi)
82 _mm512_setzero_hi (),
83 (__mmask32) __U);
86 extern __inline __m512i
87 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
88 _mm512_mask_loadu_epi16 (__m512i __W, __mmask32 __U, void const *__P)
90 return (__m512i) __builtin_ia32_loaddquhi512_mask ((const short *) __P,
91 (__v32hi) __W,
92 (__mmask32) __U);
95 extern __inline __m512i
96 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
97 _mm512_maskz_loadu_epi16 (__mmask32 __U, void const *__P)
99 return (__m512i) __builtin_ia32_loaddquhi512_mask ((const short *) __P,
100 (__v32hi)
101 _mm512_setzero_hi (),
102 (__mmask32) __U);
105 extern __inline void
106 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
107 _mm512_mask_storeu_epi16 (void *__P, __mmask32 __U, __m512i __A)
109 __builtin_ia32_storedquhi512_mask ((short *) __P,
110 (__v32hi) __A,
111 (__mmask32) __U);
114 extern __inline __m512i
115 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
116 _mm512_mask_mov_epi8 (__m512i __W, __mmask64 __U, __m512i __A)
118 return (__m512i) __builtin_ia32_movdquqi512_mask ((__v64qi) __A,
119 (__v64qi) __W,
120 (__mmask64) __U);
123 extern __inline __m512i
124 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
125 _mm512_maskz_mov_epi8 (__mmask64 __U, __m512i __A)
127 return (__m512i) __builtin_ia32_movdquqi512_mask ((__v64qi) __A,
128 (__v64qi)
129 _mm512_setzero_hi (),
130 (__mmask64) __U);
133 extern __inline __mmask32
134 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
135 _mm512_kunpackw (__mmask32 __A, __mmask32 __B)
137 return (__mmask32) __builtin_ia32_kunpcksi ((__mmask32) __A,
138 (__mmask32) __B);
141 extern __inline __mmask64
142 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
143 _mm512_kunpackd (__mmask64 __A, __mmask64 __B)
145 return (__mmask64) __builtin_ia32_kunpckdi ((__mmask64) __A,
146 (__mmask64) __B);
149 extern __inline __m512i
150 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
151 _mm512_mask_loadu_epi8 (__m512i __W, __mmask64 __U, void const *__P)
153 return (__m512i) __builtin_ia32_loaddquqi512_mask ((const char *) __P,
154 (__v64qi) __W,
155 (__mmask64) __U);
158 extern __inline __m512i
159 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
160 _mm512_maskz_loadu_epi8 (__mmask64 __U, void const *__P)
162 return (__m512i) __builtin_ia32_loaddquqi512_mask ((const char *) __P,
163 (__v64qi)
164 _mm512_setzero_hi (),
165 (__mmask64) __U);
168 extern __inline void
169 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
170 _mm512_mask_storeu_epi8 (void *__P, __mmask64 __U, __m512i __A)
172 __builtin_ia32_storedquqi512_mask ((char *) __P,
173 (__v64qi) __A,
174 (__mmask64) __U);
177 extern __inline __m512i
178 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
179 _mm512_sad_epu8 (__m512i __A, __m512i __B)
181 return (__m512i) __builtin_ia32_psadbw512 ((__v64qi) __A,
182 (__v64qi) __B);
185 extern __inline __m256i
186 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
187 _mm512_cvtepi16_epi8 (__m512i __A)
189 return (__m256i) __builtin_ia32_pmovwb512_mask ((__v32hi) __A,
190 (__v32qi) _mm256_undefined_si256(),
191 (__mmask32) -1);
194 extern __inline __m256i
195 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
196 _mm512_mask_cvtepi16_epi8 (__m256i __O, __mmask32 __M, __m512i __A)
198 return (__m256i) __builtin_ia32_pmovwb512_mask ((__v32hi) __A,
199 (__v32qi) __O, __M);
202 extern __inline __m256i
203 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
204 _mm512_maskz_cvtepi16_epi8 (__mmask32 __M, __m512i __A)
206 return (__m256i) __builtin_ia32_pmovwb512_mask ((__v32hi) __A,
207 (__v32qi)
208 _mm256_setzero_si256 (),
209 __M);
212 extern __inline __m256i
213 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
214 _mm512_cvtsepi16_epi8 (__m512i __A)
216 return (__m256i) __builtin_ia32_pmovswb512_mask ((__v32hi) __A,
217 (__v32qi)_mm256_undefined_si256(),
218 (__mmask32) -1);
221 extern __inline __m256i
222 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
223 _mm512_mask_cvtsepi16_epi8 (__m256i __O, __mmask32 __M, __m512i __A)
225 return (__m256i) __builtin_ia32_pmovswb512_mask ((__v32hi) __A,
226 (__v32qi)__O,
227 __M);
230 extern __inline __m256i
231 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
232 _mm512_maskz_cvtsepi16_epi8 (__mmask32 __M, __m512i __A)
234 return (__m256i) __builtin_ia32_pmovswb512_mask ((__v32hi) __A,
235 (__v32qi)
236 _mm256_setzero_si256 (),
237 __M);
240 extern __inline __m256i
241 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
242 _mm512_cvtusepi16_epi8 (__m512i __A)
244 return (__m256i) __builtin_ia32_pmovuswb512_mask ((__v32hi) __A,
245 (__v32qi)_mm256_undefined_si256(),
246 (__mmask32) -1);
249 extern __inline __m256i
250 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
251 _mm512_mask_cvtusepi16_epi8 (__m256i __O, __mmask32 __M, __m512i __A)
253 return (__m256i) __builtin_ia32_pmovuswb512_mask ((__v32hi) __A,
254 (__v32qi) __O,
255 __M);
258 extern __inline __m256i
259 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
260 _mm512_maskz_cvtusepi16_epi8 (__mmask32 __M, __m512i __A)
262 return (__m256i) __builtin_ia32_pmovuswb512_mask ((__v32hi) __A,
263 (__v32qi)
264 _mm256_setzero_si256 (),
265 __M);
268 extern __inline __m512i
269 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
270 _mm512_broadcastb_epi8 (__m128i __A)
272 return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A,
273 (__v64qi)_mm512_undefined_epi32(),
274 (__mmask64) -1);
277 extern __inline __m512i
278 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
279 _mm512_mask_broadcastb_epi8 (__m512i __O, __mmask64 __M, __m128i __A)
281 return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A,
282 (__v64qi) __O,
283 __M);
286 extern __inline __m512i
287 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
288 _mm512_maskz_broadcastb_epi8 (__mmask64 __M, __m128i __A)
290 return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A,
291 (__v64qi)
292 _mm512_setzero_qi(),
293 __M);
296 extern __inline __m512i
297 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
298 _mm512_mask_set1_epi8 (__m512i __O, __mmask64 __M, char __A)
300 return (__m512i) __builtin_ia32_pbroadcastb512_gpr_mask (__A,
301 (__v64qi) __O,
302 __M);
305 extern __inline __m512i
306 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
307 _mm512_maskz_set1_epi8 (__mmask64 __M, char __A)
309 return (__m512i) __builtin_ia32_pbroadcastb512_gpr_mask (__A,
310 (__v64qi)
311 _mm512_setzero_qi(),
312 __M);
315 extern __inline __m512i
316 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
317 _mm512_broadcastw_epi16 (__m128i __A)
319 return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A,
320 (__v32hi)_mm512_undefined_epi32(),
321 (__mmask32) -1);
324 extern __inline __m512i
325 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
326 _mm512_mask_broadcastw_epi16 (__m512i __O, __mmask32 __M, __m128i __A)
328 return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A,
329 (__v32hi) __O,
330 __M);
333 extern __inline __m512i
334 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
335 _mm512_maskz_broadcastw_epi16 (__mmask32 __M, __m128i __A)
337 return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A,
338 (__v32hi)
339 _mm512_setzero_hi(),
340 __M);
343 extern __inline __m512i
344 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
345 _mm512_mask_set1_epi16 (__m512i __O, __mmask32 __M, short __A)
347 return (__m512i) __builtin_ia32_pbroadcastw512_gpr_mask (__A,
348 (__v32hi) __O,
349 __M);
352 extern __inline __m512i
353 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
354 _mm512_maskz_set1_epi16 (__mmask32 __M, short __A)
356 return (__m512i) __builtin_ia32_pbroadcastw512_gpr_mask (__A,
357 (__v32hi)
358 _mm512_setzero_hi(),
359 __M);
362 extern __inline __m512i
363 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
364 _mm512_mulhrs_epi16 (__m512i __A, __m512i __B)
366 return (__m512i) __builtin_ia32_pmulhrsw512_mask ((__v32hi) __A,
367 (__v32hi) __B,
368 (__v32hi)
369 _mm512_setzero_hi (),
370 (__mmask32) -1);
373 extern __inline __m512i
374 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
375 _mm512_mask_mulhrs_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
376 __m512i __B)
378 return (__m512i) __builtin_ia32_pmulhrsw512_mask ((__v32hi) __A,
379 (__v32hi) __B,
380 (__v32hi) __W,
381 (__mmask32) __U);
384 extern __inline __m512i
385 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
386 _mm512_maskz_mulhrs_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
388 return (__m512i) __builtin_ia32_pmulhrsw512_mask ((__v32hi) __A,
389 (__v32hi) __B,
390 (__v32hi)
391 _mm512_setzero_hi (),
392 (__mmask32) __U);
395 extern __inline __m512i
396 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
397 _mm512_mulhi_epi16 (__m512i __A, __m512i __B)
399 return (__m512i) __builtin_ia32_pmulhw512_mask ((__v32hi) __A,
400 (__v32hi) __B,
401 (__v32hi)
402 _mm512_setzero_hi (),
403 (__mmask32) -1);
406 extern __inline __m512i
407 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
408 _mm512_mask_mulhi_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
409 __m512i __B)
411 return (__m512i) __builtin_ia32_pmulhw512_mask ((__v32hi) __A,
412 (__v32hi) __B,
413 (__v32hi) __W,
414 (__mmask32) __U);
417 extern __inline __m512i
418 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
419 _mm512_maskz_mulhi_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
421 return (__m512i) __builtin_ia32_pmulhw512_mask ((__v32hi) __A,
422 (__v32hi) __B,
423 (__v32hi)
424 _mm512_setzero_hi (),
425 (__mmask32) __U);
428 extern __inline __m512i
429 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
430 _mm512_mulhi_epu16 (__m512i __A, __m512i __B)
432 return (__m512i) __builtin_ia32_pmulhuw512_mask ((__v32hi) __A,
433 (__v32hi) __B,
434 (__v32hi)
435 _mm512_setzero_hi (),
436 (__mmask32) -1);
439 extern __inline __m512i
440 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
441 _mm512_mask_mulhi_epu16 (__m512i __W, __mmask32 __U, __m512i __A,
442 __m512i __B)
444 return (__m512i) __builtin_ia32_pmulhuw512_mask ((__v32hi) __A,
445 (__v32hi) __B,
446 (__v32hi) __W,
447 (__mmask32) __U);
450 extern __inline __m512i
451 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
452 _mm512_maskz_mulhi_epu16 (__mmask32 __U, __m512i __A, __m512i __B)
454 return (__m512i) __builtin_ia32_pmulhuw512_mask ((__v32hi) __A,
455 (__v32hi) __B,
456 (__v32hi)
457 _mm512_setzero_hi (),
458 (__mmask32) __U);
461 extern __inline __m512i
462 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
463 _mm512_mullo_epi16 (__m512i __A, __m512i __B)
465 return (__m512i) ((__v32hu) __A * (__v32hu) __B);
468 extern __inline __m512i
469 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
470 _mm512_mask_mullo_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
471 __m512i __B)
473 return (__m512i) __builtin_ia32_pmullw512_mask ((__v32hi) __A,
474 (__v32hi) __B,
475 (__v32hi) __W,
476 (__mmask32) __U);
479 extern __inline __m512i
480 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
481 _mm512_maskz_mullo_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
483 return (__m512i) __builtin_ia32_pmullw512_mask ((__v32hi) __A,
484 (__v32hi) __B,
485 (__v32hi)
486 _mm512_setzero_hi (),
487 (__mmask32) __U);
490 extern __inline __m512i
491 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
492 _mm512_cvtepi8_epi16 (__m256i __A)
494 return (__m512i) __builtin_ia32_pmovsxbw512_mask ((__v32qi) __A,
495 (__v32hi)
496 _mm512_setzero_hi (),
497 (__mmask32) -1);
500 extern __inline __m512i
501 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
502 _mm512_mask_cvtepi8_epi16 (__m512i __W, __mmask32 __U, __m256i __A)
504 return (__m512i) __builtin_ia32_pmovsxbw512_mask ((__v32qi) __A,
505 (__v32hi) __W,
506 (__mmask32) __U);
509 extern __inline __m512i
510 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
511 _mm512_maskz_cvtepi8_epi16 (__mmask32 __U, __m256i __A)
513 return (__m512i) __builtin_ia32_pmovsxbw512_mask ((__v32qi) __A,
514 (__v32hi)
515 _mm512_setzero_hi(),
516 (__mmask32) __U);
519 extern __inline __m512i
520 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
521 _mm512_cvtepu8_epi16 (__m256i __A)
523 return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
524 (__v32hi)
525 _mm512_setzero_hi (),
526 (__mmask32) -1);
529 extern __inline __m512i
530 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
531 _mm512_mask_cvtepu8_epi16 (__m512i __W, __mmask32 __U, __m256i __A)
533 return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
534 (__v32hi) __W,
535 (__mmask32) __U);
538 extern __inline __m512i
539 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
540 _mm512_maskz_cvtepu8_epi16 (__mmask32 __U, __m256i __A)
542 return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
543 (__v32hi)
544 _mm512_setzero_hi(),
545 (__mmask32) __U);
548 extern __inline __m512i
549 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
550 _mm512_permutexvar_epi16 (__m512i __A, __m512i __B)
552 return (__m512i) __builtin_ia32_permvarhi512_mask ((__v32hi) __B,
553 (__v32hi) __A,
554 (__v32hi)
555 _mm512_setzero_hi (),
556 (__mmask32) -1);
559 extern __inline __m512i
560 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
561 _mm512_maskz_permutexvar_epi16 (__mmask32 __M, __m512i __A,
562 __m512i __B)
564 return (__m512i) __builtin_ia32_permvarhi512_mask ((__v32hi) __B,
565 (__v32hi) __A,
566 (__v32hi)
567 _mm512_setzero_hi(),
568 (__mmask32) __M);
571 extern __inline __m512i
572 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
573 _mm512_mask_permutexvar_epi16 (__m512i __W, __mmask32 __M, __m512i __A,
574 __m512i __B)
576 return (__m512i) __builtin_ia32_permvarhi512_mask ((__v32hi) __B,
577 (__v32hi) __A,
578 (__v32hi) __W,
579 (__mmask32) __M);
582 extern __inline __m512i
583 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
584 _mm512_permutex2var_epi16 (__m512i __A, __m512i __I, __m512i __B)
586 return (__m512i) __builtin_ia32_vpermt2varhi512_mask ((__v32hi) __I
587 /* idx */ ,
588 (__v32hi) __A,
589 (__v32hi) __B,
590 (__mmask32) -1);
593 extern __inline __m512i
594 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
595 _mm512_mask_permutex2var_epi16 (__m512i __A, __mmask32 __U,
596 __m512i __I, __m512i __B)
598 return (__m512i) __builtin_ia32_vpermt2varhi512_mask ((__v32hi) __I
599 /* idx */ ,
600 (__v32hi) __A,
601 (__v32hi) __B,
602 (__mmask32)
603 __U);
606 extern __inline __m512i
607 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
608 _mm512_mask2_permutex2var_epi16 (__m512i __A, __m512i __I,
609 __mmask32 __U, __m512i __B)
611 return (__m512i) __builtin_ia32_vpermi2varhi512_mask ((__v32hi) __A,
612 (__v32hi) __I
613 /* idx */ ,
614 (__v32hi) __B,
615 (__mmask32)
616 __U);
619 extern __inline __m512i
620 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
621 _mm512_maskz_permutex2var_epi16 (__mmask32 __U, __m512i __A,
622 __m512i __I, __m512i __B)
624 return (__m512i) __builtin_ia32_vpermt2varhi512_maskz ((__v32hi) __I
625 /* idx */ ,
626 (__v32hi) __A,
627 (__v32hi) __B,
628 (__mmask32)
629 __U);
632 extern __inline __m512i
633 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
634 _mm512_avg_epu8 (__m512i __A, __m512i __B)
636 return (__m512i) __builtin_ia32_pavgb512_mask ((__v64qi) __A,
637 (__v64qi) __B,
638 (__v64qi)
639 _mm512_setzero_qi (),
640 (__mmask64) -1);
643 extern __inline __m512i
644 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
645 _mm512_mask_avg_epu8 (__m512i __W, __mmask64 __U, __m512i __A,
646 __m512i __B)
648 return (__m512i) __builtin_ia32_pavgb512_mask ((__v64qi) __A,
649 (__v64qi) __B,
650 (__v64qi) __W,
651 (__mmask64) __U);
654 extern __inline __m512i
655 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
656 _mm512_maskz_avg_epu8 (__mmask64 __U, __m512i __A, __m512i __B)
658 return (__m512i) __builtin_ia32_pavgb512_mask ((__v64qi) __A,
659 (__v64qi) __B,
660 (__v64qi)
661 _mm512_setzero_qi(),
662 (__mmask64) __U);
665 extern __inline __m512i
666 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
667 _mm512_add_epi8 (__m512i __A, __m512i __B)
669 return (__m512i) ((__v64qu) __A + (__v64qu) __B);
672 extern __inline __m512i
673 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
674 _mm512_mask_add_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
675 __m512i __B)
677 return (__m512i) __builtin_ia32_paddb512_mask ((__v64qi) __A,
678 (__v64qi) __B,
679 (__v64qi) __W,
680 (__mmask64) __U);
683 extern __inline __m512i
684 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
685 _mm512_maskz_add_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
687 return (__m512i) __builtin_ia32_paddb512_mask ((__v64qi) __A,
688 (__v64qi) __B,
689 (__v64qi)
690 _mm512_setzero_qi (),
691 (__mmask64) __U);
694 extern __inline __m512i
695 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
696 _mm512_sub_epi8 (__m512i __A, __m512i __B)
698 return (__m512i) ((__v64qu) __A - (__v64qu) __B);
701 extern __inline __m512i
702 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
703 _mm512_mask_sub_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
704 __m512i __B)
706 return (__m512i) __builtin_ia32_psubb512_mask ((__v64qi) __A,
707 (__v64qi) __B,
708 (__v64qi) __W,
709 (__mmask64) __U);
712 extern __inline __m512i
713 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
714 _mm512_maskz_sub_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
716 return (__m512i) __builtin_ia32_psubb512_mask ((__v64qi) __A,
717 (__v64qi) __B,
718 (__v64qi)
719 _mm512_setzero_qi (),
720 (__mmask64) __U);
723 extern __inline __m512i
724 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
725 _mm512_avg_epu16 (__m512i __A, __m512i __B)
727 return (__m512i) __builtin_ia32_pavgw512_mask ((__v32hi) __A,
728 (__v32hi) __B,
729 (__v32hi)
730 _mm512_setzero_hi (),
731 (__mmask32) -1);
734 extern __inline __m512i
735 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
736 _mm512_mask_avg_epu16 (__m512i __W, __mmask32 __U, __m512i __A,
737 __m512i __B)
739 return (__m512i) __builtin_ia32_pavgw512_mask ((__v32hi) __A,
740 (__v32hi) __B,
741 (__v32hi) __W,
742 (__mmask32) __U);
745 extern __inline __m512i
746 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
747 _mm512_maskz_avg_epu16 (__mmask32 __U, __m512i __A, __m512i __B)
749 return (__m512i) __builtin_ia32_pavgw512_mask ((__v32hi) __A,
750 (__v32hi) __B,
751 (__v32hi)
752 _mm512_setzero_hi(),
753 (__mmask32) __U);
756 extern __inline __m512i
757 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
758 _mm512_subs_epi8 (__m512i __A, __m512i __B)
760 return (__m512i) __builtin_ia32_psubsb512_mask ((__v64qi) __A,
761 (__v64qi) __B,
762 (__v64qi)
763 _mm512_setzero_qi (),
764 (__mmask64) -1);
767 extern __inline __m512i
768 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
769 _mm512_mask_subs_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
770 __m512i __B)
772 return (__m512i) __builtin_ia32_psubsb512_mask ((__v64qi) __A,
773 (__v64qi) __B,
774 (__v64qi) __W,
775 (__mmask64) __U);
778 extern __inline __m512i
779 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
780 _mm512_maskz_subs_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
782 return (__m512i) __builtin_ia32_psubsb512_mask ((__v64qi) __A,
783 (__v64qi) __B,
784 (__v64qi)
785 _mm512_setzero_qi (),
786 (__mmask64) __U);
789 extern __inline __m512i
790 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
791 _mm512_subs_epu8 (__m512i __A, __m512i __B)
793 return (__m512i) __builtin_ia32_psubusb512_mask ((__v64qi) __A,
794 (__v64qi) __B,
795 (__v64qi)
796 _mm512_setzero_qi (),
797 (__mmask64) -1);
800 extern __inline __m512i
801 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
802 _mm512_mask_subs_epu8 (__m512i __W, __mmask64 __U, __m512i __A,
803 __m512i __B)
805 return (__m512i) __builtin_ia32_psubusb512_mask ((__v64qi) __A,
806 (__v64qi) __B,
807 (__v64qi) __W,
808 (__mmask64) __U);
811 extern __inline __m512i
812 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
813 _mm512_maskz_subs_epu8 (__mmask64 __U, __m512i __A, __m512i __B)
815 return (__m512i) __builtin_ia32_psubusb512_mask ((__v64qi) __A,
816 (__v64qi) __B,
817 (__v64qi)
818 _mm512_setzero_qi (),
819 (__mmask64) __U);
822 extern __inline __m512i
823 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
824 _mm512_adds_epi8 (__m512i __A, __m512i __B)
826 return (__m512i) __builtin_ia32_paddsb512_mask ((__v64qi) __A,
827 (__v64qi) __B,
828 (__v64qi)
829 _mm512_setzero_qi (),
830 (__mmask64) -1);
833 extern __inline __m512i
834 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
835 _mm512_mask_adds_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
836 __m512i __B)
838 return (__m512i) __builtin_ia32_paddsb512_mask ((__v64qi) __A,
839 (__v64qi) __B,
840 (__v64qi) __W,
841 (__mmask64) __U);
844 extern __inline __m512i
845 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
846 _mm512_maskz_adds_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
848 return (__m512i) __builtin_ia32_paddsb512_mask ((__v64qi) __A,
849 (__v64qi) __B,
850 (__v64qi)
851 _mm512_setzero_qi (),
852 (__mmask64) __U);
855 extern __inline __m512i
856 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
857 _mm512_adds_epu8 (__m512i __A, __m512i __B)
859 return (__m512i) __builtin_ia32_paddusb512_mask ((__v64qi) __A,
860 (__v64qi) __B,
861 (__v64qi)
862 _mm512_setzero_qi (),
863 (__mmask64) -1);
866 extern __inline __m512i
867 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
868 _mm512_mask_adds_epu8 (__m512i __W, __mmask64 __U, __m512i __A,
869 __m512i __B)
871 return (__m512i) __builtin_ia32_paddusb512_mask ((__v64qi) __A,
872 (__v64qi) __B,
873 (__v64qi) __W,
874 (__mmask64) __U);
877 extern __inline __m512i
878 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
879 _mm512_maskz_adds_epu8 (__mmask64 __U, __m512i __A, __m512i __B)
881 return (__m512i) __builtin_ia32_paddusb512_mask ((__v64qi) __A,
882 (__v64qi) __B,
883 (__v64qi)
884 _mm512_setzero_qi (),
885 (__mmask64) __U);
888 extern __inline __m512i
889 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
890 _mm512_sub_epi16 (__m512i __A, __m512i __B)
892 return (__m512i) ((__v32hu) __A - (__v32hu) __B);
895 extern __inline __m512i
896 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
897 _mm512_mask_sub_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
898 __m512i __B)
900 return (__m512i) __builtin_ia32_psubw512_mask ((__v32hi) __A,
901 (__v32hi) __B,
902 (__v32hi) __W,
903 (__mmask32) __U);
906 extern __inline __m512i
907 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
908 _mm512_maskz_sub_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
910 return (__m512i) __builtin_ia32_psubw512_mask ((__v32hi) __A,
911 (__v32hi) __B,
912 (__v32hi)
913 _mm512_setzero_hi (),
914 (__mmask32) __U);
917 extern __inline __m512i
918 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
919 _mm512_subs_epi16 (__m512i __A, __m512i __B)
921 return (__m512i) __builtin_ia32_psubsw512_mask ((__v32hi) __A,
922 (__v32hi) __B,
923 (__v32hi)
924 _mm512_setzero_hi (),
925 (__mmask32) -1);
928 extern __inline __m512i
929 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
930 _mm512_mask_subs_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
931 __m512i __B)
933 return (__m512i) __builtin_ia32_psubsw512_mask ((__v32hi) __A,
934 (__v32hi) __B,
935 (__v32hi) __W,
936 (__mmask32) __U);
939 extern __inline __m512i
940 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
941 _mm512_maskz_subs_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
943 return (__m512i) __builtin_ia32_psubsw512_mask ((__v32hi) __A,
944 (__v32hi) __B,
945 (__v32hi)
946 _mm512_setzero_hi (),
947 (__mmask32) __U);
950 extern __inline __m512i
951 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
952 _mm512_subs_epu16 (__m512i __A, __m512i __B)
954 return (__m512i) __builtin_ia32_psubusw512_mask ((__v32hi) __A,
955 (__v32hi) __B,
956 (__v32hi)
957 _mm512_setzero_hi (),
958 (__mmask32) -1);
961 extern __inline __m512i
962 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
963 _mm512_mask_subs_epu16 (__m512i __W, __mmask32 __U, __m512i __A,
964 __m512i __B)
966 return (__m512i) __builtin_ia32_psubusw512_mask ((__v32hi) __A,
967 (__v32hi) __B,
968 (__v32hi) __W,
969 (__mmask32) __U);
972 extern __inline __m512i
973 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
974 _mm512_maskz_subs_epu16 (__mmask32 __U, __m512i __A, __m512i __B)
976 return (__m512i) __builtin_ia32_psubusw512_mask ((__v32hi) __A,
977 (__v32hi) __B,
978 (__v32hi)
979 _mm512_setzero_hi (),
980 (__mmask32) __U);
983 extern __inline __m512i
984 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
985 _mm512_add_epi16 (__m512i __A, __m512i __B)
987 return (__m512i) ((__v32hu) __A + (__v32hu) __B);
990 extern __inline __m512i
991 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
992 _mm512_mask_add_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
993 __m512i __B)
995 return (__m512i) __builtin_ia32_paddw512_mask ((__v32hi) __A,
996 (__v32hi) __B,
997 (__v32hi) __W,
998 (__mmask32) __U);
1001 extern __inline __m512i
1002 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1003 _mm512_maskz_add_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1005 return (__m512i) __builtin_ia32_paddw512_mask ((__v32hi) __A,
1006 (__v32hi) __B,
1007 (__v32hi)
1008 _mm512_setzero_hi (),
1009 (__mmask32) __U);
1012 extern __inline __m512i
1013 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1014 _mm512_adds_epi16 (__m512i __A, __m512i __B)
1016 return (__m512i) __builtin_ia32_paddsw512_mask ((__v32hi) __A,
1017 (__v32hi) __B,
1018 (__v32hi)
1019 _mm512_setzero_hi (),
1020 (__mmask32) -1);
1023 extern __inline __m512i
1024 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1025 _mm512_mask_adds_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1026 __m512i __B)
1028 return (__m512i) __builtin_ia32_paddsw512_mask ((__v32hi) __A,
1029 (__v32hi) __B,
1030 (__v32hi) __W,
1031 (__mmask32) __U);
1034 extern __inline __m512i
1035 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1036 _mm512_maskz_adds_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1038 return (__m512i) __builtin_ia32_paddsw512_mask ((__v32hi) __A,
1039 (__v32hi) __B,
1040 (__v32hi)
1041 _mm512_setzero_hi (),
1042 (__mmask32) __U);
1045 extern __inline __m512i
1046 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1047 _mm512_adds_epu16 (__m512i __A, __m512i __B)
1049 return (__m512i) __builtin_ia32_paddusw512_mask ((__v32hi) __A,
1050 (__v32hi) __B,
1051 (__v32hi)
1052 _mm512_setzero_hi (),
1053 (__mmask32) -1);
1056 extern __inline __m512i
1057 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1058 _mm512_mask_adds_epu16 (__m512i __W, __mmask32 __U, __m512i __A,
1059 __m512i __B)
1061 return (__m512i) __builtin_ia32_paddusw512_mask ((__v32hi) __A,
1062 (__v32hi) __B,
1063 (__v32hi) __W,
1064 (__mmask32) __U);
1067 extern __inline __m512i
1068 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1069 _mm512_maskz_adds_epu16 (__mmask32 __U, __m512i __A, __m512i __B)
1071 return (__m512i) __builtin_ia32_paddusw512_mask ((__v32hi) __A,
1072 (__v32hi) __B,
1073 (__v32hi)
1074 _mm512_setzero_hi (),
1075 (__mmask32) __U);
1078 extern __inline __m512i
1079 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1080 _mm512_srl_epi16 (__m512i __A, __m128i __B)
1082 return (__m512i) __builtin_ia32_psrlw512_mask ((__v32hi) __A,
1083 (__v8hi) __B,
1084 (__v32hi)
1085 _mm512_setzero_hi (),
1086 (__mmask32) -1);
1089 extern __inline __m512i
1090 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1091 _mm512_mask_srl_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1092 __m128i __B)
1094 return (__m512i) __builtin_ia32_psrlw512_mask ((__v32hi) __A,
1095 (__v8hi) __B,
1096 (__v32hi) __W,
1097 (__mmask32) __U);
1100 extern __inline __m512i
1101 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1102 _mm512_maskz_srl_epi16 (__mmask32 __U, __m512i __A, __m128i __B)
1104 return (__m512i) __builtin_ia32_psrlw512_mask ((__v32hi) __A,
1105 (__v8hi) __B,
1106 (__v32hi)
1107 _mm512_setzero_hi (),
1108 (__mmask32) __U);
1111 extern __inline __m512i
1112 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1113 _mm512_packs_epi16 (__m512i __A, __m512i __B)
1115 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A,
1116 (__v32hi) __B,
1117 (__v64qi)
1118 _mm512_setzero_qi (),
1119 (__mmask64) -1);
1122 extern __inline __m512i
1123 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1124 _mm512_sll_epi16 (__m512i __A, __m128i __B)
1126 return (__m512i) __builtin_ia32_psllw512_mask ((__v32hi) __A,
1127 (__v8hi) __B,
1128 (__v32hi)
1129 _mm512_setzero_hi (),
1130 (__mmask32) -1);
1133 extern __inline __m512i
1134 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1135 _mm512_mask_sll_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1136 __m128i __B)
1138 return (__m512i) __builtin_ia32_psllw512_mask ((__v32hi) __A,
1139 (__v8hi) __B,
1140 (__v32hi) __W,
1141 (__mmask32) __U);
1144 extern __inline __m512i
1145 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1146 _mm512_maskz_sll_epi16 (__mmask32 __U, __m512i __A, __m128i __B)
1148 return (__m512i) __builtin_ia32_psllw512_mask ((__v32hi) __A,
1149 (__v8hi) __B,
1150 (__v32hi)
1151 _mm512_setzero_hi (),
1152 (__mmask32) __U);
1155 extern __inline __m512i
1156 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1157 _mm512_maddubs_epi16 (__m512i __X, __m512i __Y)
1159 return (__m512i) __builtin_ia32_pmaddubsw512_mask ((__v64qi) __X,
1160 (__v64qi) __Y,
1161 (__v32hi)
1162 _mm512_setzero_hi (),
1163 (__mmask32) -1);
1166 extern __inline __m512i
1167 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1168 _mm512_mask_maddubs_epi16 (__m512i __W, __mmask32 __U, __m512i __X,
1169 __m512i __Y)
1171 return (__m512i) __builtin_ia32_pmaddubsw512_mask ((__v64qi) __X,
1172 (__v64qi) __Y,
1173 (__v32hi) __W,
1174 (__mmask32) __U);
1177 extern __inline __m512i
1178 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1179 _mm512_maskz_maddubs_epi16 (__mmask32 __U, __m512i __X, __m512i __Y)
1181 return (__m512i) __builtin_ia32_pmaddubsw512_mask ((__v64qi) __X,
1182 (__v64qi) __Y,
1183 (__v32hi)
1184 _mm512_setzero_hi (),
1185 (__mmask32) __U);
1188 extern __inline __m512i
1189 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1190 _mm512_madd_epi16 (__m512i __A, __m512i __B)
1192 return (__m512i) __builtin_ia32_pmaddwd512_mask ((__v32hi) __A,
1193 (__v32hi) __B,
1194 (__v16si)
1195 _mm512_setzero_si512 (),
1196 (__mmask16) -1);
1199 extern __inline __m512i
1200 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1201 _mm512_mask_madd_epi16 (__m512i __W, __mmask16 __U, __m512i __A,
1202 __m512i __B)
1204 return (__m512i) __builtin_ia32_pmaddwd512_mask ((__v32hi) __A,
1205 (__v32hi) __B,
1206 (__v16si) __W,
1207 (__mmask16) __U);
1210 extern __inline __m512i
1211 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1212 _mm512_maskz_madd_epi16 (__mmask16 __U, __m512i __A, __m512i __B)
1214 return (__m512i) __builtin_ia32_pmaddwd512_mask ((__v32hi) __A,
1215 (__v32hi) __B,
1216 (__v16si)
1217 _mm512_setzero_si512 (),
1218 (__mmask16) __U);
1221 extern __inline __m512i
1222 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1223 _mm512_unpackhi_epi8 (__m512i __A, __m512i __B)
1225 return (__m512i) __builtin_ia32_punpckhbw512_mask ((__v64qi) __A,
1226 (__v64qi) __B,
1227 (__v64qi)
1228 _mm512_setzero_qi (),
1229 (__mmask64) -1);
1232 extern __inline __m512i
1233 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1234 _mm512_mask_unpackhi_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
1235 __m512i __B)
1237 return (__m512i) __builtin_ia32_punpckhbw512_mask ((__v64qi) __A,
1238 (__v64qi) __B,
1239 (__v64qi) __W,
1240 (__mmask64) __U);
1243 extern __inline __m512i
1244 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1245 _mm512_maskz_unpackhi_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
1247 return (__m512i) __builtin_ia32_punpckhbw512_mask ((__v64qi) __A,
1248 (__v64qi) __B,
1249 (__v64qi)
1250 _mm512_setzero_qi(),
1251 (__mmask64) __U);
1254 extern __inline __m512i
1255 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1256 _mm512_unpackhi_epi16 (__m512i __A, __m512i __B)
1258 return (__m512i) __builtin_ia32_punpckhwd512_mask ((__v32hi) __A,
1259 (__v32hi) __B,
1260 (__v32hi)
1261 _mm512_setzero_hi (),
1262 (__mmask32) -1);
1265 extern __inline __m512i
1266 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1267 _mm512_mask_unpackhi_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1268 __m512i __B)
1270 return (__m512i) __builtin_ia32_punpckhwd512_mask ((__v32hi) __A,
1271 (__v32hi) __B,
1272 (__v32hi) __W,
1273 (__mmask32) __U);
1276 extern __inline __m512i
1277 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1278 _mm512_maskz_unpackhi_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1280 return (__m512i) __builtin_ia32_punpckhwd512_mask ((__v32hi) __A,
1281 (__v32hi) __B,
1282 (__v32hi)
1283 _mm512_setzero_hi(),
1284 (__mmask32) __U);
1287 extern __inline __m512i
1288 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1289 _mm512_unpacklo_epi8 (__m512i __A, __m512i __B)
1291 return (__m512i) __builtin_ia32_punpcklbw512_mask ((__v64qi) __A,
1292 (__v64qi) __B,
1293 (__v64qi)
1294 _mm512_setzero_qi (),
1295 (__mmask64) -1);
1298 extern __inline __m512i
1299 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1300 _mm512_mask_unpacklo_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
1301 __m512i __B)
1303 return (__m512i) __builtin_ia32_punpcklbw512_mask ((__v64qi) __A,
1304 (__v64qi) __B,
1305 (__v64qi) __W,
1306 (__mmask64) __U);
1309 extern __inline __m512i
1310 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1311 _mm512_maskz_unpacklo_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
1313 return (__m512i) __builtin_ia32_punpcklbw512_mask ((__v64qi) __A,
1314 (__v64qi) __B,
1315 (__v64qi)
1316 _mm512_setzero_qi(),
1317 (__mmask64) __U);
1320 extern __inline __m512i
1321 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1322 _mm512_unpacklo_epi16 (__m512i __A, __m512i __B)
1324 return (__m512i) __builtin_ia32_punpcklwd512_mask ((__v32hi) __A,
1325 (__v32hi) __B,
1326 (__v32hi)
1327 _mm512_setzero_hi (),
1328 (__mmask32) -1);
1331 extern __inline __m512i
1332 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1333 _mm512_mask_unpacklo_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1334 __m512i __B)
1336 return (__m512i) __builtin_ia32_punpcklwd512_mask ((__v32hi) __A,
1337 (__v32hi) __B,
1338 (__v32hi) __W,
1339 (__mmask32) __U);
1342 extern __inline __m512i
1343 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1344 _mm512_maskz_unpacklo_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1346 return (__m512i) __builtin_ia32_punpcklwd512_mask ((__v32hi) __A,
1347 (__v32hi) __B,
1348 (__v32hi)
1349 _mm512_setzero_hi(),
1350 (__mmask32) __U);
1353 extern __inline __mmask64
1354 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1355 _mm512_cmpeq_epu8_mask (__m512i __A, __m512i __B)
1357 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A,
1358 (__v64qi) __B, 0,
1359 (__mmask64) -1);
1362 extern __inline __mmask64
1363 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1364 _mm512_cmpeq_epi8_mask (__m512i __A, __m512i __B)
1366 return (__mmask64) __builtin_ia32_pcmpeqb512_mask ((__v64qi) __A,
1367 (__v64qi) __B,
1368 (__mmask64) -1);
1371 extern __inline __mmask64
1372 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1373 _mm512_mask_cmpeq_epu8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1375 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A,
1376 (__v64qi) __B, 0,
1377 __U);
1380 extern __inline __mmask64
1381 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1382 _mm512_mask_cmpeq_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1384 return (__mmask64) __builtin_ia32_pcmpeqb512_mask ((__v64qi) __A,
1385 (__v64qi) __B,
1386 __U);
1389 extern __inline __mmask32
1390 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1391 _mm512_cmpeq_epu16_mask (__m512i __A, __m512i __B)
1393 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A,
1394 (__v32hi) __B, 0,
1395 (__mmask32) -1);
1398 extern __inline __mmask32
1399 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1400 _mm512_cmpeq_epi16_mask (__m512i __A, __m512i __B)
1402 return (__mmask32) __builtin_ia32_pcmpeqw512_mask ((__v32hi) __A,
1403 (__v32hi) __B,
1404 (__mmask32) -1);
1407 extern __inline __mmask32
1408 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1409 _mm512_mask_cmpeq_epu16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1411 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A,
1412 (__v32hi) __B, 0,
1413 __U);
1416 extern __inline __mmask32
1417 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1418 _mm512_mask_cmpeq_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1420 return (__mmask32) __builtin_ia32_pcmpeqw512_mask ((__v32hi) __A,
1421 (__v32hi) __B,
1422 __U);
1425 extern __inline __mmask64
1426 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1427 _mm512_cmpgt_epu8_mask (__m512i __A, __m512i __B)
1429 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A,
1430 (__v64qi) __B, 6,
1431 (__mmask64) -1);
1434 extern __inline __mmask64
1435 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1436 _mm512_cmpgt_epi8_mask (__m512i __A, __m512i __B)
1438 return (__mmask64) __builtin_ia32_pcmpgtb512_mask ((__v64qi) __A,
1439 (__v64qi) __B,
1440 (__mmask64) -1);
1443 extern __inline __mmask64
1444 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1445 _mm512_mask_cmpgt_epu8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1447 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A,
1448 (__v64qi) __B, 6,
1449 __U);
1452 extern __inline __mmask64
1453 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1454 _mm512_mask_cmpgt_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1456 return (__mmask64) __builtin_ia32_pcmpgtb512_mask ((__v64qi) __A,
1457 (__v64qi) __B,
1458 __U);
1461 extern __inline __mmask32
1462 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1463 _mm512_cmpgt_epu16_mask (__m512i __A, __m512i __B)
1465 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A,
1466 (__v32hi) __B, 6,
1467 (__mmask32) -1);
1470 extern __inline __mmask32
1471 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1472 _mm512_cmpgt_epi16_mask (__m512i __A, __m512i __B)
1474 return (__mmask32) __builtin_ia32_pcmpgtw512_mask ((__v32hi) __A,
1475 (__v32hi) __B,
1476 (__mmask32) -1);
1479 extern __inline __mmask32
1480 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1481 _mm512_mask_cmpgt_epu16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1483 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A,
1484 (__v32hi) __B, 6,
1485 __U);
1488 extern __inline __mmask32
1489 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1490 _mm512_mask_cmpgt_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1492 return (__mmask32) __builtin_ia32_pcmpgtw512_mask ((__v32hi) __A,
1493 (__v32hi) __B,
1494 __U);
1497 extern __inline __mmask64
1498 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1499 _mm512_movepi8_mask (__m512i __A)
1501 return (__mmask64) __builtin_ia32_cvtb2mask512 ((__v64qi) __A);
1504 extern __inline __mmask32
1505 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1506 _mm512_movepi16_mask (__m512i __A)
1508 return (__mmask32) __builtin_ia32_cvtw2mask512 ((__v32hi) __A);
1511 extern __inline __m512i
1512 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1513 _mm512_movm_epi8 (__mmask64 __A)
1515 return (__m512i) __builtin_ia32_cvtmask2b512 (__A);
1518 extern __inline __m512i
1519 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1520 _mm512_movm_epi16 (__mmask32 __A)
1522 return (__m512i) __builtin_ia32_cvtmask2w512 (__A);
1525 extern __inline __mmask64
1526 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1527 _mm512_test_epi8_mask (__m512i __A, __m512i __B)
1529 return (__mmask64) __builtin_ia32_ptestmb512 ((__v64qi) __A,
1530 (__v64qi) __B,
1531 (__mmask64) -1);
1534 extern __inline __mmask64
1535 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1536 _mm512_mask_test_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1538 return (__mmask64) __builtin_ia32_ptestmb512 ((__v64qi) __A,
1539 (__v64qi) __B, __U);
1542 extern __inline __mmask32
1543 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1544 _mm512_test_epi16_mask (__m512i __A, __m512i __B)
1546 return (__mmask32) __builtin_ia32_ptestmw512 ((__v32hi) __A,
1547 (__v32hi) __B,
1548 (__mmask32) -1);
1551 extern __inline __mmask32
1552 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1553 _mm512_mask_test_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1555 return (__mmask32) __builtin_ia32_ptestmw512 ((__v32hi) __A,
1556 (__v32hi) __B, __U);
1559 extern __inline __mmask64
1560 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1561 _mm512_testn_epi8_mask (__m512i __A, __m512i __B)
1563 return (__mmask64) __builtin_ia32_ptestnmb512 ((__v64qi) __A,
1564 (__v64qi) __B,
1565 (__mmask64) -1);
1568 extern __inline __mmask64
1569 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1570 _mm512_mask_testn_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B)
1572 return (__mmask64) __builtin_ia32_ptestnmb512 ((__v64qi) __A,
1573 (__v64qi) __B, __U);
1576 extern __inline __mmask32
1577 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1578 _mm512_testn_epi16_mask (__m512i __A, __m512i __B)
1580 return (__mmask32) __builtin_ia32_ptestnmw512 ((__v32hi) __A,
1581 (__v32hi) __B,
1582 (__mmask32) -1);
1585 extern __inline __mmask32
1586 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1587 _mm512_mask_testn_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B)
1589 return (__mmask32) __builtin_ia32_ptestnmw512 ((__v32hi) __A,
1590 (__v32hi) __B, __U);
1593 extern __inline __m512i
1594 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1595 _mm512_shuffle_epi8 (__m512i __A, __m512i __B)
1597 return (__m512i) __builtin_ia32_pshufb512_mask ((__v64qi) __A,
1598 (__v64qi) __B,
1599 (__v64qi)
1600 _mm512_setzero_qi (),
1601 (__mmask64) -1);
1604 extern __inline __m512i
1605 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1606 _mm512_mask_shuffle_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
1607 __m512i __B)
1609 return (__m512i) __builtin_ia32_pshufb512_mask ((__v64qi) __A,
1610 (__v64qi) __B,
1611 (__v64qi) __W,
1612 (__mmask64) __U);
1615 extern __inline __m512i
1616 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1617 _mm512_maskz_shuffle_epi8 (__mmask64 __U, __m512i __A, __m512i __B)
1619 return (__m512i) __builtin_ia32_pshufb512_mask ((__v64qi) __A,
1620 (__v64qi) __B,
1621 (__v64qi)
1622 _mm512_setzero_qi (),
1623 (__mmask64) __U);
1626 extern __inline __m512i
1627 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1628 _mm512_min_epu16 (__m512i __A, __m512i __B)
1630 return (__m512i) __builtin_ia32_pminuw512_mask ((__v32hi) __A,
1631 (__v32hi) __B,
1632 (__v32hi)
1633 _mm512_setzero_hi (),
1634 (__mmask32) -1);
1637 extern __inline __m512i
1638 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1639 _mm512_maskz_min_epu16 (__mmask32 __M, __m512i __A, __m512i __B)
1641 return (__m512i) __builtin_ia32_pminuw512_mask ((__v32hi) __A,
1642 (__v32hi) __B,
1643 (__v32hi)
1644 _mm512_setzero_hi(),
1645 (__mmask32) __M);
1648 extern __inline __m512i
1649 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1650 _mm512_mask_min_epu16 (__m512i __W, __mmask32 __M, __m512i __A,
1651 __m512i __B)
1653 return (__m512i) __builtin_ia32_pminuw512_mask ((__v32hi) __A,
1654 (__v32hi) __B,
1655 (__v32hi) __W,
1656 (__mmask32) __M);
1659 extern __inline __m512i
1660 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1661 _mm512_min_epi16 (__m512i __A, __m512i __B)
1663 return (__m512i) __builtin_ia32_pminsw512_mask ((__v32hi) __A,
1664 (__v32hi) __B,
1665 (__v32hi)
1666 _mm512_setzero_hi (),
1667 (__mmask32) -1);
1670 extern __inline __m512i
1671 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1672 _mm512_maskz_min_epi16 (__mmask32 __M, __m512i __A, __m512i __B)
1674 return (__m512i) __builtin_ia32_pminsw512_mask ((__v32hi) __A,
1675 (__v32hi) __B,
1676 (__v32hi)
1677 _mm512_setzero_hi(),
1678 (__mmask32) __M);
1681 extern __inline __m512i
1682 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1683 _mm512_mask_min_epi16 (__m512i __W, __mmask32 __M, __m512i __A,
1684 __m512i __B)
1686 return (__m512i) __builtin_ia32_pminsw512_mask ((__v32hi) __A,
1687 (__v32hi) __B,
1688 (__v32hi) __W,
1689 (__mmask32) __M);
1692 extern __inline __m512i
1693 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1694 _mm512_max_epu8 (__m512i __A, __m512i __B)
1696 return (__m512i) __builtin_ia32_pmaxub512_mask ((__v64qi) __A,
1697 (__v64qi) __B,
1698 (__v64qi)
1699 _mm512_setzero_qi (),
1700 (__mmask64) -1);
1703 extern __inline __m512i
1704 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1705 _mm512_maskz_max_epu8 (__mmask64 __M, __m512i __A, __m512i __B)
1707 return (__m512i) __builtin_ia32_pmaxub512_mask ((__v64qi) __A,
1708 (__v64qi) __B,
1709 (__v64qi)
1710 _mm512_setzero_qi(),
1711 (__mmask64) __M);
1714 extern __inline __m512i
1715 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1716 _mm512_mask_max_epu8 (__m512i __W, __mmask64 __M, __m512i __A,
1717 __m512i __B)
1719 return (__m512i) __builtin_ia32_pmaxub512_mask ((__v64qi) __A,
1720 (__v64qi) __B,
1721 (__v64qi) __W,
1722 (__mmask64) __M);
1725 extern __inline __m512i
1726 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1727 _mm512_max_epi8 (__m512i __A, __m512i __B)
1729 return (__m512i) __builtin_ia32_pmaxsb512_mask ((__v64qi) __A,
1730 (__v64qi) __B,
1731 (__v64qi)
1732 _mm512_setzero_qi (),
1733 (__mmask64) -1);
1736 extern __inline __m512i
1737 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1738 _mm512_maskz_max_epi8 (__mmask64 __M, __m512i __A, __m512i __B)
1740 return (__m512i) __builtin_ia32_pmaxsb512_mask ((__v64qi) __A,
1741 (__v64qi) __B,
1742 (__v64qi)
1743 _mm512_setzero_qi(),
1744 (__mmask64) __M);
1747 extern __inline __m512i
1748 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1749 _mm512_mask_max_epi8 (__m512i __W, __mmask64 __M, __m512i __A,
1750 __m512i __B)
1752 return (__m512i) __builtin_ia32_pmaxsb512_mask ((__v64qi) __A,
1753 (__v64qi) __B,
1754 (__v64qi) __W,
1755 (__mmask64) __M);
1758 extern __inline __m512i
1759 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1760 _mm512_min_epu8 (__m512i __A, __m512i __B)
1762 return (__m512i) __builtin_ia32_pminub512_mask ((__v64qi) __A,
1763 (__v64qi) __B,
1764 (__v64qi)
1765 _mm512_setzero_qi (),
1766 (__mmask64) -1);
1769 extern __inline __m512i
1770 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1771 _mm512_maskz_min_epu8 (__mmask64 __M, __m512i __A, __m512i __B)
1773 return (__m512i) __builtin_ia32_pminub512_mask ((__v64qi) __A,
1774 (__v64qi) __B,
1775 (__v64qi)
1776 _mm512_setzero_qi(),
1777 (__mmask64) __M);
1780 extern __inline __m512i
1781 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1782 _mm512_mask_min_epu8 (__m512i __W, __mmask64 __M, __m512i __A,
1783 __m512i __B)
1785 return (__m512i) __builtin_ia32_pminub512_mask ((__v64qi) __A,
1786 (__v64qi) __B,
1787 (__v64qi) __W,
1788 (__mmask64) __M);
1791 extern __inline __m512i
1792 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1793 _mm512_min_epi8 (__m512i __A, __m512i __B)
1795 return (__m512i) __builtin_ia32_pminsb512_mask ((__v64qi) __A,
1796 (__v64qi) __B,
1797 (__v64qi)
1798 _mm512_setzero_qi (),
1799 (__mmask64) -1);
1802 extern __inline __m512i
1803 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1804 _mm512_maskz_min_epi8 (__mmask64 __M, __m512i __A, __m512i __B)
1806 return (__m512i) __builtin_ia32_pminsb512_mask ((__v64qi) __A,
1807 (__v64qi) __B,
1808 (__v64qi)
1809 _mm512_setzero_qi(),
1810 (__mmask64) __M);
1813 extern __inline __m512i
1814 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1815 _mm512_mask_min_epi8 (__m512i __W, __mmask64 __M, __m512i __A,
1816 __m512i __B)
1818 return (__m512i) __builtin_ia32_pminsb512_mask ((__v64qi) __A,
1819 (__v64qi) __B,
1820 (__v64qi) __W,
1821 (__mmask64) __M);
1824 extern __inline __m512i
1825 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1826 _mm512_max_epi16 (__m512i __A, __m512i __B)
1828 return (__m512i) __builtin_ia32_pmaxsw512_mask ((__v32hi) __A,
1829 (__v32hi) __B,
1830 (__v32hi)
1831 _mm512_setzero_hi (),
1832 (__mmask32) -1);
1835 extern __inline __m512i
1836 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1837 _mm512_maskz_max_epi16 (__mmask32 __M, __m512i __A, __m512i __B)
1839 return (__m512i) __builtin_ia32_pmaxsw512_mask ((__v32hi) __A,
1840 (__v32hi) __B,
1841 (__v32hi)
1842 _mm512_setzero_hi(),
1843 (__mmask32) __M);
1846 extern __inline __m512i
1847 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1848 _mm512_mask_max_epi16 (__m512i __W, __mmask32 __M, __m512i __A,
1849 __m512i __B)
1851 return (__m512i) __builtin_ia32_pmaxsw512_mask ((__v32hi) __A,
1852 (__v32hi) __B,
1853 (__v32hi) __W,
1854 (__mmask32) __M);
1857 extern __inline __m512i
1858 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1859 _mm512_max_epu16 (__m512i __A, __m512i __B)
1861 return (__m512i) __builtin_ia32_pmaxuw512_mask ((__v32hi) __A,
1862 (__v32hi) __B,
1863 (__v32hi)
1864 _mm512_setzero_hi (),
1865 (__mmask32) -1);
1868 extern __inline __m512i
1869 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1870 _mm512_maskz_max_epu16 (__mmask32 __M, __m512i __A, __m512i __B)
1872 return (__m512i) __builtin_ia32_pmaxuw512_mask ((__v32hi) __A,
1873 (__v32hi) __B,
1874 (__v32hi)
1875 _mm512_setzero_hi(),
1876 (__mmask32) __M);
1879 extern __inline __m512i
1880 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1881 _mm512_mask_max_epu16 (__m512i __W, __mmask32 __M, __m512i __A,
1882 __m512i __B)
1884 return (__m512i) __builtin_ia32_pmaxuw512_mask ((__v32hi) __A,
1885 (__v32hi) __B,
1886 (__v32hi) __W,
1887 (__mmask32) __M);
1890 extern __inline __m512i
1891 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1892 _mm512_sra_epi16 (__m512i __A, __m128i __B)
1894 return (__m512i) __builtin_ia32_psraw512_mask ((__v32hi) __A,
1895 (__v8hi) __B,
1896 (__v32hi)
1897 _mm512_setzero_hi (),
1898 (__mmask32) -1);
1901 extern __inline __m512i
1902 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1903 _mm512_mask_sra_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1904 __m128i __B)
1906 return (__m512i) __builtin_ia32_psraw512_mask ((__v32hi) __A,
1907 (__v8hi) __B,
1908 (__v32hi) __W,
1909 (__mmask32) __U);
1912 extern __inline __m512i
1913 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1914 _mm512_maskz_sra_epi16 (__mmask32 __U, __m512i __A, __m128i __B)
1916 return (__m512i) __builtin_ia32_psraw512_mask ((__v32hi) __A,
1917 (__v8hi) __B,
1918 (__v32hi)
1919 _mm512_setzero_hi (),
1920 (__mmask32) __U);
1923 extern __inline __m512i
1924 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1925 _mm512_srav_epi16 (__m512i __A, __m512i __B)
1927 return (__m512i) __builtin_ia32_psrav32hi_mask ((__v32hi) __A,
1928 (__v32hi) __B,
1929 (__v32hi)
1930 _mm512_setzero_hi (),
1931 (__mmask32) -1);
1934 extern __inline __m512i
1935 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1936 _mm512_mask_srav_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1937 __m512i __B)
1939 return (__m512i) __builtin_ia32_psrav32hi_mask ((__v32hi) __A,
1940 (__v32hi) __B,
1941 (__v32hi) __W,
1942 (__mmask32) __U);
1945 extern __inline __m512i
1946 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1947 _mm512_maskz_srav_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1949 return (__m512i) __builtin_ia32_psrav32hi_mask ((__v32hi) __A,
1950 (__v32hi) __B,
1951 (__v32hi)
1952 _mm512_setzero_hi (),
1953 (__mmask32) __U);
1956 extern __inline __m512i
1957 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1958 _mm512_srlv_epi16 (__m512i __A, __m512i __B)
1960 return (__m512i) __builtin_ia32_psrlv32hi_mask ((__v32hi) __A,
1961 (__v32hi) __B,
1962 (__v32hi)
1963 _mm512_setzero_hi (),
1964 (__mmask32) -1);
1967 extern __inline __m512i
1968 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1969 _mm512_mask_srlv_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
1970 __m512i __B)
1972 return (__m512i) __builtin_ia32_psrlv32hi_mask ((__v32hi) __A,
1973 (__v32hi) __B,
1974 (__v32hi) __W,
1975 (__mmask32) __U);
1978 extern __inline __m512i
1979 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1980 _mm512_maskz_srlv_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
1982 return (__m512i) __builtin_ia32_psrlv32hi_mask ((__v32hi) __A,
1983 (__v32hi) __B,
1984 (__v32hi)
1985 _mm512_setzero_hi (),
1986 (__mmask32) __U);
1989 extern __inline __m512i
1990 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
1991 _mm512_sllv_epi16 (__m512i __A, __m512i __B)
1993 return (__m512i) __builtin_ia32_psllv32hi_mask ((__v32hi) __A,
1994 (__v32hi) __B,
1995 (__v32hi)
1996 _mm512_setzero_hi (),
1997 (__mmask32) -1);
2000 extern __inline __m512i
2001 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2002 _mm512_mask_sllv_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2003 __m512i __B)
2005 return (__m512i) __builtin_ia32_psllv32hi_mask ((__v32hi) __A,
2006 (__v32hi) __B,
2007 (__v32hi) __W,
2008 (__mmask32) __U);
2011 extern __inline __m512i
2012 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2013 _mm512_maskz_sllv_epi16 (__mmask32 __U, __m512i __A, __m512i __B)
2015 return (__m512i) __builtin_ia32_psllv32hi_mask ((__v32hi) __A,
2016 (__v32hi) __B,
2017 (__v32hi)
2018 _mm512_setzero_hi (),
2019 (__mmask32) __U);
2022 extern __inline __m512i
2023 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2024 _mm512_mask_packs_epi16 (__m512i __W, __mmask64 __M, __m512i __A,
2025 __m512i __B)
2027 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A,
2028 (__v32hi) __B,
2029 (__v64qi) __W,
2030 (__mmask64) __M);
2033 extern __inline __m512i
2034 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2035 _mm512_maskz_packs_epi16 (__mmask64 __M, __m512i __A, __m512i __B)
2037 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A,
2038 (__v32hi) __B,
2039 (__v64qi)
2040 _mm512_setzero_qi(),
2041 __M);
2044 extern __inline __m512i
2045 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2046 _mm512_packus_epi16 (__m512i __A, __m512i __B)
2048 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A,
2049 (__v32hi) __B,
2050 (__v64qi)
2051 _mm512_setzero_qi (),
2052 (__mmask64) -1);
2055 extern __inline __m512i
2056 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2057 _mm512_mask_packus_epi16 (__m512i __W, __mmask64 __M, __m512i __A,
2058 __m512i __B)
2060 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A,
2061 (__v32hi) __B,
2062 (__v64qi) __W,
2063 (__mmask64) __M);
2066 extern __inline __m512i
2067 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2068 _mm512_maskz_packus_epi16 (__mmask64 __M, __m512i __A, __m512i __B)
2070 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A,
2071 (__v32hi) __B,
2072 (__v64qi)
2073 _mm512_setzero_qi(),
2074 (__mmask64) __M);
2077 extern __inline __m512i
2078 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2079 _mm512_abs_epi8 (__m512i __A)
2081 return (__m512i) __builtin_ia32_pabsb512_mask ((__v64qi) __A,
2082 (__v64qi)
2083 _mm512_setzero_qi (),
2084 (__mmask64) -1);
2087 extern __inline __m512i
2088 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2089 _mm512_mask_abs_epi8 (__m512i __W, __mmask64 __U, __m512i __A)
2091 return (__m512i) __builtin_ia32_pabsb512_mask ((__v64qi) __A,
2092 (__v64qi) __W,
2093 (__mmask64) __U);
2096 extern __inline __m512i
2097 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2098 _mm512_maskz_abs_epi8 (__mmask64 __U, __m512i __A)
2100 return (__m512i) __builtin_ia32_pabsb512_mask ((__v64qi) __A,
2101 (__v64qi)
2102 _mm512_setzero_qi (),
2103 (__mmask64) __U);
2106 extern __inline __m512i
2107 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2108 _mm512_abs_epi16 (__m512i __A)
2110 return (__m512i) __builtin_ia32_pabsw512_mask ((__v32hi) __A,
2111 (__v32hi)
2112 _mm512_setzero_hi (),
2113 (__mmask32) -1);
2116 extern __inline __m512i
2117 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2118 _mm512_mask_abs_epi16 (__m512i __W, __mmask32 __U, __m512i __A)
2120 return (__m512i) __builtin_ia32_pabsw512_mask ((__v32hi) __A,
2121 (__v32hi) __W,
2122 (__mmask32) __U);
2125 extern __inline __m512i
2126 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2127 _mm512_maskz_abs_epi16 (__mmask32 __U, __m512i __A)
2129 return (__m512i) __builtin_ia32_pabsw512_mask ((__v32hi) __A,
2130 (__v32hi)
2131 _mm512_setzero_hi (),
2132 (__mmask32) __U);
2135 extern __inline __mmask64
2136 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2137 _mm512_mask_cmpneq_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2139 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2140 (__v64qi) __Y, 4,
2141 (__mmask64) __M);
2144 extern __inline __mmask64
2145 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2146 _mm512_mask_cmplt_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2148 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2149 (__v64qi) __Y, 1,
2150 (__mmask64) __M);
2153 extern __inline __mmask64
2154 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2155 _mm512_mask_cmpge_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2157 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2158 (__v64qi) __Y, 5,
2159 (__mmask64) __M);
2162 extern __inline __mmask64
2163 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2164 _mm512_mask_cmple_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2166 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2167 (__v64qi) __Y, 2,
2168 (__mmask64) __M);
2171 extern __inline __mmask32
2172 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2173 _mm512_mask_cmpneq_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2175 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2176 (__v32hi) __Y, 4,
2177 (__mmask32) __M);
2180 extern __inline __mmask32
2181 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2182 _mm512_mask_cmplt_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2184 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2185 (__v32hi) __Y, 1,
2186 (__mmask32) __M);
2189 extern __inline __mmask32
2190 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2191 _mm512_mask_cmpge_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2193 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2194 (__v32hi) __Y, 5,
2195 (__mmask32) __M);
2198 extern __inline __mmask32
2199 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2200 _mm512_mask_cmple_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2202 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2203 (__v32hi) __Y, 2,
2204 (__mmask32) __M);
2207 extern __inline __mmask64
2208 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2209 _mm512_mask_cmpneq_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2211 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2212 (__v64qi) __Y, 4,
2213 (__mmask64) __M);
2216 extern __inline __mmask64
2217 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2218 _mm512_mask_cmplt_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2220 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2221 (__v64qi) __Y, 1,
2222 (__mmask64) __M);
2225 extern __inline __mmask64
2226 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2227 _mm512_mask_cmpge_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2229 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2230 (__v64qi) __Y, 5,
2231 (__mmask64) __M);
2234 extern __inline __mmask64
2235 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2236 _mm512_mask_cmple_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y)
2238 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2239 (__v64qi) __Y, 2,
2240 (__mmask64) __M);
2243 extern __inline __mmask32
2244 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2245 _mm512_mask_cmpneq_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2247 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2248 (__v32hi) __Y, 4,
2249 (__mmask32) __M);
2252 extern __inline __mmask32
2253 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2254 _mm512_mask_cmplt_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2256 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2257 (__v32hi) __Y, 1,
2258 (__mmask32) __M);
2261 extern __inline __mmask32
2262 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2263 _mm512_mask_cmpge_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2265 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2266 (__v32hi) __Y, 5,
2267 (__mmask32) __M);
2270 extern __inline __mmask32
2271 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2272 _mm512_mask_cmple_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y)
2274 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2275 (__v32hi) __Y, 2,
2276 (__mmask32) __M);
2279 extern __inline __mmask64
2280 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2281 _mm512_cmpneq_epu8_mask (__m512i __X, __m512i __Y)
2283 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2284 (__v64qi) __Y, 4,
2285 (__mmask64) -1);
2288 extern __inline __mmask64
2289 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2290 _mm512_cmplt_epu8_mask (__m512i __X, __m512i __Y)
2292 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2293 (__v64qi) __Y, 1,
2294 (__mmask64) -1);
2297 extern __inline __mmask64
2298 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2299 _mm512_cmpge_epu8_mask (__m512i __X, __m512i __Y)
2301 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2302 (__v64qi) __Y, 5,
2303 (__mmask64) -1);
2306 extern __inline __mmask64
2307 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2308 _mm512_cmple_epu8_mask (__m512i __X, __m512i __Y)
2310 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2311 (__v64qi) __Y, 2,
2312 (__mmask64) -1);
2315 extern __inline __mmask32
2316 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2317 _mm512_cmpneq_epu16_mask (__m512i __X, __m512i __Y)
2319 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2320 (__v32hi) __Y, 4,
2321 (__mmask32) -1);
2324 extern __inline __mmask32
2325 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2326 _mm512_cmplt_epu16_mask (__m512i __X, __m512i __Y)
2328 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2329 (__v32hi) __Y, 1,
2330 (__mmask32) -1);
2333 extern __inline __mmask32
2334 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2335 _mm512_cmpge_epu16_mask (__m512i __X, __m512i __Y)
2337 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2338 (__v32hi) __Y, 5,
2339 (__mmask32) -1);
2342 extern __inline __mmask32
2343 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2344 _mm512_cmple_epu16_mask (__m512i __X, __m512i __Y)
2346 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2347 (__v32hi) __Y, 2,
2348 (__mmask32) -1);
2351 extern __inline __mmask64
2352 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2353 _mm512_cmpneq_epi8_mask (__m512i __X, __m512i __Y)
2355 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2356 (__v64qi) __Y, 4,
2357 (__mmask64) -1);
2360 extern __inline __mmask64
2361 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2362 _mm512_cmplt_epi8_mask (__m512i __X, __m512i __Y)
2364 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2365 (__v64qi) __Y, 1,
2366 (__mmask64) -1);
2369 extern __inline __mmask64
2370 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2371 _mm512_cmpge_epi8_mask (__m512i __X, __m512i __Y)
2373 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2374 (__v64qi) __Y, 5,
2375 (__mmask64) -1);
2378 extern __inline __mmask64
2379 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2380 _mm512_cmple_epi8_mask (__m512i __X, __m512i __Y)
2382 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2383 (__v64qi) __Y, 2,
2384 (__mmask64) -1);
2387 extern __inline __mmask32
2388 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2389 _mm512_cmpneq_epi16_mask (__m512i __X, __m512i __Y)
2391 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2392 (__v32hi) __Y, 4,
2393 (__mmask32) -1);
2396 extern __inline __mmask32
2397 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2398 _mm512_cmplt_epi16_mask (__m512i __X, __m512i __Y)
2400 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2401 (__v32hi) __Y, 1,
2402 (__mmask32) -1);
2405 extern __inline __mmask32
2406 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2407 _mm512_cmpge_epi16_mask (__m512i __X, __m512i __Y)
2409 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2410 (__v32hi) __Y, 5,
2411 (__mmask32) -1);
2414 extern __inline __mmask32
2415 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2416 _mm512_cmple_epi16_mask (__m512i __X, __m512i __Y)
2418 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2419 (__v32hi) __Y, 2,
2420 (__mmask32) -1);
2423 #ifdef __OPTIMIZE__
2424 extern __inline __m512i
2425 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2426 _mm512_alignr_epi8 (__m512i __A, __m512i __B, const int __N)
2428 return (__m512i) __builtin_ia32_palignr512 ((__v8di) __A,
2429 (__v8di) __B, __N * 8);
2432 extern __inline __m512i
2433 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2434 _mm512_mask_alignr_epi8 (__m512i __W, __mmask64 __U, __m512i __A,
2435 __m512i __B, const int __N)
2437 return (__m512i) __builtin_ia32_palignr512_mask ((__v8di) __A,
2438 (__v8di) __B,
2439 __N * 8,
2440 (__v8di) __W,
2441 (__mmask64) __U);
2444 extern __inline __m512i
2445 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2446 _mm512_maskz_alignr_epi8 (__mmask64 __U, __m512i __A, __m512i __B,
2447 const int __N)
2449 return (__m512i) __builtin_ia32_palignr512_mask ((__v8di) __A,
2450 (__v8di) __B,
2451 __N * 8,
2452 (__v8di)
2453 _mm512_setzero_si512 (),
2454 (__mmask64) __U);
2457 extern __inline __m512i
2458 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2459 _mm512_dbsad_epu8 (__m512i __A, __m512i __B, const int __imm)
2461 return (__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi) __A,
2462 (__v64qi) __B,
2463 __imm,
2464 (__v32hi)
2465 _mm512_setzero_hi (),
2466 (__mmask32) -1);
2469 extern __inline __m512i
2470 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2471 _mm512_mask_dbsad_epu8 (__m512i __W, __mmask32 __U, __m512i __A,
2472 __m512i __B, const int __imm)
2474 return (__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi) __A,
2475 (__v64qi) __B,
2476 __imm,
2477 (__v32hi) __W,
2478 (__mmask32) __U);
2481 extern __inline __m512i
2482 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2483 _mm512_maskz_dbsad_epu8 (__mmask32 __U, __m512i __A, __m512i __B,
2484 const int __imm)
2486 return (__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi) __A,
2487 (__v64qi) __B,
2488 __imm,
2489 (__v32hi)
2490 _mm512_setzero_hi(),
2491 (__mmask32) __U);
2494 extern __inline __m512i
2495 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2496 _mm512_srli_epi16 (__m512i __A, const int __imm)
2498 return (__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi) __A, __imm,
2499 (__v32hi)
2500 _mm512_setzero_hi (),
2501 (__mmask32) -1);
2504 extern __inline __m512i
2505 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2506 _mm512_mask_srli_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2507 const int __imm)
2509 return (__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi) __A, __imm,
2510 (__v32hi) __W,
2511 (__mmask32) __U);
2514 extern __inline __m512i
2515 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2516 _mm512_maskz_srli_epi16 (__mmask32 __U, __m512i __A, const int __imm)
2518 return (__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi) __A, __imm,
2519 (__v32hi)
2520 _mm512_setzero_hi (),
2521 (__mmask32) __U);
2524 extern __inline __m512i
2525 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2526 _mm512_slli_epi16 (__m512i __A, const int __B)
2528 return (__m512i) __builtin_ia32_psllwi512_mask ((__v32hi) __A, __B,
2529 (__v32hi)
2530 _mm512_setzero_hi (),
2531 (__mmask32) -1);
2534 extern __inline __m512i
2535 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2536 _mm512_mask_slli_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2537 const int __B)
2539 return (__m512i) __builtin_ia32_psllwi512_mask ((__v32hi) __A, __B,
2540 (__v32hi) __W,
2541 (__mmask32) __U);
2544 extern __inline __m512i
2545 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2546 _mm512_maskz_slli_epi16 (__mmask32 __U, __m512i __A, const int __B)
2548 return (__m512i) __builtin_ia32_psllwi512_mask ((__v32hi) __A, __B,
2549 (__v32hi)
2550 _mm512_setzero_hi (),
2551 (__mmask32) __U);
2554 extern __inline __m512i
2555 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2556 _mm512_shufflehi_epi16 (__m512i __A, const int __imm)
2558 return (__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi) __A,
2559 __imm,
2560 (__v32hi)
2561 _mm512_setzero_hi (),
2562 (__mmask32) -1);
2565 extern __inline __m512i
2566 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2567 _mm512_mask_shufflehi_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2568 const int __imm)
2570 return (__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi) __A,
2571 __imm,
2572 (__v32hi) __W,
2573 (__mmask32) __U);
2576 extern __inline __m512i
2577 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2578 _mm512_maskz_shufflehi_epi16 (__mmask32 __U, __m512i __A,
2579 const int __imm)
2581 return (__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi) __A,
2582 __imm,
2583 (__v32hi)
2584 _mm512_setzero_hi (),
2585 (__mmask32) __U);
2588 extern __inline __m512i
2589 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2590 _mm512_shufflelo_epi16 (__m512i __A, const int __imm)
2592 return (__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi) __A,
2593 __imm,
2594 (__v32hi)
2595 _mm512_setzero_hi (),
2596 (__mmask32) -1);
2599 extern __inline __m512i
2600 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2601 _mm512_mask_shufflelo_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2602 const int __imm)
2604 return (__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi) __A,
2605 __imm,
2606 (__v32hi) __W,
2607 (__mmask32) __U);
2610 extern __inline __m512i
2611 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2612 _mm512_maskz_shufflelo_epi16 (__mmask32 __U, __m512i __A,
2613 const int __imm)
2615 return (__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi) __A,
2616 __imm,
2617 (__v32hi)
2618 _mm512_setzero_hi (),
2619 (__mmask32) __U);
2622 extern __inline __m512i
2623 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2624 _mm512_srai_epi16 (__m512i __A, const int __imm)
2626 return (__m512i) __builtin_ia32_psrawi512_mask ((__v32hi) __A, __imm,
2627 (__v32hi)
2628 _mm512_setzero_hi (),
2629 (__mmask32) -1);
2632 extern __inline __m512i
2633 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2634 _mm512_mask_srai_epi16 (__m512i __W, __mmask32 __U, __m512i __A,
2635 const int __imm)
2637 return (__m512i) __builtin_ia32_psrawi512_mask ((__v32hi) __A, __imm,
2638 (__v32hi) __W,
2639 (__mmask32) __U);
2642 extern __inline __m512i
2643 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2644 _mm512_maskz_srai_epi16 (__mmask32 __U, __m512i __A, const int __imm)
2646 return (__m512i) __builtin_ia32_psrawi512_mask ((__v32hi) __A, __imm,
2647 (__v32hi)
2648 _mm512_setzero_hi (),
2649 (__mmask32) __U);
2652 extern __inline __m512i
2653 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2654 _mm512_mask_blend_epi16 (__mmask32 __U, __m512i __A, __m512i __W)
2656 return (__m512i) __builtin_ia32_blendmw_512_mask ((__v32hi) __A,
2657 (__v32hi) __W,
2658 (__mmask32) __U);
2661 extern __inline __m512i
2662 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2663 _mm512_mask_blend_epi8 (__mmask64 __U, __m512i __A, __m512i __W)
2665 return (__m512i) __builtin_ia32_blendmb_512_mask ((__v64qi) __A,
2666 (__v64qi) __W,
2667 (__mmask64) __U);
2670 extern __inline __mmask32
2671 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2672 _mm512_mask_cmp_epi16_mask (__mmask32 __U, __m512i __X, __m512i __Y,
2673 const int __P)
2675 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2676 (__v32hi) __Y, __P,
2677 (__mmask32) __U);
2680 extern __inline __mmask32
2681 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2682 _mm512_cmp_epi16_mask (__m512i __X, __m512i __Y, const int __P)
2684 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X,
2685 (__v32hi) __Y, __P,
2686 (__mmask32) -1);
2689 extern __inline __mmask64
2690 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2691 _mm512_mask_cmp_epi8_mask (__mmask32 __U, __m512i __X, __m512i __Y,
2692 const int __P)
2694 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2695 (__v64qi) __Y, __P,
2696 (__mmask64) __U);
2699 extern __inline __mmask64
2700 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2701 _mm512_cmp_epi8_mask (__m512i __X, __m512i __Y, const int __P)
2703 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X,
2704 (__v64qi) __Y, __P,
2705 (__mmask64) -1);
2708 extern __inline __mmask32
2709 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2710 _mm512_mask_cmp_epu16_mask (__mmask32 __U, __m512i __X, __m512i __Y,
2711 const int __P)
2713 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2714 (__v32hi) __Y, __P,
2715 (__mmask32) __U);
2718 extern __inline __mmask32
2719 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2720 _mm512_cmp_epu16_mask (__m512i __X, __m512i __Y, const int __P)
2722 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X,
2723 (__v32hi) __Y, __P,
2724 (__mmask32) -1);
2727 extern __inline __mmask64
2728 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2729 _mm512_mask_cmp_epu8_mask (__mmask32 __U, __m512i __X, __m512i __Y,
2730 const int __P)
2732 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2733 (__v64qi) __Y, __P,
2734 (__mmask64) __U);
2737 extern __inline __mmask64
2738 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2739 _mm512_cmp_epu8_mask (__m512i __X, __m512i __Y, const int __P)
2741 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X,
2742 (__v64qi) __Y, __P,
2743 (__mmask64) -1);
2746 extern __inline __m512i
2747 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2748 _mm512_packs_epi32 (__m512i __A, __m512i __B)
2750 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
2751 (__v16si) __B,
2752 (__v32hi)
2753 _mm512_setzero_hi (),
2754 (__mmask32) -1);
2757 extern __inline __m512i
2758 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2759 _mm512_maskz_packs_epi32 (__mmask32 __M, __m512i __A, __m512i __B)
2761 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
2762 (__v16si) __B,
2763 (__v32hi)
2764 _mm512_setzero_hi(),
2765 __M);
2768 extern __inline __m512i
2769 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2770 _mm512_mask_packs_epi32 (__m512i __W, __mmask32 __M, __m512i __A,
2771 __m512i __B)
2773 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,
2774 (__v16si) __B,
2775 (__v32hi) __W,
2776 __M);
2779 extern __inline __m512i
2780 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2781 _mm512_packus_epi32 (__m512i __A, __m512i __B)
2783 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
2784 (__v16si) __B,
2785 (__v32hi)
2786 _mm512_setzero_hi (),
2787 (__mmask32) -1);
2790 extern __inline __m512i
2791 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2792 _mm512_maskz_packus_epi32 (__mmask32 __M, __m512i __A, __m512i __B)
2794 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
2795 (__v16si) __B,
2796 (__v32hi)
2797 _mm512_setzero_hi(),
2798 __M);
2801 extern __inline __m512i
2802 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2803 _mm512_mask_packus_epi32 (__m512i __W, __mmask32 __M, __m512i __A,
2804 __m512i __B)
2806 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,
2807 (__v16si) __B,
2808 (__v32hi) __W,
2809 __M);
2812 extern __inline __m512i
2813 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2814 _mm512_bslli_epi128 (__m512i __A, const int __N)
2816 return (__m512i) __builtin_ia32_pslldq512 (__A, __N * 8);
2819 extern __inline __m512i
2820 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
2821 _mm512_bsrli_epi128 (__m512i __A, const int __N)
2823 return (__m512i) __builtin_ia32_psrldq512 (__A, __N * 8);
2826 #else
2827 #define _mm512_alignr_epi8(X, Y, N) \
2828 ((__m512i) __builtin_ia32_palignr512 ((__v8di)(__m512i)(X), \
2829 (__v8di)(__m512i)(Y), \
2830 (int)(N * 8)))
2832 #define _mm512_mask_alignr_epi8(W, U, X, Y, N) \
2833 ((__m512i) __builtin_ia32_palignr512_mask ((__v8di)(__m512i)(X), \
2834 (__v8di)(__m512i)(Y), (int)(N * 8), \
2835 (__v8di)(__m512i)(W), (__mmask64)(U)))
2837 #define _mm512_maskz_alignr_epi8(U, X, Y, N) \
2838 ((__m512i) __builtin_ia32_palignr512_mask ((__v8di)(__m512i)(X), \
2839 (__v8di)(__m512i)(Y), (int)(N * 8), \
2840 (__v8di)(__m512i)_mm512_setzero_si512 (), \
2841 (__mmask64)(U)))
2843 #define _mm512_dbsad_epu8(X, Y, C) \
2844 ((__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi)(__m512i) (X), \
2845 (__v64qi)(__m512i) (Y), (int) (C), \
2846 (__v32hi)(__m512i)_mm512_setzero_si512 (),\
2847 (__mmask32)-1))
2849 #define _mm512_mask_dbsad_epu8(W, U, X, Y, C) \
2850 ((__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi)(__m512i) (X), \
2851 (__v64qi)(__m512i) (Y), (int) (C), \
2852 (__v32hi)(__m512i)(W), \
2853 (__mmask32)(U)))
2855 #define _mm512_maskz_dbsad_epu8(U, X, Y, C) \
2856 ((__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi)(__m512i) (X), \
2857 (__v64qi)(__m512i) (Y), (int) (C), \
2858 (__v32hi)(__m512i)_mm512_setzero_si512 (),\
2859 (__mmask32)(U)))
2861 #define _mm512_srli_epi16(A, B) \
2862 ((__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi)(__m512i)(A), \
2863 (int)(B), (__v32hi)_mm512_setzero_hi(), (__mmask32)-1))
2865 #define _mm512_mask_srli_epi16(W, U, A, B) \
2866 ((__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi)(__m512i)(A), \
2867 (int)(B), (__v32hi)(__m512i)(W), (__mmask32)(U)))
2869 #define _mm512_maskz_srli_epi16(U, A, B) \
2870 ((__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi)(__m512i)(A), \
2871 (int)(B), (__v32hi)_mm512_setzero_hi(), (__mmask32)(U)))
2873 #define _mm512_slli_epi16(X, C) \
2874 ((__m512i)__builtin_ia32_psllwi512_mask ((__v32hi)(__m512i)(X), (int)(C),\
2875 (__v32hi)(__m512i)_mm512_setzero_hi(),\
2876 (__mmask32)-1))
2878 #define _mm512_mask_slli_epi16(W, U, X, C) \
2879 ((__m512i)__builtin_ia32_psllwi512_mask ((__v32hi)(__m512i)(X), (int)(C),\
2880 (__v32hi)(__m512i)(W),\
2881 (__mmask32)(U)))
2883 #define _mm512_maskz_slli_epi16(U, X, C) \
2884 ((__m512i)__builtin_ia32_psllwi512_mask ((__v32hi)(__m512i)(X), (int)(C),\
2885 (__v32hi)(__m512i)_mm512_setzero_hi(),\
2886 (__mmask32)(U)))
2888 #define _mm512_shufflehi_epi16(A, B) \
2889 ((__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2890 (__v32hi)(__m512i)_mm512_setzero_hi(), \
2891 (__mmask32)-1))
2893 #define _mm512_mask_shufflehi_epi16(W, U, A, B) \
2894 ((__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2895 (__v32hi)(__m512i)(W), \
2896 (__mmask32)(U)))
2898 #define _mm512_maskz_shufflehi_epi16(U, A, B) \
2899 ((__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2900 (__v32hi)(__m512i)_mm512_setzero_hi(), \
2901 (__mmask32)(U)))
2903 #define _mm512_shufflelo_epi16(A, B) \
2904 ((__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2905 (__v32hi)(__m512i)_mm512_setzero_hi(), \
2906 (__mmask32)-1))
2908 #define _mm512_mask_shufflelo_epi16(W, U, A, B) \
2909 ((__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2910 (__v32hi)(__m512i)(W), \
2911 (__mmask32)(U)))
2913 #define _mm512_maskz_shufflelo_epi16(U, A, B) \
2914 ((__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi)(__m512i)(A), (int)(B), \
2915 (__v32hi)(__m512i)_mm512_setzero_hi(), \
2916 (__mmask32)(U)))
2918 #define _mm512_srai_epi16(A, B) \
2919 ((__m512i) __builtin_ia32_psrawi512_mask ((__v32hi)(__m512i)(A), \
2920 (int)(B), (__v32hi)_mm512_setzero_hi(), (__mmask32)-1))
2922 #define _mm512_mask_srai_epi16(W, U, A, B) \
2923 ((__m512i) __builtin_ia32_psrawi512_mask ((__v32hi)(__m512i)(A), \
2924 (int)(B), (__v32hi)(__m512i)(W), (__mmask32)(U)))
2926 #define _mm512_maskz_srai_epi16(U, A, B) \
2927 ((__m512i) __builtin_ia32_psrawi512_mask ((__v32hi)(__m512i)(A), \
2928 (int)(B), (__v32hi)_mm512_setzero_hi(), (__mmask32)(U)))
2930 #define _mm512_mask_blend_epi16(__U, __A, __W) \
2931 ((__m512i) __builtin_ia32_blendmw_512_mask ((__v32hi) (__A), \
2932 (__v32hi) (__W), \
2933 (__mmask32) (__U)))
2935 #define _mm512_mask_blend_epi8(__U, __A, __W) \
2936 ((__m512i) __builtin_ia32_blendmb_512_mask ((__v64qi) (__A), \
2937 (__v64qi) (__W), \
2938 (__mmask64) (__U)))
2940 #define _mm512_cmp_epi16_mask(X, Y, P) \
2941 ((__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi)(__m512i)(X), \
2942 (__v32hi)(__m512i)(Y), (int)(P),\
2943 (__mmask32)(-1)))
2945 #define _mm512_cmp_epi8_mask(X, Y, P) \
2946 ((__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi)(__m512i)(X), \
2947 (__v64qi)(__m512i)(Y), (int)(P),\
2948 (__mmask64)(-1)))
2950 #define _mm512_cmp_epu16_mask(X, Y, P) \
2951 ((__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi)(__m512i)(X), \
2952 (__v32hi)(__m512i)(Y), (int)(P),\
2953 (__mmask32)(-1)))
2955 #define _mm512_cmp_epu8_mask(X, Y, P) \
2956 ((__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi)(__m512i)(X), \
2957 (__v64qi)(__m512i)(Y), (int)(P),\
2958 (__mmask64)(-1)))
2960 #define _mm512_mask_cmp_epi16_mask(M, X, Y, P) \
2961 ((__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi)(__m512i)(X), \
2962 (__v32hi)(__m512i)(Y), (int)(P),\
2963 (__mmask32)(M)))
2965 #define _mm512_mask_cmp_epi8_mask(M, X, Y, P) \
2966 ((__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi)(__m512i)(X), \
2967 (__v64qi)(__m512i)(Y), (int)(P),\
2968 (__mmask64)(M)))
2970 #define _mm512_mask_cmp_epu16_mask(M, X, Y, P) \
2971 ((__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi)(__m512i)(X), \
2972 (__v32hi)(__m512i)(Y), (int)(P),\
2973 (__mmask32)(M)))
2975 #define _mm512_mask_cmp_epu8_mask(M, X, Y, P) \
2976 ((__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi)(__m512i)(X), \
2977 (__v64qi)(__m512i)(Y), (int)(P),\
2978 (__mmask64)(M)))
2980 #define _mm512_bslli_epi128(A, N) \
2981 ((__m512i)__builtin_ia32_pslldq512 ((__m512i)(A), (int)(N) * 8))
2983 #define _mm512_bsrli_epi128(A, N) \
2984 ((__m512i)__builtin_ia32_psrldq512 ((__m512i)(A), (int)(N) * 8))
2986 #endif
2988 #ifdef __DISABLE_AVX512BW__
2989 #undef __DISABLE_AVX512BW__
2990 #pragma GCC pop_options
2991 #endif /* __DISABLE_AVX512BW__ */
2993 #endif /* _AVX512BWINTRIN_H_INCLUDED */