Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-set-v16si-3.c
blobc02838ec349841a27c250d8fe7272e9c64888983
1 /* { dg-do run } */
2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
5 #include "avx512f-check.h"
7 static __m512i
8 __attribute__ ((noinline))
9 foo (int x)
11 return _mm512_set_epi32 (x, x, x, x, x, x, x, x,
12 x, x, x, x, x, x, x, x);
15 static __m512i
16 __attribute__ ((noinline))
17 foo_r (int x)
19 return _mm512_setr_epi32 (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 int e = 0xabadbeef;
28 int v[16];
29 union512i_d res;
31 for (i = 0; i < 16; i++)
32 v[i] = e;
34 res.x = foo (e);
36 if (check_union512i_d (res, v))
37 abort ();
39 res.x = _mm512_setzero_si512 ();
41 res.x = foo_r (e);
43 if (check_union512i_d (res, v))
44 abort ();