(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
avx512f-set-v8df-1.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O2 -mavx512f" } */
       3  /* { dg-require-effective-target avx512f } */
       4  
       5  #include "avx512f-check.h"
       6  
       7  static __m512d
       8  __attribute__ ((noinline))
       9  foo (double *v)
      10  {
      11    return _mm512_set_pd (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
      12  }
      13  
      14  static __m512d
      15  __attribute__ ((noinline))
      16  foo_r (double *v)
      17  {
      18    return _mm512_setr_pd (v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);
      19  }
      20  
      21  static void
      22  avx512f_test (void)
      23  {
      24    double v[8] = { -3.3, 2.6, 1.48, 9.104, -23.9, -173.37, -13.48, 69.78 };
      25    union512d res;
      26  
      27    res.x = foo (v);
      28  
      29    if (check_union512d (res, v))
      30      abort ();
      31  
      32    res.x = _mm512_setzero_pd ();
      33  
      34    res.x = foo_r (v);
      35  
      36    if (check_union512d (res, v))
      37      abort ();
      38  }