(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
pr89523-8.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 long long __v8di __attribute__ ((__vector_size__ (64)));
       8  typedef double __v8df __attribute__ ((__vector_size__ (64)));
       9  typedef long long __m512i __attribute__ ((__vector_size__ (64), __may_alias__));
      10  typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
      11  typedef unsigned char  __mmask8;
      12  
      13  extern __inline void
      14  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
      15  _mm512_i64scatter_pd (void *__addr, __m512i __index, __m512d __v1,
      16  		      int __scale)
      17  {
      18    __builtin_ia32_scatterdiv8df (__addr, (__mmask8) 0xFF,
      19  				(__v8di) __index, (__v8df) __v1, __scale);
      20  }
      21  
      22  extern __inline void
      23  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
      24  _mm512_mask_i64scatter_pd (void *__addr, __mmask8 __mask,
      25  			   __m512i __index, __m512d __v1, int __scale)
      26  {
      27    __builtin_ia32_scatterdiv8df (__addr, __mask, (__v8di) __index,
      28  				(__v8df) __v1, __scale);
      29  }
      30  
      31  volatile __m512d src;
      32  volatile __m512i idx;
      33  volatile __mmask8 m8;
      34  double *addr;
      35  
      36  void extern
      37  avx512f_test (void)
      38  {
      39    _mm512_i64scatter_pd (addr, idx, src, 8);
      40    _mm512_mask_i64scatter_pd (addr, m8, idx, src, 8);
      41  }