1 /* { dg-do run } */ 2 /* { dg-require-effective-target arm_v8_2a_fp16_scalar_hw } */ 3 /* { dg-add-options arm_v8_2a_fp16_scalar } */ 4 5 #include <arm_fp16.h> 6 7 /* Input values. */ 8 float16_t input[] = 9 { 10 0.0, -0.0, 11 123.4, -567.8, 12 -34.8, 1024, 13 663.1, 169.1, 14 -4.8, 77.0, 15 -144.5, -56.8, 16 17 (float16_t) -16, (float16_t) -15, 18 (float16_t) -14, (float16_t) -13, 19 }; 20 21 /* Expected results (32-bit hexadecimal representation). */ 22 uint32_t expected[] = 23 { 24 0x00000000, 25 0x00000000, 26 0x0000007b, 27 0x00000000, 28 0x00000000, 29 0x00000400, 30 0x00000297, 31 0x000000a9, 32 0x00000000, 33 0x0000004d, 34 0x00000000, 35 0x00000000, 36 0x00000000, 37 0x00000000, 38 0x00000000, 39 0x00000000, 40 }; 41 42 #define TEST_MSG "VCVTNH_U32_F16" 43 #define INSN_NAME vcvtnh_u32_f16 44 45 #define INPUT input 46 #define EXPECTED expected 47 48 #define INPUT_TYPE float16_t 49 #define OUTPUT_TYPE uint32_t 50 #define OUTPUT_TYPE_SIZE 32 51 52 /* Include the template for unary scalar operations. */ 53 #include "unary_scalar_op.inc" 54