clang  7.0.0svn
avx512ifmavlintrin.h
Go to the documentation of this file.
1 /*===------------- avx512ifmavlintrin.h - IFMA intrinsics ------------------===
2  *
3  *
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:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
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
20  * THE SOFTWARE.
21  *
22  *===-----------------------------------------------------------------------===
23  */
24 #ifndef __IMMINTRIN_H
25 #error "Never use <avx512ifmavlintrin.h> directly; include <immintrin.h> instead."
26 #endif
27 
28 #ifndef __IFMAVLINTRIN_H
29 #define __IFMAVLINTRIN_H
30 
31 /* Define the default attributes for the functions in this file. */
32 #define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma,avx512vl"), __min_vector_width__(128)))
33 #define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma,avx512vl"), __min_vector_width__(256)))
34 
35 
36 
37 static __inline__ __m128i __DEFAULT_FN_ATTRS128
38 _mm_madd52hi_epu64 (__m128i __X, __m128i __Y, __m128i __Z)
39 {
40  return (__m128i)__builtin_ia32_vpmadd52huq128((__v2di) __X, (__v2di) __Y,
41  (__v2di) __Z);
42 }
43 
44 static __inline__ __m128i __DEFAULT_FN_ATTRS128
45 _mm_mask_madd52hi_epu64 (__m128i __W, __mmask8 __M, __m128i __X, __m128i __Y)
46 {
47  return (__m128i)__builtin_ia32_selectq_128(__M,
48  (__v2di)_mm_madd52hi_epu64(__W, __X, __Y),
49  (__v2di)__W);
50 }
51 
52 static __inline__ __m128i __DEFAULT_FN_ATTRS128
53 _mm_maskz_madd52hi_epu64 (__mmask8 __M, __m128i __X, __m128i __Y, __m128i __Z)
54 {
55  return (__m128i)__builtin_ia32_selectq_128(__M,
56  (__v2di)_mm_madd52hi_epu64(__X, __Y, __Z),
57  (__v2di)_mm_setzero_si128());
58 }
59 
60 static __inline__ __m256i __DEFAULT_FN_ATTRS256
61 _mm256_madd52hi_epu64 (__m256i __X, __m256i __Y, __m256i __Z)
62 {
63  return (__m256i)__builtin_ia32_vpmadd52huq256((__v4di)__X, (__v4di)__Y,
64  (__v4di)__Z);
65 }
66 
67 static __inline__ __m256i __DEFAULT_FN_ATTRS256
68 _mm256_mask_madd52hi_epu64 (__m256i __W, __mmask8 __M, __m256i __X, __m256i __Y)
69 {
70  return (__m256i)__builtin_ia32_selectq_256(__M,
71  (__v4di)_mm256_madd52hi_epu64(__W, __X, __Y),
72  (__v4di)__W);
73 }
74 
75 static __inline__ __m256i __DEFAULT_FN_ATTRS256
76 _mm256_maskz_madd52hi_epu64 (__mmask8 __M, __m256i __X, __m256i __Y, __m256i __Z)
77 {
78  return (__m256i)__builtin_ia32_selectq_256(__M,
79  (__v4di)_mm256_madd52hi_epu64(__X, __Y, __Z),
80  (__v4di)_mm256_setzero_si256());
81 }
82 
83 static __inline__ __m128i __DEFAULT_FN_ATTRS128
84 _mm_madd52lo_epu64 (__m128i __X, __m128i __Y, __m128i __Z)
85 {
86  return (__m128i)__builtin_ia32_vpmadd52luq128((__v2di)__X, (__v2di)__Y,
87  (__v2di)__Z);
88 }
89 
90 static __inline__ __m128i __DEFAULT_FN_ATTRS128
91 _mm_mask_madd52lo_epu64 (__m128i __W, __mmask8 __M, __m128i __X, __m128i __Y)
92 {
93  return (__m128i)__builtin_ia32_selectq_128(__M,
94  (__v2di)_mm_madd52lo_epu64(__W, __X, __Y),
95  (__v2di)__W);
96 }
97 
98 static __inline__ __m128i __DEFAULT_FN_ATTRS128
99 _mm_maskz_madd52lo_epu64 (__mmask8 __M, __m128i __X, __m128i __Y, __m128i __Z)
100 {
101  return (__m128i)__builtin_ia32_selectq_128(__M,
102  (__v2di)_mm_madd52lo_epu64(__X, __Y, __Z),
103  (__v2di)_mm_setzero_si128());
104 }
105 
106 static __inline__ __m256i __DEFAULT_FN_ATTRS256
107 _mm256_madd52lo_epu64 (__m256i __X, __m256i __Y, __m256i __Z)
108 {
109  return (__m256i)__builtin_ia32_vpmadd52luq256((__v4di)__X, (__v4di)__Y,
110  (__v4di)__Z);
111 }
112 
113 static __inline__ __m256i __DEFAULT_FN_ATTRS256
114 _mm256_mask_madd52lo_epu64 (__m256i __W, __mmask8 __M, __m256i __X, __m256i __Y)
115 {
116  return (__m256i)__builtin_ia32_selectq_256(__M,
117  (__v4di)_mm256_madd52lo_epu64(__W, __X, __Y),
118  (__v4di)__W);
119 }
120 
121 static __inline__ __m256i __DEFAULT_FN_ATTRS256
122 _mm256_maskz_madd52lo_epu64 (__mmask8 __M, __m256i __X, __m256i __Y, __m256i __Z)
123 {
124  return (__m256i)__builtin_ia32_selectq_256(__M,
125  (__v4di)_mm256_madd52lo_epu64(__X, __Y, __Z),
126  (__v4di)_mm256_setzero_si256());
127 }
128 
129 
130 #undef __DEFAULT_FN_ATTRS128
131 #undef __DEFAULT_FN_ATTRS256
132 
133 #endif
#define __DEFAULT_FN_ATTRS256
static __inline__ __m128i __DEFAULT_FN_ATTRS128 _mm_mask_madd52hi_epu64(__m128i __W, __mmask8 __M, __m128i __X, __m128i __Y)
#define __DEFAULT_FN_ATTRS128
unsigned char __mmask8
Definition: avx512fintrin.h:47
static __inline__ __m128i __DEFAULT_FN_ATTRS128 _mm_madd52lo_epu64(__m128i __X, __m128i __Y, __m128i __Z)
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_maskz_madd52hi_epu64(__mmask8 __M, __m256i __X, __m256i __Y, __m256i __Z)
static __inline__ __m128i __DEFAULT_FN_ATTRS128 _mm_maskz_madd52lo_epu64(__mmask8 __M, __m128i __X, __m128i __Y, __m128i __Z)
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_madd52lo_epu64(__m256i __X, __m256i __Y, __m256i __Z)
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_maskz_madd52lo_epu64(__mmask8 __M, __m256i __X, __m256i __Y, __m256i __Z)
static __inline__ __m128i __DEFAULT_FN_ATTRS128 _mm_mask_madd52lo_epu64(__m128i __W, __mmask8 __M, __m128i __X, __m128i __Y)
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_madd52hi_epu64(__m256i __X, __m256i __Y, __m256i __Z)
static __inline__ __m128i __DEFAULT_FN_ATTRS128 _mm_maskz_madd52hi_epu64(__mmask8 __M, __m128i __X, __m128i __Y, __m128i __Z)
static __inline__ __m128i __DEFAULT_FN_ATTRS128 _mm_madd52hi_epu64(__m128i __X, __m128i __Y, __m128i __Z)
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_setzero_si128(void)
Creates a 128-bit integer vector initialized to zero.
Definition: emmintrin.h:3954
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_mask_madd52hi_epu64(__m256i __W, __mmask8 __M, __m256i __X, __m256i __Y)
static __inline __m256i __DEFAULT_FN_ATTRS _mm256_setzero_si256(void)
Constructs a 256-bit integer vector initialized to zero.
Definition: avxintrin.h:4291
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_mask_madd52lo_epu64(__m256i __W, __mmask8 __M, __m256i __X, __m256i __Y)