1 /*===------------- avx512ifmavlintrin.h - IFMA intrinsics ------------------===
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 *===-----------------------------------------------------------------------===
25 #error "Never use <avx512ifmavlintrin.h> directly; include <immintrin.h> instead."
28 #ifndef __IFMAVLINTRIN_H
29 #define __IFMAVLINTRIN_H
31 /* Define the default attributes for the functions in this file. */
32 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma,avx512vl")))
36 static __inline__ __m128i __DEFAULT_FN_ATTRS
37 _mm_madd52hi_epu64 (__m128i __X
, __m128i __Y
, __m128i __Z
)
39 return (__m128i
) __builtin_ia32_vpmadd52huq128_mask ((__v2di
) __X
,
45 static __inline__ __m128i __DEFAULT_FN_ATTRS
46 _mm_mask_madd52hi_epu64 (__m128i __W
, __mmask8 __M
, __m128i __X
, __m128i __Y
)
48 return (__m128i
) __builtin_ia32_vpmadd52huq128_mask ((__v2di
) __W
,
54 static __inline__ __m128i __DEFAULT_FN_ATTRS
55 _mm_maskz_madd52hi_epu64 (__mmask8 __M
, __m128i __X
, __m128i __Y
, __m128i __Z
)
57 return (__m128i
) __builtin_ia32_vpmadd52huq128_maskz ((__v2di
) __X
,
63 static __inline__ __m256i __DEFAULT_FN_ATTRS
64 _mm256_madd52hi_epu64 (__m256i __X
, __m256i __Y
, __m256i __Z
)
66 return (__m256i
) __builtin_ia32_vpmadd52huq256_mask ((__v4di
) __X
,
72 static __inline__ __m256i __DEFAULT_FN_ATTRS
73 _mm256_mask_madd52hi_epu64 (__m256i __W
, __mmask8 __M
, __m256i __X
,
76 return (__m256i
) __builtin_ia32_vpmadd52huq256_mask ((__v4di
) __W
,
82 static __inline__ __m256i __DEFAULT_FN_ATTRS
83 _mm256_maskz_madd52hi_epu64 (__mmask8 __M
, __m256i __X
, __m256i __Y
, __m256i __Z
)
85 return (__m256i
) __builtin_ia32_vpmadd52huq256_maskz ((__v4di
) __X
,
91 static __inline__ __m128i __DEFAULT_FN_ATTRS
92 _mm_madd52lo_epu64 (__m128i __X
, __m128i __Y
, __m128i __Z
)
94 return (__m128i
) __builtin_ia32_vpmadd52luq128_mask ((__v2di
) __X
,
100 static __inline__ __m128i __DEFAULT_FN_ATTRS
101 _mm_mask_madd52lo_epu64 (__m128i __W
, __mmask8 __M
, __m128i __X
, __m128i __Y
)
103 return (__m128i
) __builtin_ia32_vpmadd52luq128_mask ((__v2di
) __W
,
109 static __inline__ __m128i __DEFAULT_FN_ATTRS
110 _mm_maskz_madd52lo_epu64 (__mmask8 __M
, __m128i __X
, __m128i __Y
, __m128i __Z
)
112 return (__m128i
) __builtin_ia32_vpmadd52luq128_maskz ((__v2di
) __X
,
118 static __inline__ __m256i __DEFAULT_FN_ATTRS
119 _mm256_madd52lo_epu64 (__m256i __X
, __m256i __Y
, __m256i __Z
)
121 return (__m256i
) __builtin_ia32_vpmadd52luq256_mask ((__v4di
) __X
,
127 static __inline__ __m256i __DEFAULT_FN_ATTRS
128 _mm256_mask_madd52lo_epu64 (__m256i __W
, __mmask8 __M
, __m256i __X
,
131 return (__m256i
) __builtin_ia32_vpmadd52luq256_mask ((__v4di
) __W
,
137 static __inline__ __m256i __DEFAULT_FN_ATTRS
138 _mm256_maskz_madd52lo_epu64 (__mmask8 __M
, __m256i __X
, __m256i __Y
, __m256i __Z
)
140 return (__m256i
) __builtin_ia32_vpmadd52luq256_maskz ((__v4di
) __X
,
147 #undef __DEFAULT_FN_ATTRS