(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
avx512fp16-truncvnhf.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -mavx512fp16 -mavx512vl -ftree-slp-vectorize -mprefer-vector-width=512" } */
       3  
       4  extern long long di[8];
       5  extern unsigned long long udi[8];
       6  extern int si[16];
       7  extern unsigned int usi[16];
       8  extern short hi[32];
       9  extern unsigned short uhi[32];
      10  extern _Float16 hf[32];
      11  
      12  #define DO_PRAGMA(X) _Pragma(#X)
      13  
      14  #define FIX_TRUNCHFVV(size, mode)	    \
      15    void __attribute__ ((noinline, noclone))  \
      16  fix_trunc##size##hf##v##size##mode ()   \
      17  {\
      18    int i;  \
      19    DO_PRAGMA (GCC unroll size)	\
      20    for (i = 0; i < size; i++)  \
      21      mode[i] = hf[i];  \
      22  }
      23  
      24  FIX_TRUNCHFVV(32, hi)
      25  FIX_TRUNCHFVV(16, hi)
      26  FIX_TRUNCHFVV(8, hi)
      27  FIX_TRUNCHFVV(16, si)
      28  FIX_TRUNCHFVV(8, si)
      29  FIX_TRUNCHFVV(4, si)
      30  FIX_TRUNCHFVV(8, di)
      31  FIX_TRUNCHFVV(4, di)
      32  FIX_TRUNCHFVV(2, di)
      33  
      34  FIX_TRUNCHFVV(32, uhi)
      35  FIX_TRUNCHFVV(16, uhi)
      36  FIX_TRUNCHFVV(8, uhi)
      37  FIX_TRUNCHFVV(16, usi)
      38  FIX_TRUNCHFVV(8, usi)
      39  FIX_TRUNCHFVV(4, usi)
      40  FIX_TRUNCHFVV(8, udi)
      41  FIX_TRUNCHFVV(4, udi)
      42  FIX_TRUNCHFVV(2, udi)
      43  
      44  /* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      45  /* { dg-final { scan-assembler-times "vcvttph2uqq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      46  /* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      47  /* { dg-final { scan-assembler-times "vcvttph2uqq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      48  /* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      49  /* { dg-final { scan-assembler-times "vcvttph2uqq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      50  /* { dg-final { scan-assembler-times "vcvttph2dq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      51  /* { dg-final { scan-assembler-times "vcvttph2udq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      52  /* { dg-final { scan-assembler-times "vcvttph2dq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      53  /* { dg-final { scan-assembler-times "vcvttph2udq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      54  /* { dg-final { scan-assembler-times "vcvttph2dq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      55  /* { dg-final { scan-assembler-times "vcvttph2udq\[ \\t\]+\[^\{\n\]*\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      56  /* { dg-final { scan-assembler-times "vcvttph2w\[ \\t\]+\[^\{\n\]*\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      57  /* { dg-final { scan-assembler-times "vcvttph2uw\[ \\t\]+\[^\{\n\]*\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      58  /* { dg-final { scan-assembler-times "vcvttph2w\[ \\t\]+\[^\{\n\]*\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      59  /* { dg-final { scan-assembler-times "vcvttph2uw\[ \\t\]+\[^\{\n\]*\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      60  /* { dg-final { scan-assembler-times "vcvttph2w\[ \\t\]+\[^\{\n\]*\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
      61  /* { dg-final { scan-assembler-times "vcvttph2uw\[ \\t\]+\[^\{\n\]*\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */