2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-set-v8df-3.c
blob751af67037889b33e4ef331c68e96b833f11a0d4
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 x)
11 return _mm512_set_pd (x, x, x, x, x, x, x, x);
14 static __m512d
15 __attribute__ ((noinline))
16 foo_r (double x)
18 return _mm512_setr_pd (x, x, x, x, x, x, x, x);
21 static void
22 avx512f_test (void)
24 int i;
25 double e = 34.5;
26 double v[8];
27 union512d res;
29 for (i = 0; i < 8; i++)
30 v[i] = e;
32 res.x = foo (e);
34 if (check_union512d (res, v))
35 abort ();
37 res.x = _mm512_setzero_pd ();
39 res.x = foo_r (e);
41 if (check_union512d (res, v))
42 abort ();