1 /*===------------- avx512vnniintrin.h - VNNI intrinsics ------------------===
4 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 * See https://llvm.org/LICENSE.txt for license information.
6 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 *===-----------------------------------------------------------------------===
11 #error "Never use <avx512vnniintrin.h> directly; include <immintrin.h> instead."
14 #ifndef __AVX512VNNIINTRIN_H
15 #define __AVX512VNNIINTRIN_H
17 /* Define the default attributes for the functions in this file. */
18 #define __DEFAULT_FN_ATTRS \
19 __attribute__((__always_inline__, __nodebug__, \
20 __target__("avx512vnni,evex512"), __min_vector_width__(512)))
22 static __inline__ __m512i __DEFAULT_FN_ATTRS
23 _mm512_dpbusd_epi32(__m512i __S
, __m512i __A
, __m512i __B
)
25 return (__m512i
)__builtin_ia32_vpdpbusd512((__v16si
)__S
, (__v16si
)__A
,
29 static __inline__ __m512i __DEFAULT_FN_ATTRS
30 _mm512_mask_dpbusd_epi32(__m512i __S
, __mmask16 __U
, __m512i __A
, __m512i __B
)
32 return (__m512i
)__builtin_ia32_selectd_512(__U
,
33 (__v16si
)_mm512_dpbusd_epi32(__S
, __A
, __B
),
37 static __inline__ __m512i __DEFAULT_FN_ATTRS
38 _mm512_maskz_dpbusd_epi32(__mmask16 __U
, __m512i __S
, __m512i __A
, __m512i __B
)
40 return (__m512i
)__builtin_ia32_selectd_512(__U
,
41 (__v16si
)_mm512_dpbusd_epi32(__S
, __A
, __B
),
42 (__v16si
)_mm512_setzero_si512());
45 static __inline__ __m512i __DEFAULT_FN_ATTRS
46 _mm512_dpbusds_epi32(__m512i __S
, __m512i __A
, __m512i __B
)
48 return (__m512i
)__builtin_ia32_vpdpbusds512((__v16si
)__S
, (__v16si
)__A
,
52 static __inline__ __m512i __DEFAULT_FN_ATTRS
53 _mm512_mask_dpbusds_epi32(__m512i __S
, __mmask16 __U
, __m512i __A
, __m512i __B
)
55 return (__m512i
)__builtin_ia32_selectd_512(__U
,
56 (__v16si
)_mm512_dpbusds_epi32(__S
, __A
, __B
),
60 static __inline__ __m512i __DEFAULT_FN_ATTRS
61 _mm512_maskz_dpbusds_epi32(__mmask16 __U
, __m512i __S
, __m512i __A
, __m512i __B
)
63 return (__m512i
)__builtin_ia32_selectd_512(__U
,
64 (__v16si
)_mm512_dpbusds_epi32(__S
, __A
, __B
),
65 (__v16si
)_mm512_setzero_si512());
68 static __inline__ __m512i __DEFAULT_FN_ATTRS
69 _mm512_dpwssd_epi32(__m512i __S
, __m512i __A
, __m512i __B
)
71 return (__m512i
)__builtin_ia32_vpdpwssd512((__v16si
)__S
, (__v16si
)__A
,
75 static __inline__ __m512i __DEFAULT_FN_ATTRS
76 _mm512_mask_dpwssd_epi32(__m512i __S
, __mmask16 __U
, __m512i __A
, __m512i __B
)
78 return (__m512i
)__builtin_ia32_selectd_512(__U
,
79 (__v16si
)_mm512_dpwssd_epi32(__S
, __A
, __B
),
83 static __inline__ __m512i __DEFAULT_FN_ATTRS
84 _mm512_maskz_dpwssd_epi32(__mmask16 __U
, __m512i __S
, __m512i __A
, __m512i __B
)
86 return (__m512i
)__builtin_ia32_selectd_512(__U
,
87 (__v16si
)_mm512_dpwssd_epi32(__S
, __A
, __B
),
88 (__v16si
)_mm512_setzero_si512());
91 static __inline__ __m512i __DEFAULT_FN_ATTRS
92 _mm512_dpwssds_epi32(__m512i __S
, __m512i __A
, __m512i __B
)
94 return (__m512i
)__builtin_ia32_vpdpwssds512((__v16si
)__S
, (__v16si
)__A
,
98 static __inline__ __m512i __DEFAULT_FN_ATTRS
99 _mm512_mask_dpwssds_epi32(__m512i __S
, __mmask16 __U
, __m512i __A
, __m512i __B
)
101 return (__m512i
)__builtin_ia32_selectd_512(__U
,
102 (__v16si
)_mm512_dpwssds_epi32(__S
, __A
, __B
),
106 static __inline__ __m512i __DEFAULT_FN_ATTRS
107 _mm512_maskz_dpwssds_epi32(__mmask16 __U
, __m512i __S
, __m512i __A
, __m512i __B
)
109 return (__m512i
)__builtin_ia32_selectd_512(__U
,
110 (__v16si
)_mm512_dpwssds_epi32(__S
, __A
, __B
),
111 (__v16si
)_mm512_setzero_si512());
114 #undef __DEFAULT_FN_ATTRS