[docs] Fix build-docs.sh
[llvm-project.git] / clang / lib / Headers / avx512cdintrin.h
blobbfdba84aa28b57739640a44433e232b0dec0fc07
1 /*===------------- avx512cdintrin.h - AVX512CD 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 <avx512cdintrin.h> directly; include <immintrin.h> instead."
12 #endif
14 #ifndef __AVX512CDINTRIN_H
15 #define __AVX512CDINTRIN_H
17 /* Define the default attributes for the functions in this file. */
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512cd"), __min_vector_width__(512)))
20 static __inline__ __m512i __DEFAULT_FN_ATTRS
21 _mm512_conflict_epi64 (__m512i __A)
23 return (__m512i) __builtin_ia32_vpconflictdi_512 ((__v8di) __A);
26 static __inline__ __m512i __DEFAULT_FN_ATTRS
27 _mm512_mask_conflict_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
29 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
30 (__v8di)_mm512_conflict_epi64(__A),
31 (__v8di)__W);
34 static __inline__ __m512i __DEFAULT_FN_ATTRS
35 _mm512_maskz_conflict_epi64 (__mmask8 __U, __m512i __A)
37 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
38 (__v8di)_mm512_conflict_epi64(__A),
39 (__v8di)_mm512_setzero_si512 ());
42 static __inline__ __m512i __DEFAULT_FN_ATTRS
43 _mm512_conflict_epi32 (__m512i __A)
45 return (__m512i) __builtin_ia32_vpconflictsi_512 ((__v16si) __A);
48 static __inline__ __m512i __DEFAULT_FN_ATTRS
49 _mm512_mask_conflict_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
51 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
52 (__v16si)_mm512_conflict_epi32(__A),
53 (__v16si)__W);
56 static __inline__ __m512i __DEFAULT_FN_ATTRS
57 _mm512_maskz_conflict_epi32 (__mmask16 __U, __m512i __A)
59 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
60 (__v16si)_mm512_conflict_epi32(__A),
61 (__v16si)_mm512_setzero_si512());
64 static __inline__ __m512i __DEFAULT_FN_ATTRS
65 _mm512_lzcnt_epi32 (__m512i __A)
67 return (__m512i) __builtin_ia32_vplzcntd_512 ((__v16si) __A);
70 static __inline__ __m512i __DEFAULT_FN_ATTRS
71 _mm512_mask_lzcnt_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
73 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
74 (__v16si)_mm512_lzcnt_epi32(__A),
75 (__v16si)__W);
78 static __inline__ __m512i __DEFAULT_FN_ATTRS
79 _mm512_maskz_lzcnt_epi32 (__mmask16 __U, __m512i __A)
81 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
82 (__v16si)_mm512_lzcnt_epi32(__A),
83 (__v16si)_mm512_setzero_si512());
86 static __inline__ __m512i __DEFAULT_FN_ATTRS
87 _mm512_lzcnt_epi64 (__m512i __A)
89 return (__m512i) __builtin_ia32_vplzcntq_512 ((__v8di) __A);
92 static __inline__ __m512i __DEFAULT_FN_ATTRS
93 _mm512_mask_lzcnt_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
95 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
96 (__v8di)_mm512_lzcnt_epi64(__A),
97 (__v8di)__W);
100 static __inline__ __m512i __DEFAULT_FN_ATTRS
101 _mm512_maskz_lzcnt_epi64 (__mmask8 __U, __m512i __A)
103 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
104 (__v8di)_mm512_lzcnt_epi64(__A),
105 (__v8di)_mm512_setzero_si512());
108 static __inline__ __m512i __DEFAULT_FN_ATTRS
109 _mm512_broadcastmb_epi64 (__mmask8 __A)
111 return (__m512i) _mm512_set1_epi64((long long) __A);
114 static __inline__ __m512i __DEFAULT_FN_ATTRS
115 _mm512_broadcastmw_epi32 (__mmask16 __A)
117 return (__m512i) _mm512_set1_epi32((int) __A);
121 #undef __DEFAULT_FN_ATTRS
123 #endif