Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vcvth_n_s32_f16_1.c

raw
1 /* { dg-require-effective-target arm_v8_2a_fp16_scalar_hw } */
2 /* { dg-add-options arm_v8_2a_fp16_scalar } */
3
4 #include <arm_fp16.h>
5
6 /* Input values. */
7 float16_t input[] =
8 {
9 0.0, -0.0,
10 123.4, -567.8,
11 -34.8, 1024,
12 663.1, 169.1,
13 -4.8, 77.0,
14 -144.5, -56.8,
15
16 (float16_t) -16, (float16_t) -15,
17 (float16_t) -14, (float16_t) -13,
18 };
19
20 /* Expected results (32-bit hexadecimal representation). */
21 uint32_t expected_1[] =
22 {
23 0x00000000,
24 0x00000000,
25 0x000000f6,
26 0xfffffb90,
27 0xffffffbb,
28 0x00000800,
29 0x0000052e,
30 0x00000152,
31 0xfffffff7,
32 0x0000009a,
33 0xfffffedf,
34 0xffffff8f,
35 0xffffffe0,
36 0xffffffe2,
37 0xffffffe4,
38 0xffffffe6,
39 };
40
41 uint32_t expected_2[] =
42 {
43 0x00000000,
44 0x00000000,
45 0x000001ed,
46 0xfffff720,
47 0xffffff75,
48 0x00001000,
49 0x00000a5c,
50 0x000002a4,
51 0xffffffed,
52 0x00000134,
53 0xfffffdbe,
54 0xffffff1d,
55 0xffffffc0,
56 0xffffffc4,
57 0xffffffc8,
58 0xffffffcc,
59 };
60
61 uint32_t expected_3[] =
62 {
63 0x00000000,
64 0x00000000,
65 0x7fffffff,
66 0x80000000,
67 0x80000000,
68 0x7fffffff,
69 0x7fffffff,
70 0x7fffffff,
71 0x80000000,
72 0x7fffffff,
73 0x80000000,
74 0x80000000,
75 0x80000000,
76 0x80000000,
77 0x80000000,
78 0x80000000,
79 };
80
81 #define TEST_MSG "VCVTH_N_S32_F16"
82 #define INSN_NAME vcvth_n_s32_f16
83
84 #define INPUT input
85 #define EXPECTED_1 expected_1
86 #define EXPECTED_2 expected_2
87 #define EXPECTED_3 expected_3
88
89 #define INPUT_TYPE float16_t
90 #define OUTPUT_TYPE uint32_t
91 #define OUTPUT_TYPE_SIZE 32
92
93 #define SCALAR_OPERANDS
94 #define SCALAR_1 1
95 #define SCALAR_2 2
96 #define SCALAR_3 32
97
98 /* Include the template for unary scalar operations. */
99 #include "unary_scalar_op.inc"