Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vcvth_f16_s32_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 uint32_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 0xe06e /* -567.000000 */,
26 0xd040 /* -34.000000 */,
27 0x6400 /* 1024.000000 */,
28 0xd3e0 /* -63.000000 */,
29 0x5948 /* 169.000000 */,
30 0xc400 /* -4.000000 */,
31 0x54d0 /* 77.000000 */,
32 0xd880 /* -144.000000 */,
33 0xd300 /* -56.000000 */,
34 0xcc00 /* -16.000000 */,
35 0xcb80 /* -15.000000 */,
36 0xcb00 /* -14.000000 */,
37 0xca80 /* -13.000000 */
38 };
39
40 #define TEST_MSG "VCVTH_F16_S32"
41 #define INSN_NAME vcvth_f16_s32
42
43 #define INPUT input
44 #define EXPECTED expected
45
46 #define INPUT_TYPE uint32_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"