Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_u32_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 int32_t input[] =
8 {
9 0, -0,
10 123, -567,
11 -34, 1024,
12 -63, 169,
13 -4, 77,
14 -144, -56,
15 -16, -15,
16 -14, -13,
17 };
18
19 /* Expected results (16-bit hexadecimal representation). */
20 uint16_t expected[] =
21 {
22 0x0000 /* 0.000000 */,
23 0x0000 /* 0.000000 */,
24 0x57b0 /* 123.000000 */,
25 0x7c00 /* inf */,
26 0x7c00 /* inf */,
27 0x6400 /* 1024.000000 */,
28 0x7c00 /* inf */,
29 0x5948 /* 169.000000 */,
30 0x7c00 /* inf */,
31 0x54d0 /* 77.000000 */,
32 0x7c00 /* inf */,
33 0x7c00 /* inf */,
34 0x7c00 /* inf */,
35 0x7c00 /* inf */,
36 0x7c00 /* inf */,
37 0x7c00 /* inf */
38 };
39
40 #define TEST_MSG "VCVTH_F16_U32"
41 #define INSN_NAME vcvth_f16_u32
42
43 #define INPUT input
44 #define EXPECTED expected
45
46 #define INPUT_TYPE int32_t
47 #define OUTPUT_TYPE float16_t
48 #define OUTPUT_TYPE_SIZE 16
49
50 /* Include the template for unary scalar operations. */
51 #include "unary_scalar_op.inc"