Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-set-v16sf-1.c
blob0ae82bc4138607b24963dccb196ce1bce29b4eed
1 /* { dg-do run } */
2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
5 #include "avx512f-check.h"
7 static __m512
8 __attribute__ ((noinline))
9 foo (float *v)
11 return _mm512_set_ps (v[15], v[14], v[13], v[12],
12 v[11], v[10], v[9], v[8],
13 v[7], v[6], v[5], v[4],
14 v[3], v[2], v[1], v[0]);
17 static __m512
18 __attribute__ ((noinline))
19 foo_r (float *v)
21 return _mm512_setr_ps (v[0], v[1], v[2], v[3],
22 v[4], v[5], v[6], v[7],
23 v[8], v[9], v[10], v[11],
24 v[12], v[13], v[14], v[15]);
27 static void
28 avx512f_test (void)
30 float v[16] = { -3.3, 2.6, 1.48, 9.104, -23.9, 17, -13.48, 4,
31 69.78, 0.33, 81, 0.4, -8.9, -173.37, 0.8, 68 };
32 union512 res;
34 res.x = foo (v);
36 if (check_union512 (res, v))
37 abort ();
39 res.x = _mm512_setzero_ps ();
41 res.x = foo_r (v);
43 if (check_union512 (res, v))
44 abort ();