1 // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -target-feature +avx512er -emit-llvm -o - -Wall -Werror | FileCheck %s
2
3
4 #include <immintrin.h>
5
test_mm512_rsqrt28_round_pd(__m512d a)6 __m512d test_mm512_rsqrt28_round_pd(__m512d a) {
7 // CHECK-LABEL: @test_mm512_rsqrt28_round_pd
8 // CHECK: @llvm.x86.avx512.rsqrt28.pd
9 return _mm512_rsqrt28_round_pd(a, _MM_FROUND_NO_EXC);
10 }
11
test_mm512_mask_rsqrt28_round_pd(__m512d s,__mmask8 m,__m512d a)12 __m512d test_mm512_mask_rsqrt28_round_pd(__m512d s, __mmask8 m, __m512d a) {
13 // CHECK-LABEL: @test_mm512_mask_rsqrt28_round_pd
14 // CHECK: @llvm.x86.avx512.rsqrt28.pd
15 return _mm512_mask_rsqrt28_round_pd(s, m, a, _MM_FROUND_NO_EXC);
16 }
17
test_mm512_maskz_rsqrt28_round_pd(__mmask8 m,__m512d a)18 __m512d test_mm512_maskz_rsqrt28_round_pd(__mmask8 m, __m512d a) {
19 // CHECK-LABEL: @test_mm512_maskz_rsqrt28_round_pd
20 // CHECK: @llvm.x86.avx512.rsqrt28.pd
21 return _mm512_maskz_rsqrt28_round_pd(m, a, _MM_FROUND_NO_EXC);
22 }
23
test_mm512_rsqrt28_pd(__m512d a)24 __m512d test_mm512_rsqrt28_pd(__m512d a) {
25 // CHECK-LABEL: @test_mm512_rsqrt28_pd
26 // CHECK: @llvm.x86.avx512.rsqrt28.pd
27 return _mm512_rsqrt28_pd(a);
28 }
29
test_mm512_mask_rsqrt28_pd(__m512d s,__mmask8 m,__m512d a)30 __m512d test_mm512_mask_rsqrt28_pd(__m512d s, __mmask8 m, __m512d a) {
31 // CHECK-LABEL: @test_mm512_mask_rsqrt28_pd
32 // CHECK: @llvm.x86.avx512.rsqrt28.pd
33 return _mm512_mask_rsqrt28_pd(s, m, a);
34 }
35
test_mm512_maskz_rsqrt28_pd(__mmask8 m,__m512d a)36 __m512d test_mm512_maskz_rsqrt28_pd(__mmask8 m, __m512d a) {
37 // CHECK-LABEL: @test_mm512_maskz_rsqrt28_pd
38 // CHECK: @llvm.x86.avx512.rsqrt28.pd
39 return _mm512_maskz_rsqrt28_pd(m, a);
40 }
41
test_mm512_rsqrt28_round_ps(__m512 a)42 __m512 test_mm512_rsqrt28_round_ps(__m512 a) {
43 // CHECK-LABEL: @test_mm512_rsqrt28_round_ps
44 // CHECK: @llvm.x86.avx512.rsqrt28.ps
45 return _mm512_rsqrt28_round_ps(a, _MM_FROUND_NO_EXC);
46 }
47
test_mm512_mask_rsqrt28_round_ps(__m512 s,__mmask16 m,__m512 a)48 __m512 test_mm512_mask_rsqrt28_round_ps(__m512 s, __mmask16 m, __m512 a) {
49 // CHECK-LABEL: @test_mm512_mask_rsqrt28_round_ps
50 // CHECK: @llvm.x86.avx512.rsqrt28.ps
51 return _mm512_mask_rsqrt28_round_ps(s, m, a, _MM_FROUND_NO_EXC);
52 }
53
test_mm512_maskz_rsqrt28_round_ps(__mmask16 m,__m512 a)54 __m512 test_mm512_maskz_rsqrt28_round_ps(__mmask16 m, __m512 a) {
55 // CHECK-LABEL: @test_mm512_maskz_rsqrt28_round_ps
56 // CHECK: @llvm.x86.avx512.rsqrt28.ps
57 return _mm512_maskz_rsqrt28_round_ps(m, a, _MM_FROUND_NO_EXC);
58 }
59
test_mm512_rsqrt28_ps(__m512 a)60 __m512 test_mm512_rsqrt28_ps(__m512 a) {
61 // CHECK-LABEL: @test_mm512_rsqrt28_ps
62 // CHECK: @llvm.x86.avx512.rsqrt28.ps
63 return _mm512_rsqrt28_ps(a);
64 }
65
test_mm512_mask_rsqrt28_ps(__m512 s,__mmask16 m,__m512 a)66 __m512 test_mm512_mask_rsqrt28_ps(__m512 s, __mmask16 m, __m512 a) {
67 // CHECK-LABEL: @test_mm512_mask_rsqrt28_ps
68 // CHECK: @llvm.x86.avx512.rsqrt28.ps
69 return _mm512_mask_rsqrt28_ps(s, m, a);
70 }
71
test_mm512_maskz_rsqrt28_ps(__mmask16 m,__m512 a)72 __m512 test_mm512_maskz_rsqrt28_ps(__mmask16 m, __m512 a) {
73 // CHECK-LABEL: @test_mm512_maskz_rsqrt28_ps
74 // CHECK: @llvm.x86.avx512.rsqrt28.ps
75 return _mm512_maskz_rsqrt28_ps(m, a);
76 }
77
test_mm_rsqrt28_round_ss(__m128 a,__m128 b)78 __m128 test_mm_rsqrt28_round_ss(__m128 a, __m128 b) {
79 // CHECK-LABEL: @test_mm_rsqrt28_round_ss
80 // CHECK: @llvm.x86.avx512.rsqrt28.ss
81 return _mm_rsqrt28_round_ss(a, b, _MM_FROUND_NO_EXC);
82 }
83
test_mm_mask_rsqrt28_round_ss(__m128 s,__mmask16 m,__m128 a,__m128 b)84 __m128 test_mm_mask_rsqrt28_round_ss(__m128 s, __mmask16 m, __m128 a, __m128 b) {
85 // CHECK-LABEL: @test_mm_mask_rsqrt28_round_ss
86 // CHECK: @llvm.x86.avx512.rsqrt28.ss
87 return _mm_mask_rsqrt28_round_ss(s, m, a, b, _MM_FROUND_NO_EXC);
88 }
89
test_mm_maskz_rsqrt28_round_ss(__mmask16 m,__m128 a,__m128 b)90 __m128 test_mm_maskz_rsqrt28_round_ss(__mmask16 m, __m128 a, __m128 b) {
91 // CHECK-LABEL: @test_mm_maskz_rsqrt28_round_ss
92 // CHECK: @llvm.x86.avx512.rsqrt28.ss
93 return _mm_maskz_rsqrt28_round_ss(m, a, b, _MM_FROUND_NO_EXC);
94 }
95
test_mm_rsqrt28_ss(__m128 a,__m128 b)96 __m128 test_mm_rsqrt28_ss(__m128 a, __m128 b) {
97 // CHECK-LABEL: @test_mm_rsqrt28_ss
98 // CHECK: @llvm.x86.avx512.rsqrt28.ss
99 return _mm_rsqrt28_ss(a, b);
100 }
101
test_mm_mask_rsqrt28_ss(__m128 s,__mmask16 m,__m128 a,__m128 b)102 __m128 test_mm_mask_rsqrt28_ss(__m128 s, __mmask16 m, __m128 a, __m128 b) {
103 // CHECK-LABEL: @test_mm_mask_rsqrt28_ss
104 // CHECK: @llvm.x86.avx512.rsqrt28.ss
105 return _mm_mask_rsqrt28_ss(s, m, a, b);
106 }
107
test_mm_maskz_rsqrt28_ss(__mmask16 m,__m128 a,__m128 b)108 __m128 test_mm_maskz_rsqrt28_ss(__mmask16 m, __m128 a, __m128 b) {
109 // CHECK-LABEL: @test_mm_maskz_rsqrt28_ss
110 // CHECK: @llvm.x86.avx512.rsqrt28.ss
111 return _mm_maskz_rsqrt28_ss(m, a, b);
112 }
113
test_mm_rsqrt28_round_sd(__m128d a,__m128d b)114 __m128d test_mm_rsqrt28_round_sd(__m128d a, __m128d b) {
115 // CHECK-LABEL: @test_mm_rsqrt28_round_sd
116 // CHECK: @llvm.x86.avx512.rsqrt28.sd
117 return _mm_rsqrt28_round_sd(a, b, _MM_FROUND_NO_EXC);
118 }
119
test_mm_mask_rsqrt28_round_sd(__m128d s,__mmask8 m,__m128d a,__m128d b)120 __m128d test_mm_mask_rsqrt28_round_sd(__m128d s, __mmask8 m, __m128d a, __m128d b) {
121 // CHECK-LABEL: @test_mm_mask_rsqrt28_round_sd
122 // CHECK: @llvm.x86.avx512.rsqrt28.sd
123 return _mm_mask_rsqrt28_round_sd(s, m, a, b, _MM_FROUND_NO_EXC);
124 }
125
test_mm_maskz_rsqrt28_round_sd(__mmask8 m,__m128d a,__m128d b)126 __m128d test_mm_maskz_rsqrt28_round_sd(__mmask8 m, __m128d a, __m128d b) {
127 // CHECK-LABEL: @test_mm_maskz_rsqrt28_round_sd
128 // CHECK: @llvm.x86.avx512.rsqrt28.sd
129 return _mm_maskz_rsqrt28_round_sd(m, a, b, _MM_FROUND_NO_EXC);
130 }
131
test_mm512_rcp28_round_pd(__m512d a)132 __m512d test_mm512_rcp28_round_pd(__m512d a) {
133 // CHECK-LABEL: @test_mm512_rcp28_round_pd
134 // CHECK: @llvm.x86.avx512.rcp28.pd
135 return _mm512_rcp28_round_pd(a, _MM_FROUND_NO_EXC);
136 }
137
test_mm512_mask_rcp28_round_pd(__m512d s,__mmask8 m,__m512d a)138 __m512d test_mm512_mask_rcp28_round_pd(__m512d s, __mmask8 m, __m512d a) {
139 // CHECK-LABEL: @test_mm512_mask_rcp28_round_pd
140 // CHECK: @llvm.x86.avx512.rcp28.pd
141 return _mm512_mask_rcp28_round_pd(s, m, a, _MM_FROUND_NO_EXC);
142 }
143
test_mm512_maskz_rcp28_round_pd(__mmask8 m,__m512d a)144 __m512d test_mm512_maskz_rcp28_round_pd(__mmask8 m, __m512d a) {
145 // CHECK-LABEL: @test_mm512_maskz_rcp28_round_pd
146 // CHECK: @llvm.x86.avx512.rcp28.pd
147 return _mm512_maskz_rcp28_round_pd(m, a, _MM_FROUND_NO_EXC);
148 }
149
test_mm512_rcp28_pd(__m512d a)150 __m512d test_mm512_rcp28_pd(__m512d a) {
151 // CHECK-LABEL: @test_mm512_rcp28_pd
152 // CHECK: @llvm.x86.avx512.rcp28.pd
153 return _mm512_rcp28_pd(a);
154 }
155
test_mm512_mask_rcp28_pd(__m512d s,__mmask8 m,__m512d a)156 __m512d test_mm512_mask_rcp28_pd(__m512d s, __mmask8 m, __m512d a) {
157 // CHECK-LABEL: @test_mm512_mask_rcp28_pd
158 // CHECK: @llvm.x86.avx512.rcp28.pd
159 return _mm512_mask_rcp28_pd(s, m, a);
160 }
161
test_mm512_maskz_rcp28_pd(__mmask8 m,__m512d a)162 __m512d test_mm512_maskz_rcp28_pd(__mmask8 m, __m512d a) {
163 // CHECK-LABEL: @test_mm512_maskz_rcp28_pd
164 // CHECK: @llvm.x86.avx512.rcp28.pd
165 return _mm512_maskz_rcp28_pd(m, a);
166 }
167
test_mm512_rcp28_round_ps(__m512 a)168 __m512 test_mm512_rcp28_round_ps(__m512 a) {
169 // CHECK-LABEL: @test_mm512_rcp28_round_ps
170 // CHECK: @llvm.x86.avx512.rcp28.ps
171 return _mm512_rcp28_round_ps(a, _MM_FROUND_NO_EXC);
172 }
173
test_mm512_mask_rcp28_round_ps(__m512 s,__mmask16 m,__m512 a)174 __m512 test_mm512_mask_rcp28_round_ps(__m512 s, __mmask16 m, __m512 a) {
175 // CHECK-LABEL: @test_mm512_mask_rcp28_round_ps
176 // CHECK: @llvm.x86.avx512.rcp28.ps
177 return _mm512_mask_rcp28_round_ps(s, m, a, _MM_FROUND_NO_EXC);
178 }
179
test_mm512_maskz_rcp28_round_ps(__mmask16 m,__m512 a)180 __m512 test_mm512_maskz_rcp28_round_ps(__mmask16 m, __m512 a) {
181 // CHECK-LABEL: @test_mm512_maskz_rcp28_round_ps
182 // CHECK: @llvm.x86.avx512.rcp28.ps
183 return _mm512_maskz_rcp28_round_ps(m, a, _MM_FROUND_NO_EXC);
184 }
185
test_mm512_rcp28_ps(__m512 a)186 __m512 test_mm512_rcp28_ps(__m512 a) {
187 // CHECK-LABEL: @test_mm512_rcp28_ps
188 // CHECK: @llvm.x86.avx512.rcp28.ps
189 return _mm512_rcp28_ps(a);
190 }
191
test_mm512_mask_rcp28_ps(__m512 s,__mmask16 m,__m512 a)192 __m512 test_mm512_mask_rcp28_ps(__m512 s, __mmask16 m, __m512 a) {
193 // CHECK-LABEL: @test_mm512_mask_rcp28_ps
194 // CHECK: @llvm.x86.avx512.rcp28.ps
195 return _mm512_mask_rcp28_ps(s, m, a);
196 }
197
test_mm512_maskz_rcp28_ps(__mmask16 m,__m512 a)198 __m512 test_mm512_maskz_rcp28_ps(__mmask16 m, __m512 a) {
199 // CHECK-LABEL: @test_mm512_maskz_rcp28_ps
200 // CHECK: @llvm.x86.avx512.rcp28.ps
201 return _mm512_maskz_rcp28_ps(m, a);
202 }
203
test_mm_rcp28_round_ss(__m128 a,__m128 b)204 __m128 test_mm_rcp28_round_ss(__m128 a, __m128 b) {
205 // CHECK-LABEL: @test_mm_rcp28_round_ss
206 // CHECK: @llvm.x86.avx512.rcp28.ss
207 return _mm_rcp28_round_ss(a, b, _MM_FROUND_NO_EXC);
208 }
209
test_mm_mask_rcp28_round_ss(__m128 s,__mmask16 m,__m128 a,__m128 b)210 __m128 test_mm_mask_rcp28_round_ss(__m128 s, __mmask16 m, __m128 a, __m128 b) {
211 // CHECK-LABEL: @test_mm_mask_rcp28_round_ss
212 // CHECK: @llvm.x86.avx512.rcp28.ss
213 return _mm_mask_rcp28_round_ss(s, m, a, b, _MM_FROUND_NO_EXC);
214 }
215
test_mm_maskz_rcp28_round_ss(__mmask16 m,__m128 a,__m128 b)216 __m128 test_mm_maskz_rcp28_round_ss(__mmask16 m, __m128 a, __m128 b) {
217 // CHECK-LABEL: @test_mm_maskz_rcp28_round_ss
218 // CHECK: @llvm.x86.avx512.rcp28.ss
219 return _mm_maskz_rcp28_round_ss(m, a, b, _MM_FROUND_NO_EXC);
220 }
221
test_mm_rcp28_ss(__m128 a,__m128 b)222 __m128 test_mm_rcp28_ss(__m128 a, __m128 b) {
223 // CHECK-LABEL: @test_mm_rcp28_ss
224 // CHECK: @llvm.x86.avx512.rcp28.ss
225 return _mm_rcp28_ss(a, b);
226 }
227
test_mm_mask_rcp28_ss(__m128 s,__mmask16 m,__m128 a,__m128 b)228 __m128 test_mm_mask_rcp28_ss(__m128 s, __mmask16 m, __m128 a, __m128 b) {
229 // CHECK-LABEL: @test_mm_mask_rcp28_ss
230 // CHECK: @llvm.x86.avx512.rcp28.ss
231 return _mm_mask_rcp28_ss(s, m, a, b);
232 }
233
test_mm_maskz_rcp28_ss(__mmask16 m,__m128 a,__m128 b)234 __m128 test_mm_maskz_rcp28_ss(__mmask16 m, __m128 a, __m128 b) {
235 // CHECK-LABEL: @test_mm_maskz_rcp28_ss
236 // CHECK: @llvm.x86.avx512.rcp28.ss
237 return _mm_maskz_rcp28_ss(m, a, b);
238 }
239
test_mm_rcp28_round_sd(__m128d a,__m128d b)240 __m128d test_mm_rcp28_round_sd(__m128d a, __m128d b) {
241 // CHECK-LABEL: @test_mm_rcp28_round_sd
242 // CHECK: @llvm.x86.avx512.rcp28.sd
243 return _mm_rcp28_round_sd(a, b, _MM_FROUND_NO_EXC);
244 }
245
test_mm_mask_rcp28_round_sd(__m128d s,__mmask8 m,__m128d a,__m128d b)246 __m128d test_mm_mask_rcp28_round_sd(__m128d s, __mmask8 m, __m128d a, __m128d b) {
247 // CHECK-LABEL: @test_mm_mask_rcp28_round_sd
248 // CHECK: @llvm.x86.avx512.rcp28.sd
249 return _mm_mask_rcp28_round_sd(s, m, a, b, _MM_FROUND_NO_EXC);
250 }
251
test_mm_maskz_rcp28_round_sd(__mmask8 m,__m128d a,__m128d b)252 __m128d test_mm_maskz_rcp28_round_sd(__mmask8 m, __m128d a, __m128d b) {
253 // CHECK-LABEL: @test_mm_maskz_rcp28_round_sd
254 // CHECK: @llvm.x86.avx512.rcp28.sd
255 return _mm_maskz_rcp28_round_sd(m, a, b, _MM_FROUND_NO_EXC);
256 }
257
test_mm_rcp28_sd(__m128d a,__m128d b)258 __m128d test_mm_rcp28_sd(__m128d a, __m128d b) {
259 // CHECK-LABEL: @test_mm_rcp28_sd
260 // CHECK: @llvm.x86.avx512.rcp28.sd
261 return _mm_rcp28_sd(a, b);
262 }
263
test_mm_mask_rcp28_sd(__m128d s,__mmask8 m,__m128d a,__m128d b)264 __m128d test_mm_mask_rcp28_sd(__m128d s, __mmask8 m, __m128d a, __m128d b) {
265 // CHECK-LABEL: @test_mm_mask_rcp28_sd
266 // CHECK: @llvm.x86.avx512.rcp28.sd
267 return _mm_mask_rcp28_sd(s, m, a, b);
268 }
269
test_mm_maskz_rcp28_sd(__mmask8 m,__m128d a,__m128d b)270 __m128d test_mm_maskz_rcp28_sd(__mmask8 m, __m128d a, __m128d b) {
271 // CHECK-LABEL: @test_mm_maskz_rcp28_sd
272 // CHECK: @llvm.x86.avx512.rcp28.sd
273 return _mm_maskz_rcp28_sd(m, a, b);
274 }
275
test_mm512_exp2a23_round_pd(__m512d a)276 __m512d test_mm512_exp2a23_round_pd(__m512d a) {
277 // CHECK-LABEL: @test_mm512_exp2a23_round_pd
278 // CHECK: @llvm.x86.avx512.exp2.pd
279 return _mm512_exp2a23_round_pd(a, _MM_FROUND_NO_EXC);
280 }
281
test_mm512_mask_exp2a23_round_pd(__m512d s,__mmask8 m,__m512d a)282 __m512d test_mm512_mask_exp2a23_round_pd(__m512d s, __mmask8 m, __m512d a) {
283 // CHECK-LABEL: @test_mm512_mask_exp2a23_round_pd
284 // CHECK: @llvm.x86.avx512.exp2.pd
285 return _mm512_mask_exp2a23_round_pd(s, m, a, _MM_FROUND_NO_EXC);
286 }
287
test_mm512_maskz_exp2a23_round_pd(__mmask8 m,__m512d a)288 __m512d test_mm512_maskz_exp2a23_round_pd(__mmask8 m, __m512d a) {
289 // CHECK-LABEL: @test_mm512_maskz_exp2a23_round_pd
290 // CHECK: @llvm.x86.avx512.exp2.pd
291 return _mm512_maskz_exp2a23_round_pd(m, a, _MM_FROUND_NO_EXC);
292 }
293
test_mm512_exp2a23_pd(__m512d a)294 __m512d test_mm512_exp2a23_pd(__m512d a) {
295 // CHECK-LABEL: @test_mm512_exp2a23_pd
296 // CHECK: @llvm.x86.avx512.exp2.pd
297 return _mm512_exp2a23_pd(a);
298 }
299
test_mm512_mask_exp2a23_pd(__m512d s,__mmask8 m,__m512d a)300 __m512d test_mm512_mask_exp2a23_pd(__m512d s, __mmask8 m, __m512d a) {
301 // CHECK-LABEL: @test_mm512_mask_exp2a23_pd
302 // CHECK: @llvm.x86.avx512.exp2.pd
303 return _mm512_mask_exp2a23_pd(s, m, a);
304 }
305
test_mm512_maskz_exp2a23_pd(__mmask8 m,__m512d a)306 __m512d test_mm512_maskz_exp2a23_pd(__mmask8 m, __m512d a) {
307 // CHECK-LABEL: @test_mm512_maskz_exp2a23_pd
308 // CHECK: @llvm.x86.avx512.exp2.pd
309 return _mm512_maskz_exp2a23_pd(m, a);
310 }
311
test_mm512_exp2a23_round_ps(__m512 a)312 __m512 test_mm512_exp2a23_round_ps(__m512 a) {
313 // CHECK-LABEL: @test_mm512_exp2a23_round_ps
314 // CHECK: @llvm.x86.avx512.exp2.ps
315 return _mm512_exp2a23_round_ps(a, _MM_FROUND_NO_EXC);
316 }
317
test_mm512_mask_exp2a23_round_ps(__m512 s,__mmask16 m,__m512 a)318 __m512 test_mm512_mask_exp2a23_round_ps(__m512 s, __mmask16 m, __m512 a) {
319 // CHECK-LABEL: @test_mm512_mask_exp2a23_round_ps
320 // CHECK: @llvm.x86.avx512.exp2.ps
321 return _mm512_mask_exp2a23_round_ps(s, m, a, _MM_FROUND_NO_EXC);
322 }
323
test_mm512_maskz_exp2a23_round_ps(__mmask16 m,__m512 a)324 __m512 test_mm512_maskz_exp2a23_round_ps(__mmask16 m, __m512 a) {
325 // CHECK-LABEL: @test_mm512_maskz_exp2a23_round_ps
326 // CHECK: @llvm.x86.avx512.exp2.ps
327 return _mm512_maskz_exp2a23_round_ps(m, a, _MM_FROUND_NO_EXC);
328 }
329
test_mm512_exp2a23_ps(__m512 a)330 __m512 test_mm512_exp2a23_ps(__m512 a) {
331 // CHECK-LABEL: @test_mm512_exp2a23_ps
332 // CHECK: @llvm.x86.avx512.exp2.ps
333 return _mm512_exp2a23_ps(a);
334 }
335
test_mm512_mask_exp2a23_ps(__m512 s,__mmask16 m,__m512 a)336 __m512 test_mm512_mask_exp2a23_ps(__m512 s, __mmask16 m, __m512 a) {
337 // CHECK-LABEL: @test_mm512_mask_exp2a23_ps
338 // CHECK: @llvm.x86.avx512.exp2.ps
339 return _mm512_mask_exp2a23_ps(s, m, a);
340 }
341
test_mm512_maskz_exp2a23_ps(__mmask16 m,__m512 a)342 __m512 test_mm512_maskz_exp2a23_ps(__mmask16 m, __m512 a) {
343 // CHECK-LABEL: @test_mm512_maskz_exp2a23_ps
344 // CHECK: @llvm.x86.avx512.exp2.ps
345 return _mm512_maskz_exp2a23_ps(m, a);
346 }
347
348