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