1 /*===------------- avx512pfintrin.h - PF intrinsics ------------------------===
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
8 *===-----------------------------------------------------------------------===
11 #error "Never use <avx512pfintrin.h> directly; include <immintrin.h> instead."
14 #ifndef __AVX512PFINTRIN_H
15 #define __AVX512PFINTRIN_H
17 /* Define the default attributes for the functions in this file. */
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512pf")))
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), \
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), \
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))
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))
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), \
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), \
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))
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))
58 #define _mm512_prefetch_i32scatter_pd(addr, index, scale, hint) \
59 __builtin_ia32_scatterpfdpd((__mmask8)-1, (__v8si)(__m256i)(index), \
60 (void *)(addr), (int)(scale), \
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), \
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))
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))
77 #define _mm512_prefetch_i64scatter_pd(addr, index, scale, hint) \
78 __builtin_ia32_scatterpfqpd((__mmask8)-1, (__v8di)(__m512i)(index), \
79 (void *)(addr), (int)(scale), \
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), \
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))
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))
95 #undef __DEFAULT_FN_ATTRS