Warning: That file was not part of the compilation database. It may have many parsing errors.

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

Warning: That file was not part of the compilation database. It may have many parsing errors.