PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-set-v8di-2.c
blobfd033ce24e0584145e1ba36001b947708c15e48f
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 x1, long long x2, long long x3, long long x4,
10 long long x5, long long x6, long long x7, long long x8)
12 return _mm512_set_epi64 (x1, x2, x3, x4, x5, x6, x7, x8);
15 static __m512i
16 __attribute__ ((noinline))
17 foo_r (long long x1, long long x2, long long x3, long long x4,
18 long long x5, long long x6, long long x7, long long x8)
20 return _mm512_setr_epi64 (x8, x7, x6, x5, x4, x3, x2, x1);
23 static void
24 avx512f_test (void)
26 long long v[8] = { 0x12e9e94645ad8LL, 0x851c0b39446LL, 2134, 6678,
27 0x786784645245LL, 0x9487731234LL, 41124, 86530 };
28 union512i_q res;
30 res.x = foo (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
32 if (check_union512i_q (res, v))
33 abort ();
35 res.x = _mm512_setzero_si512 ();
37 res.x = foo_r (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
39 if (check_union512i_q (res, v))
40 abort ();