2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-set-v16sf-3.c
blob7ec166a588650a88336afc924ea3abd1de1724f1
1 /* { dg-do run } */
2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
5 #include "avx512f-check.h"
7 static __m512
8 __attribute__ ((noinline))
9 foo (float x)
11 return _mm512_set_ps (x, x, x, x, x, x, x, x,
12 x, x, x, x, x, x, x, x);
15 static __m512
16 __attribute__ ((noinline))
17 foo_r (float x)
19 return _mm512_setr_ps (x, x, x, x, x, x, x, x,
20 x, x, x, x, x, x, x, x);
23 static void
24 avx512f_test (void)
26 int i;
27 float e = 34.5;
28 float v[16];
29 union512 res;
31 for (i = 0; i < 16; i++)
32 v[i] = e;
34 res.x = foo (e);
36 if (check_union512 (res, v))
37 abort ();
39 res.x = _mm512_setzero_ps ();
41 res.x = foo_r (e);
43 if (check_union512 (res, v))
44 abort ();