Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrecpxh_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 /* { dg-skip-if "" { arm*-*-* } } */
4
5 #include <arm_fp16.h>
6
7 /* Input values. */
8
9 float16_t input[] = { 123.4, 567.8, 34.8, 1024, 663.1, 144.0, 4.8, 77 };
10 /* Expected results are calculated by:
11 for (index = 0; index < 8; index++)
12 {
13 uint16_t src_cast = * (uint16_t *) &src[index];
14 * (uint16_t *) &expected[index] =
15 (src_cast & 0x8000) | (~src_cast & 0x7C00);
16 } */
17 uint16_t expected[8] = { 0x2800, 0x1C00, 0x2C00, 0x1800,
18 0x1C00, 0x2400, 0x3800, 0x2800 };
19
20 #define TEST_MSG "VRECPXH_F16"
21 #define INSN_NAME vrecpxh_f16
22
23 #define INPUT input
24 #define EXPECTED expected
25
26 #define INPUT_TYPE float16_t
27 #define OUTPUT_TYPE float16_t
28 #define OUTPUT_TYPE_SIZE 16
29
30 /* Include the template for unary scalar operations. */
31 #include "unary_scalar_op.inc"