PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-set-v8di-3.c
blob16e12c7f1a97aca7523f72d86a9ba187aef500c8
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 (long long x)
11 return _mm512_set_epi64 (x, x, x, x, x, x, x, x);
14 static __m512i
15 __attribute__ ((noinline))
16 foo_r (long long x)
18 return _mm512_setr_epi64 (x, x, x, x, x, x, x, x);
21 static void
22 avx512f_test (void)
24 int i;
25 long long e = 0xfed178ab134badf1LL;
26 long long v[8];
27 union512i_q res;
29 for (i = 0; i < 8; i++)
30 v[i] = e;
32 res.x = foo (e);
34 if (check_union512i_q (res, v))
35 abort ();
37 res.x = _mm512_setzero_si512 ();
39 res.x = foo_r (e);
41 if (check_union512i_q (res, v))
42 abort ();