| 1 |
/* { dg-do run { target avx512fp16 } } */ |
| 2 |
/* { dg-options "-O2 -mavx512fp16" } */ |
| 3 |
|
| 4 |
#include <string.h> |
| 5 |
|
| 6 |
static void do_test (void); |
| 7 |
|
| 8 |
#define DO_TEST do_test |
| 9 |
#define AVX512FP16 |
| 10 |
#include "avx512-check.h" |
| 11 |
#include "avx512fp16-1c.c" |
| 12 |
|
| 13 |
static void |
| 14 |
do_test (void) |
| 15 |
{ |
| 16 |
_Float16 x = 25.3; |
| 17 |
union128h u = { -1.2f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f }; |
| 18 |
__m128h v; |
| 19 |
union128h a, b; |
| 20 |
v = foo1 (u.x, x); |
| 21 |
a.x = v; |
| 22 |
b = u; |
| 23 |
b.a[2] = x; |
| 24 |
if (check_union128h (a, b.a)) |
| 25 |
abort (); |
| 26 |
x = 33.3; |
| 27 |
b = u; |
| 28 |
b.a[0] = x; |
| 29 |
v = foo2 (u.x, x); |
| 30 |
a.x = v; |
| 31 |
if (check_union128h (a, b.a)) |
| 32 |
abort (); |
| 33 |
} |