Debian Codegraph @

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

raw
1 /* This file tests an intrinsic which currently has only an f16 variant and that
2 is only available when FP16 arithmetic instructions are supported. */
3 /* { dg-require-effective-target arm_v8_2a_fp16_neon_hw } */
4
5 #include <arm_neon.h>
6 #include "arm-neon-ref.h"
7 #include "compute-ref-data.h"
8
9 #define INSN_NAME vmaxnm
10 #define TEST_MSG "VMAXNM/VMAXNMQ"
11
12 #if defined (__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
13 #define HAS_FLOAT16_VARIANT
14 #endif
15
16 /* Expected results. */
17 #if defined (__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
18 VECT_VAR_DECL(expected, hfloat, 16, 4) [] = { 0xcbc0, 0xcb80, 0xcb00, 0xca80 };
19 VECT_VAR_DECL(expected, hfloat, 16, 8) [] = { 0xcb40, 0xcb40, 0xcb00, 0xca80,
20 0xca00, 0xc980, 0xc900, 0xc880 };
21 #endif
22
23 /* Expected results with special FP values. */
24 #if defined (__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
25 VECT_VAR_DECL(expected_nan, hfloat, 16, 8) [] = { 0x3c00, 0x3c00,
26 0x3c00, 0x3c00,
27 0x3c00, 0x3c00,
28 0x3c00, 0x3c00 };
29 VECT_VAR_DECL(expected_mnan, hfloat, 16, 8) [] = { 0x3c00, 0x3c00,
30 0x3c00, 0x3c00,
31 0x3c00, 0x3c00,
32 0x3c00, 0x3c00 };
33 VECT_VAR_DECL(expected_inf, hfloat, 16, 8) [] = { 0x7c00, 0x7c00,
34 0x7c00, 0x7c00,
35 0x7c00, 0x7c00,
36 0x7c00, 0x7c00 };
37 VECT_VAR_DECL(expected_minf, hfloat, 16, 8) [] = { 0x3c00, 0x3c00,
38 0x3c00, 0x3c00,
39 0x3c00, 0x3c00,
40 0x3c00, 0x3c00 };
41 VECT_VAR_DECL(expected_zero1, hfloat, 16, 8) [] = { 0x0, 0x0, 0x0, 0x0,
42 0x0, 0x0, 0x0, 0x0 };
43 VECT_VAR_DECL(expected_zero2, hfloat, 16, 8) [] = { 0x0, 0x0, 0x0, 0x0,
44 0x0, 0x0, 0x0, 0x0 };
45 #endif
46
47 #include "binary_op_float.inc"