PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx2-vbroadcastss_ps-2.c
blob1637e703bc77f04fc4ef0666db929972a1f83b7a
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, res;
12 float res_ref[4];
13 int i, j;
14 int fail = 0;
16 for (i = 0; i < 10; i++)
18 s1.a[0] = i * 3.14;
20 res.x = _mm_broadcastss_ps (s1.x);
22 for (j = 0; j < 4; j++)
23 memcpy (res_ref + j, s1.a, 4);
25 fail += check_union128 (res, res_ref);
28 if (fail != 0)
29 abort ();