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