[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / lib / Headers / avx512vnniintrin.h
blob9935a119aacab2f69626aacbd7d370c1b3ace0bb
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 *===-----------------------------------------------------------------------===
9 */
10 #ifndef __IMMINTRIN_H
11 #error "Never use <avx512vnniintrin.h> directly; include <immintrin.h> instead."
12 #endif
14 #ifndef __AVX512VNNIINTRIN_H
15 #define __AVX512VNNIINTRIN_H
17 /* Define the default attributes for the functions in this file. */
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vnni"), __min_vector_width__(512)))
21 static __inline__ __m512i __DEFAULT_FN_ATTRS
22 _mm512_dpbusd_epi32(__m512i __S, __m512i __A, __m512i __B)
24 return (__m512i)__builtin_ia32_vpdpbusd512((__v16si)__S, (__v16si)__A,
25 (__v16si)__B);
28 static __inline__ __m512i __DEFAULT_FN_ATTRS
29 _mm512_mask_dpbusd_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B)
31 return (__m512i)__builtin_ia32_selectd_512(__U,
32 (__v16si)_mm512_dpbusd_epi32(__S, __A, __B),
33 (__v16si)__S);
36 static __inline__ __m512i __DEFAULT_FN_ATTRS
37 _mm512_maskz_dpbusd_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B)
39 return (__m512i)__builtin_ia32_selectd_512(__U,
40 (__v16si)_mm512_dpbusd_epi32(__S, __A, __B),
41 (__v16si)_mm512_setzero_si512());
44 static __inline__ __m512i __DEFAULT_FN_ATTRS
45 _mm512_dpbusds_epi32(__m512i __S, __m512i __A, __m512i __B)
47 return (__m512i)__builtin_ia32_vpdpbusds512((__v16si)__S, (__v16si)__A,
48 (__v16si)__B);
51 static __inline__ __m512i __DEFAULT_FN_ATTRS
52 _mm512_mask_dpbusds_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B)
54 return (__m512i)__builtin_ia32_selectd_512(__U,
55 (__v16si)_mm512_dpbusds_epi32(__S, __A, __B),
56 (__v16si)__S);
59 static __inline__ __m512i __DEFAULT_FN_ATTRS
60 _mm512_maskz_dpbusds_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B)
62 return (__m512i)__builtin_ia32_selectd_512(__U,
63 (__v16si)_mm512_dpbusds_epi32(__S, __A, __B),
64 (__v16si)_mm512_setzero_si512());
67 static __inline__ __m512i __DEFAULT_FN_ATTRS
68 _mm512_dpwssd_epi32(__m512i __S, __m512i __A, __m512i __B)
70 return (__m512i)__builtin_ia32_vpdpwssd512((__v16si)__S, (__v16si)__A,
71 (__v16si)__B);
74 static __inline__ __m512i __DEFAULT_FN_ATTRS
75 _mm512_mask_dpwssd_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B)
77 return (__m512i)__builtin_ia32_selectd_512(__U,
78 (__v16si)_mm512_dpwssd_epi32(__S, __A, __B),
79 (__v16si)__S);
82 static __inline__ __m512i __DEFAULT_FN_ATTRS
83 _mm512_maskz_dpwssd_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B)
85 return (__m512i)__builtin_ia32_selectd_512(__U,
86 (__v16si)_mm512_dpwssd_epi32(__S, __A, __B),
87 (__v16si)_mm512_setzero_si512());
90 static __inline__ __m512i __DEFAULT_FN_ATTRS
91 _mm512_dpwssds_epi32(__m512i __S, __m512i __A, __m512i __B)
93 return (__m512i)__builtin_ia32_vpdpwssds512((__v16si)__S, (__v16si)__A,
94 (__v16si)__B);
97 static __inline__ __m512i __DEFAULT_FN_ATTRS
98 _mm512_mask_dpwssds_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B)
100 return (__m512i)__builtin_ia32_selectd_512(__U,
101 (__v16si)_mm512_dpwssds_epi32(__S, __A, __B),
102 (__v16si)__S);
105 static __inline__ __m512i __DEFAULT_FN_ATTRS
106 _mm512_maskz_dpwssds_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B)
108 return (__m512i)__builtin_ia32_selectd_512(__U,
109 (__v16si)_mm512_dpwssds_epi32(__S, __A, __B),
110 (__v16si)_mm512_setzero_si512());
113 #undef __DEFAULT_FN_ATTRS
115 #endif