clang 22.0.0git
avx512ifmaintrin.h
Go to the documentation of this file.
1/*===------------- avx512ifmaintrin.h - IFMA intrinsics ------------------===
2 *
3 *
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
7 *
8 *===-----------------------------------------------------------------------===
9 */
10#ifndef __IMMINTRIN_H
11#error "Never use <avx512ifmaintrin.h> directly; include <immintrin.h> instead."
12#endif
13
14#ifndef __IFMAINTRIN_H
15#define __IFMAINTRIN_H
16
17/* Define the default attributes for the functions in this file. */
18#if defined(__cplusplus) && (__cplusplus >= 201103L)
19#define __DEFAULT_FN_ATTRS \
20 __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"), \
21 __min_vector_width__(512))) constexpr
22#else
23#define __DEFAULT_FN_ATTRS \
24 __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"), \
25 __min_vector_width__(512)))
26#endif
27
28static __inline__ __m512i __DEFAULT_FN_ATTRS
29_mm512_madd52hi_epu64(__m512i __X, __m512i __Y, __m512i __Z) {
30 return (__m512i)__builtin_ia32_vpmadd52huq512((__v8di)__X, (__v8di)__Y,
31 (__v8di)__Z);
32}
33
35 __m512i __W, __mmask8 __M, __m512i __X, __m512i __Y) {
36 return (__m512i)__builtin_ia32_selectq_512(
37 __M, (__v8di)_mm512_madd52hi_epu64(__W, __X, __Y), (__v8di)__W);
38}
39
41 __mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z) {
42 return (__m512i)__builtin_ia32_selectq_512(
43 __M, (__v8di)_mm512_madd52hi_epu64(__X, __Y, __Z),
44 (__v8di)_mm512_setzero_si512());
45}
46
47static __inline__ __m512i __DEFAULT_FN_ATTRS
48_mm512_madd52lo_epu64(__m512i __X, __m512i __Y, __m512i __Z) {
49 return (__m512i)__builtin_ia32_vpmadd52luq512((__v8di)__X, (__v8di)__Y,
50 (__v8di)__Z);
51}
52
54 __m512i __W, __mmask8 __M, __m512i __X, __m512i __Y) {
55 return (__m512i)__builtin_ia32_selectq_512(
56 __M, (__v8di)_mm512_madd52lo_epu64(__W, __X, __Y), (__v8di)__W);
57}
58
60 __mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z) {
61 return (__m512i)__builtin_ia32_selectq_512(
62 __M, (__v8di)_mm512_madd52lo_epu64(__X, __Y, __Z),
63 (__v8di)_mm512_setzero_si512());
64}
65
66#undef __DEFAULT_FN_ATTRS
67
68#endif
#define __DEFAULT_FN_ATTRS
unsigned char __mmask8
static __inline __m512i __DEFAULT_FN_ATTRS512_CONSTEXPR _mm512_setzero_si512(void)
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_maskz_madd52lo_epu64(__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z)
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_madd52hi_epu64(__m512i __X, __m512i __Y, __m512i __Z)
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_mask_madd52hi_epu64(__m512i __W, __mmask8 __M, __m512i __X, __m512i __Y)
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_mask_madd52lo_epu64(__m512i __W, __mmask8 __M, __m512i __X, __m512i __Y)
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_madd52lo_epu64(__m512i __X, __m512i __Y, __m512i __Z)
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_maskz_madd52hi_epu64(__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z)
__inline unsigned int unsigned int __Y
Definition bmi2intrin.h:19