1 | /* Copyright (C) 2013-2021 Free Software Foundation, Inc.
|
---|
2 |
|
---|
3 | This file is part of GCC.
|
---|
4 |
|
---|
5 | GCC is free software; you can redistribute it and/or modify
|
---|
6 | it under the terms of the GNU General Public License as published by
|
---|
7 | the Free Software Foundation; either version 3, or (at your option)
|
---|
8 | any later version.
|
---|
9 |
|
---|
10 | GCC is distributed in the hope that it will be useful,
|
---|
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | GNU General Public License for more details.
|
---|
14 |
|
---|
15 | Under Section 7 of GPL version 3, you are granted additional
|
---|
16 | permissions described in the GCC Runtime Library Exception, version
|
---|
17 | 3.1, as published by the Free Software Foundation.
|
---|
18 |
|
---|
19 | You should have received a copy of the GNU General Public License and
|
---|
20 | a copy of the GCC Runtime Library Exception along with this program;
|
---|
21 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
---|
22 | <http://www.gnu.org/licenses/>. */
|
---|
23 |
|
---|
24 | #ifndef _IMMINTRIN_H_INCLUDED
|
---|
25 | #error "Never use <avx512ifmavlintrin.h> directly; include <immintrin.h> instead."
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | #ifndef _AVX512IFMAVLINTRIN_H_INCLUDED
|
---|
29 | #define _AVX512IFMAVLINTRIN_H_INCLUDED
|
---|
30 |
|
---|
31 | #if !defined(__AVX512VL__) || !defined(__AVX512IFMA__)
|
---|
32 | #pragma GCC push_options
|
---|
33 | #pragma GCC target("avx512ifma,avx512vl")
|
---|
34 | #define __DISABLE_AVX512IFMAVL__
|
---|
35 | #endif /* __AVX512IFMAVL__ */
|
---|
36 |
|
---|
37 | extern __inline __m128i
|
---|
38 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
39 | _mm_madd52lo_epu64 (__m128i __X, __m128i __Y, __m128i __Z)
|
---|
40 | {
|
---|
41 | return (__m128i) __builtin_ia32_vpmadd52luq128_mask ((__v2di) __X,
|
---|
42 | (__v2di) __Y,
|
---|
43 | (__v2di) __Z,
|
---|
44 | (__mmask8) -1);
|
---|
45 | }
|
---|
46 |
|
---|
47 | extern __inline __m128i
|
---|
48 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
49 | _mm_madd52hi_epu64 (__m128i __X, __m128i __Y, __m128i __Z)
|
---|
50 | {
|
---|
51 | return (__m128i) __builtin_ia32_vpmadd52huq128_mask ((__v2di) __X,
|
---|
52 | (__v2di) __Y,
|
---|
53 | (__v2di) __Z,
|
---|
54 | (__mmask8) -1);
|
---|
55 | }
|
---|
56 |
|
---|
57 | extern __inline __m256i
|
---|
58 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
59 | _mm256_madd52lo_epu64 (__m256i __X, __m256i __Y, __m256i __Z)
|
---|
60 | {
|
---|
61 | return (__m256i) __builtin_ia32_vpmadd52luq256_mask ((__v4di) __X,
|
---|
62 | (__v4di) __Y,
|
---|
63 | (__v4di) __Z,
|
---|
64 | (__mmask8) -1);
|
---|
65 | }
|
---|
66 |
|
---|
67 | extern __inline __m256i
|
---|
68 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
69 | _mm256_madd52hi_epu64 (__m256i __X, __m256i __Y, __m256i __Z)
|
---|
70 | {
|
---|
71 | return (__m256i) __builtin_ia32_vpmadd52huq256_mask ((__v4di) __X,
|
---|
72 | (__v4di) __Y,
|
---|
73 | (__v4di) __Z,
|
---|
74 | (__mmask8) -1);
|
---|
75 | }
|
---|
76 |
|
---|
77 | extern __inline __m128i
|
---|
78 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
79 | _mm_mask_madd52lo_epu64 (__m128i __W, __mmask8 __M, __m128i __X, __m128i __Y)
|
---|
80 | {
|
---|
81 | return (__m128i) __builtin_ia32_vpmadd52luq128_mask ((__v2di) __W,
|
---|
82 | (__v2di) __X,
|
---|
83 | (__v2di) __Y,
|
---|
84 | (__mmask8) __M);
|
---|
85 | }
|
---|
86 |
|
---|
87 | extern __inline __m128i
|
---|
88 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
89 | _mm_mask_madd52hi_epu64 (__m128i __W, __mmask8 __M, __m128i __X, __m128i __Y)
|
---|
90 | {
|
---|
91 | return (__m128i) __builtin_ia32_vpmadd52huq128_mask ((__v2di) __W,
|
---|
92 | (__v2di) __X,
|
---|
93 | (__v2di) __Y,
|
---|
94 | (__mmask8) __M);
|
---|
95 | }
|
---|
96 |
|
---|
97 | extern __inline __m256i
|
---|
98 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
99 | _mm256_mask_madd52lo_epu64 (__m256i __W, __mmask8 __M, __m256i __X,
|
---|
100 | __m256i __Y)
|
---|
101 | {
|
---|
102 | return (__m256i) __builtin_ia32_vpmadd52luq256_mask ((__v4di) __W,
|
---|
103 | (__v4di) __X,
|
---|
104 | (__v4di) __Y,
|
---|
105 | (__mmask8) __M);
|
---|
106 | }
|
---|
107 |
|
---|
108 | extern __inline __m256i
|
---|
109 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
110 | _mm256_mask_madd52hi_epu64 (__m256i __W, __mmask8 __M, __m256i __X,
|
---|
111 | __m256i __Y)
|
---|
112 | {
|
---|
113 | return (__m256i) __builtin_ia32_vpmadd52huq256_mask ((__v4di) __W,
|
---|
114 | (__v4di) __X,
|
---|
115 | (__v4di) __Y,
|
---|
116 | (__mmask8) __M);
|
---|
117 | }
|
---|
118 |
|
---|
119 | extern __inline __m128i
|
---|
120 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
121 | _mm_maskz_madd52lo_epu64 (__mmask8 __M, __m128i __X, __m128i __Y, __m128i __Z)
|
---|
122 | {
|
---|
123 | return (__m128i) __builtin_ia32_vpmadd52luq128_maskz ((__v2di) __X,
|
---|
124 | (__v2di) __Y,
|
---|
125 | (__v2di) __Z,
|
---|
126 | (__mmask8) __M);
|
---|
127 | }
|
---|
128 |
|
---|
129 | extern __inline __m128i
|
---|
130 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
131 | _mm_maskz_madd52hi_epu64 (__mmask8 __M, __m128i __X, __m128i __Y, __m128i __Z)
|
---|
132 | {
|
---|
133 | return (__m128i) __builtin_ia32_vpmadd52huq128_maskz ((__v2di) __X,
|
---|
134 | (__v2di) __Y,
|
---|
135 | (__v2di) __Z,
|
---|
136 | (__mmask8) __M);
|
---|
137 | }
|
---|
138 |
|
---|
139 | extern __inline __m256i
|
---|
140 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
141 | _mm256_maskz_madd52lo_epu64 (__mmask8 __M, __m256i __X, __m256i __Y, __m256i __Z)
|
---|
142 | {
|
---|
143 | return (__m256i) __builtin_ia32_vpmadd52luq256_maskz ((__v4di) __X,
|
---|
144 | (__v4di) __Y,
|
---|
145 | (__v4di) __Z,
|
---|
146 | (__mmask8) __M);
|
---|
147 | }
|
---|
148 |
|
---|
149 | extern __inline __m256i
|
---|
150 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
151 | _mm256_maskz_madd52hi_epu64 (__mmask8 __M, __m256i __X, __m256i __Y, __m256i __Z)
|
---|
152 | {
|
---|
153 | return (__m256i) __builtin_ia32_vpmadd52huq256_maskz ((__v4di) __X,
|
---|
154 | (__v4di) __Y,
|
---|
155 | (__v4di) __Z,
|
---|
156 | (__mmask8) __M);
|
---|
157 | }
|
---|
158 |
|
---|
159 | #ifdef __DISABLE_AVX512IFMAVL__
|
---|
160 | #undef __DISABLE_AVX512IFMAVL__
|
---|
161 | #pragma GCC pop_options
|
---|
162 | #endif /* __DISABLE_AVX512IFMAVL__ */
|
---|
163 |
|
---|
164 | #endif /* _AVX512IFMAVLINTRIN_H_INCLUDED */
|
---|