(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
avx512fp16-2c.c
       1  /* { dg-do run { target avx512fp16 } } */
       2  /* { dg-options "-O2 -mavx512fp16" } */
       3  
       4  #include <string.h>
       5  
       6  static void do_test (void);
       7  
       8  #define DO_TEST do_test
       9  #define AVX512FP16
      10  #include "avx512-check.h"
      11  #include "avx512fp16-2a.c"
      12  
      13  __m256h
      14  __attribute__ ((noinline,noclone))
      15  foo3 (__m256h x)
      16  {
      17    return foo1(x[0]);
      18  }
      19  
      20  static void
      21  do_test (void)
      22  {
      23    _Float16 x = 25.3;
      24    union256h u = { x, 3.5f, -5.9f, 0.0f, 0.0f, 0.0f, 7.7f, 0.0f,
      25  		  4.0f, -4.20f, 0.0f, 0.0f, 0.0f, -8.7f, 0.0f, 0.0f };
      26  
      27    union256h exp = { x, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
      28  		    0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
      29    __m256h v;
      30    union256h a;
      31    memset (&v, -1, sizeof (v));
      32    v = foo3 (u.x);
      33    a.x = v;
      34    if (check_union256h (a, exp.a))
      35      abort ();
      36  }