blob: b8bcf49c6b249c3a2ebe896d1a8b37d5c290f53b [file] [log] [blame]
Will Osborn01c46f32020-04-21 09:13:26 +01001/*===------------- avx512pfintrin.h - PF intrinsics ------------------------===
2 *
3 *
4 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 * See https://llvm.org/LICENSE.txt for license information.
6 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 *
8 *===-----------------------------------------------------------------------===
9 */
10#ifndef __IMMINTRIN_H
11#error "Never use <avx512pfintrin.h> directly; include <immintrin.h> instead."
12#endif
13
14#ifndef __AVX512PFINTRIN_H
15#define __AVX512PFINTRIN_H
16
17/* Define the default attributes for the functions in this file. */
18#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512pf")))
19
20#define _mm512_mask_prefetch_i32gather_pd(index, mask, addr, scale, hint) \
21 __builtin_ia32_gatherpfdpd((__mmask8)(mask), (__v8si)(__m256i)(index), \
22 (void const *)(addr), (int)(scale), \
23 (int)(hint))
24
25#define _mm512_prefetch_i32gather_pd(index, addr, scale, hint) \
26 __builtin_ia32_gatherpfdpd((__mmask8) -1, (__v8si)(__m256i)(index), \
27 (void const *)(addr), (int)(scale), \
28 (int)(hint))
29
30#define _mm512_mask_prefetch_i32gather_ps(index, mask, addr, scale, hint) \
31 __builtin_ia32_gatherpfdps((__mmask16)(mask), \
32 (__v16si)(__m512i)(index), (void const *)(addr), \
33 (int)(scale), (int)(hint))
34
35#define _mm512_prefetch_i32gather_ps(index, addr, scale, hint) \
36 __builtin_ia32_gatherpfdps((__mmask16) -1, \
37 (__v16si)(__m512i)(index), (void const *)(addr), \
38 (int)(scale), (int)(hint))
39
40#define _mm512_mask_prefetch_i64gather_pd(index, mask, addr, scale, hint) \
41 __builtin_ia32_gatherpfqpd((__mmask8)(mask), (__v8di)(__m512i)(index), \
42 (void const *)(addr), (int)(scale), \
43 (int)(hint))
44
45#define _mm512_prefetch_i64gather_pd(index, addr, scale, hint) \
46 __builtin_ia32_gatherpfqpd((__mmask8) -1, (__v8di)(__m512i)(index), \
47 (void const *)(addr), (int)(scale), \
48 (int)(hint))
49
50#define _mm512_mask_prefetch_i64gather_ps(index, mask, addr, scale, hint) \
51 __builtin_ia32_gatherpfqps((__mmask8)(mask), (__v8di)(__m512i)(index), \
52 (void const *)(addr), (int)(scale), (int)(hint))
53
54#define _mm512_prefetch_i64gather_ps(index, addr, scale, hint) \
55 __builtin_ia32_gatherpfqps((__mmask8) -1, (__v8di)(__m512i)(index), \
56 (void const *)(addr), (int)(scale), (int)(hint))
57
58#define _mm512_prefetch_i32scatter_pd(addr, index, scale, hint) \
59 __builtin_ia32_scatterpfdpd((__mmask8)-1, (__v8si)(__m256i)(index), \
60 (void *)(addr), (int)(scale), \
61 (int)(hint))
62
63#define _mm512_mask_prefetch_i32scatter_pd(addr, mask, index, scale, hint) \
64 __builtin_ia32_scatterpfdpd((__mmask8)(mask), (__v8si)(__m256i)(index), \
65 (void *)(addr), (int)(scale), \
66 (int)(hint))
67
68#define _mm512_prefetch_i32scatter_ps(addr, index, scale, hint) \
69 __builtin_ia32_scatterpfdps((__mmask16)-1, (__v16si)(__m512i)(index), \
70 (void *)(addr), (int)(scale), (int)(hint))
71
72#define _mm512_mask_prefetch_i32scatter_ps(addr, mask, index, scale, hint) \
73 __builtin_ia32_scatterpfdps((__mmask16)(mask), \
74 (__v16si)(__m512i)(index), (void *)(addr), \
75 (int)(scale), (int)(hint))
76
77#define _mm512_prefetch_i64scatter_pd(addr, index, scale, hint) \
78 __builtin_ia32_scatterpfqpd((__mmask8)-1, (__v8di)(__m512i)(index), \
79 (void *)(addr), (int)(scale), \
80 (int)(hint))
81
82#define _mm512_mask_prefetch_i64scatter_pd(addr, mask, index, scale, hint) \
83 __builtin_ia32_scatterpfqpd((__mmask8)(mask), (__v8di)(__m512i)(index), \
84 (void *)(addr), (int)(scale), \
85 (int)(hint))
86
87#define _mm512_prefetch_i64scatter_ps(addr, index, scale, hint) \
88 __builtin_ia32_scatterpfqps((__mmask8)-1, (__v8di)(__m512i)(index), \
89 (void *)(addr), (int)(scale), (int)(hint))
90
91#define _mm512_mask_prefetch_i64scatter_ps(addr, mask, index, scale, hint) \
92 __builtin_ia32_scatterpfqps((__mmask8)(mask), (__v8di)(__m512i)(index), \
93 (void *)(addr), (int)(scale), (int)(hint))
94
95#undef __DEFAULT_FN_ATTRS
96
97#endif