1/* { dg-do run } */ 2/* { dg-options "-O2 -mavx512f" } */ 3/* { dg-require-effective-target avx512f } */ 4 5#include "avx512f-check.h" 6 7static __m512d 8__attribute__ ((noinline)) 9foo (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 14static __m512d 15__attribute__ ((noinline)) 16foo_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 21static void 22avx512f_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} 39