source: Daodan/MSYS2/mingw32/lib/gcc/i686-w64-mingw32/11.2.0/include/avx512bwintrin.h@ 1171

Last change on this file since 1171 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

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