PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512f-set-v8df-2.c
bloba412de582073ce3a4995e74968105b68603d9f96
1 /* { dg-do run } */
2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
5 #include "avx512f-check.h"
7 static __m512d
8 __attribute__ ((noinline))
9 foo (double x1, double x2, double x3, double x4,
10 double x5, double x6, double x7, double x8)
12 return _mm512_set_pd (x1, x2, x3, x4, x5, x6, x7, x8);
15 static __m512d
16 __attribute__ ((noinline))
17 foo_r (double x1, double x2, double x3, double x4,
18 double x5, double x6, double x7, double x8)
20 return _mm512_setr_pd (x8, x7, x6, x5, x4, x3, x2, x1);
23 static void
24 avx512f_test (void)
26 double v[8] = { -3.3, 2.6, 1.48, 9.104, -23.9, -173.37, -13.48, 69.78 };
27 union512d res;
29 res.x = foo (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
31 if (check_union512d (res, v))
32 abort ();
34 res.x = _mm512_setzero_pd ();
36 res.x = foo_r (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
38 if (check_union512d (res, v))
39 abort ();