1  /* { dg-do run } */
       2  /* { dg-options "-O2 -mavx512f" } */
       3  /* { dg-require-effective-target avx512f } */
       4  
       5  #include "avx512f-check.h"
       6  
       7  static __m512
       8  __attribute__ ((noinline))
       9  foo (float *v)
      10  {
      11    return _mm512_set_ps (v[15], v[14], v[13], v[12],
      12  			v[11], v[10], v[9], v[8],
      13  			v[7], v[6], v[5], v[4],
      14  			v[3], v[2], v[1], v[0]);
      15  }
      16  
      17  static __m512
      18  __attribute__ ((noinline))
      19  foo_r (float *v)
      20  {
      21    return _mm512_setr_ps (v[0], v[1], v[2], v[3],
      22  			 v[4], v[5], v[6], v[7],
      23  			 v[8], v[9], v[10], v[11],
      24  			 v[12], v[13], v[14], v[15]);
      25  }
      26  
      27  static void
      28  avx512f_test (void)
      29  {
      30    float v[16] = { -3.3, 2.6, 1.48, 9.104, -23.9, 17, -13.48, 4,
      31  		  69.78, 0.33, 81, 0.4, -8.9, -173.37, 0.8, 68 };
      32    union512 res;
      33  
      34    res.x = foo (v);
      35  
      36    if (check_union512 (res, v))
      37      abort ();
      38  
      39    res.x = _mm512_setzero_ps ();
      40  
      41    res.x = foo_r (v);
      42  
      43    if (check_union512 (res, v))
      44      abort ();
      45  }