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