PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx2-vbroadcastss_ps256-2.c
blob9f90e2e8527688102d34306dfdaa5e1d23bf79f4
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx2 } */
3 /* { dg-options "-O2 -mavx2" } */
5 #include <string.h>
6 #include "avx2-check.h"
8 void static
9 avx2_test (void)
11 union128 s1;
12 union256 res;
13 float res_ref[8];
14 int i, j;
15 int fail = 0;
17 for (i = 0; i < 10; i++)
19 s1.a[0] = i * 3.14;
21 res.x = _mm256_broadcastss_ps (s1.x);
23 for (j = 0; j < 8; j++)
24 memcpy (res_ref + j, s1.a, 4);
26 fail += check_union256 (res, res_ref);
29 if (fail != 0)
30 abort ();