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