1  /* { dg-do run } */
       2  /* { dg-options "-O2 -mavx512f" } */
       3  /* { dg-require-effective-target avx512f } */
       4  
       5  #include "avx512f-check.h"
       6  
       7  static __m512i
       8  __attribute__ ((noinline))
       9  foo (long long *v)
      10  {
      11    return _mm512_set_epi64 (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
      12  }
      13  
      14  static __m512i
      15  __attribute__ ((noinline))
      16  foo_r (long long *v)
      17  {
      18    return _mm512_setr_epi64 (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    long long v[8] = { 0x12e9e94645ad8LL, 0x851c0b39446LL, 2134, 6678,
      25  		     0x786784645245LL, 0x9487731234LL, 41124, 86530 };
      26    union512i_q res;
      27  
      28    res.x = foo (v);
      29  
      30    if (check_union512i_q (res, v))
      31      abort ();
      32  
      33    res.x = _mm512_setzero_si512 ();
      34  
      35    res.x = foo_r (v);
      36  
      37    if (check_union512i_q (res, v))
      38      abort ();
      39  }