1/* { dg-do run } */
2/* { dg-require-effective-target avx } */
3/* { dg-options "-O2 -mavx" } */
4
5#include "avx-check.h"
6
7static __m256i
8__attribute__((noinline))
9foo (short x)
10{
11  return _mm256_set_epi16 (x, x, x, x, x, x, x, x,
12			   x, x, x, x, x, x, x, x);
13}
14
15static void
16avx_test (void)
17{
18  short e = 345;
19  short v[16];
20  union256i_w u;
21  int i;
22
23  for (i = 0; i < ARRAY_SIZE (v); i++)
24    v[i] = e;
25  u.x = foo (e);
26  if (check_union256i_w (u, v))
27    abort ();
28}
29