Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512fp16-1b.c

raw
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-1a.c"
12
13 static void
14 do_test (void)
15 {
16 _Float16 x = 25.3;
17 union128h u = { x, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
18 __m128h v;
19 union128h a;
20 memset (&v, -1, sizeof (v));
21 v = foo1 (x);
22 a.x = v;
23 if (check_union128h (a, u.a))
24 abort ();
25 x = 33.3;
26 u.a[0] = x;
27 memset (&v, -1, sizeof (v));
28 v = foo2 (&x);
29 a.x = v;
30 if (check_union128h (a, u.a))
31 abort ();
32 }