[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / clang / lib / Headers / avx512cdintrin.h
blob33b552f6fe6ad8eff4a3a76d4267a7e243c8e50e
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 \
19 __attribute__((__always_inline__, __nodebug__, \
20 __target__("avx512cd,evex512"), __min_vector_width__(512)))
22 static __inline__ __m512i __DEFAULT_FN_ATTRS
23 _mm512_conflict_epi64 (__m512i __A)
25 return (__m512i) __builtin_ia32_vpconflictdi_512 ((__v8di) __A);
28 static __inline__ __m512i __DEFAULT_FN_ATTRS
29 _mm512_mask_conflict_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
31 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
32 (__v8di)_mm512_conflict_epi64(__A),
33 (__v8di)__W);
36 static __inline__ __m512i __DEFAULT_FN_ATTRS
37 _mm512_maskz_conflict_epi64 (__mmask8 __U, __m512i __A)
39 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
40 (__v8di)_mm512_conflict_epi64(__A),
41 (__v8di)_mm512_setzero_si512 ());
44 static __inline__ __m512i __DEFAULT_FN_ATTRS
45 _mm512_conflict_epi32 (__m512i __A)
47 return (__m512i) __builtin_ia32_vpconflictsi_512 ((__v16si) __A);
50 static __inline__ __m512i __DEFAULT_FN_ATTRS
51 _mm512_mask_conflict_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
53 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
54 (__v16si)_mm512_conflict_epi32(__A),
55 (__v16si)__W);
58 static __inline__ __m512i __DEFAULT_FN_ATTRS
59 _mm512_maskz_conflict_epi32 (__mmask16 __U, __m512i __A)
61 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
62 (__v16si)_mm512_conflict_epi32(__A),
63 (__v16si)_mm512_setzero_si512());
66 static __inline__ __m512i __DEFAULT_FN_ATTRS
67 _mm512_lzcnt_epi32 (__m512i __A)
69 return (__m512i) __builtin_ia32_vplzcntd_512 ((__v16si) __A);
72 static __inline__ __m512i __DEFAULT_FN_ATTRS
73 _mm512_mask_lzcnt_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
75 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
76 (__v16si)_mm512_lzcnt_epi32(__A),
77 (__v16si)__W);
80 static __inline__ __m512i __DEFAULT_FN_ATTRS
81 _mm512_maskz_lzcnt_epi32 (__mmask16 __U, __m512i __A)
83 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
84 (__v16si)_mm512_lzcnt_epi32(__A),
85 (__v16si)_mm512_setzero_si512());
88 static __inline__ __m512i __DEFAULT_FN_ATTRS
89 _mm512_lzcnt_epi64 (__m512i __A)
91 return (__m512i) __builtin_ia32_vplzcntq_512 ((__v8di) __A);
94 static __inline__ __m512i __DEFAULT_FN_ATTRS
95 _mm512_mask_lzcnt_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
97 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
98 (__v8di)_mm512_lzcnt_epi64(__A),
99 (__v8di)__W);
102 static __inline__ __m512i __DEFAULT_FN_ATTRS
103 _mm512_maskz_lzcnt_epi64 (__mmask8 __U, __m512i __A)
105 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
106 (__v8di)_mm512_lzcnt_epi64(__A),
107 (__v8di)_mm512_setzero_si512());
110 static __inline__ __m512i __DEFAULT_FN_ATTRS
111 _mm512_broadcastmb_epi64 (__mmask8 __A)
113 return (__m512i) _mm512_set1_epi64((long long) __A);
116 static __inline__ __m512i __DEFAULT_FN_ATTRS
117 _mm512_broadcastmw_epi32 (__mmask16 __A)
119 return (__m512i) _mm512_set1_epi32((int) __A);
123 #undef __DEFAULT_FN_ATTRS
125 #endif