1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-require-effective-target maybe_x32 } */
3 /* { dg-options "-mx32 -O2 -mavx512pf" } */
4 /* { dg-final { scan-assembler "\tvgather" } } */
5 /* { dg-final { scan-assembler-not "addr32 vgather" } } */
6 
7 typedef int __v8si __attribute__ ((__vector_size__ (32)));
8 typedef long long __m256i __attribute__ ((__vector_size__ (32),
9 					  __may_alias__));
10 typedef unsigned char  __mmask8;
11 
12 extern __inline void
13 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_prefetch_i32gather_pd(__m256i __index,void const * __addr,int __scale,int __hint)14 _mm512_prefetch_i32gather_pd (__m256i __index, void const *__addr,
15 			      int __scale, int __hint)
16 {
17   __builtin_ia32_gatherpfdpd ((__mmask8) 0xFF, (__v8si) __index, __addr,
18 			      __scale, __hint);
19 }
20 
21 extern __inline void
22 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_prefetch_i32gather_pd(__m256i __index,__mmask8 __mask,void const * __addr,int __scale,int __hint)23 _mm512_mask_prefetch_i32gather_pd (__m256i __index, __mmask8 __mask,
24 				   void const *__addr, int __scale, int __hint)
25 {
26   __builtin_ia32_gatherpfdpd (__mask, (__v8si) __index, __addr, __scale,
27 			      __hint);
28 }
29 
30 volatile __m256i idx;
31 volatile __mmask8 m8;
32 void *base;
33 
34 void extern
avx512pf_test(void)35 avx512pf_test (void)
36 {
37   _mm512_prefetch_i32gather_pd (idx, base, 8, 3);
38   _mm512_mask_prefetch_i32gather_pd (idx, m8, base, 8, 3);
39 }
40