(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
pr89523-7.c
       1  /* { dg-do compile { target { ! ia32 } } } */
       2  /* { dg-require-effective-target maybe_x32 } */
       3  /* { dg-options "-mx32 -O2 -mavx512f" } */
       4  /* { dg-final { scan-assembler "\tvscatter" } } */
       5  /* { dg-final { scan-assembler-not "addr32 vscatter" } } */
       6  
       7  typedef int __v8si __attribute__ ((__vector_size__ (32)));
       8  typedef double __v8df __attribute__ ((__vector_size__ (64)));
       9  typedef long long __m256i __attribute__ ((__vector_size__ (32),
      10  					  __may_alias__));
      11  typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
      12  typedef unsigned char  __mmask8;
      13  
      14  extern __inline void
      15  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
      16  _mm512_i32scatter_pd (void *__addr, __m256i __index, __m512d __v1,
      17  		      int __scale)
      18  {
      19    __builtin_ia32_scattersiv8df (__addr, (__mmask8) 0xFF,
      20  				(__v8si) __index, (__v8df) __v1, __scale);
      21  }
      22  
      23  extern __inline void
      24  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
      25  _mm512_mask_i32scatter_pd (void *__addr, __mmask8 __mask,
      26  			   __m256i __index, __m512d __v1, int __scale)
      27  {
      28    __builtin_ia32_scattersiv8df (__addr, __mask, (__v8si) __index,
      29  				(__v8df) __v1, __scale);
      30  }
      31  
      32  volatile __m512d src;
      33  volatile __m256i idx;
      34  volatile __mmask8 m8;
      35  double *addr;
      36  
      37  void extern
      38  avx512f_test (void)
      39  {
      40    _mm512_i32scatter_pd (addr, idx, src, 8);
      41    _mm512_mask_i32scatter_pd (addr, m8, idx, src, 8);
      42  }