(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
advsimd-intrinsics/
vcvth_n_s32_f16_1.c
       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_1[] =
      23  {
      24    0x00000000,
      25    0x00000000,
      26    0x000000f6,
      27    0xfffffb90,
      28    0xffffffbb,
      29    0x00000800,
      30    0x0000052e,
      31    0x00000152,
      32    0xfffffff7,
      33    0x0000009a,
      34    0xfffffedf,
      35    0xffffff8f,
      36    0xffffffe0,
      37    0xffffffe2,
      38    0xffffffe4,
      39    0xffffffe6,
      40  };
      41  
      42  uint32_t expected_2[] =
      43  {
      44    0x00000000,
      45    0x00000000,
      46    0x000001ed,
      47    0xfffff720,
      48    0xffffff75,
      49    0x00001000,
      50    0x00000a5c,
      51    0x000002a4,
      52    0xffffffed,
      53    0x00000134,
      54    0xfffffdbe,
      55    0xffffff1d,
      56    0xffffffc0,
      57    0xffffffc4,
      58    0xffffffc8,
      59    0xffffffcc,
      60  };
      61  
      62  uint32_t expected_3[] =
      63  {
      64    0x00000000,
      65    0x00000000,
      66    0x7fffffff,
      67    0x80000000,
      68    0x80000000,
      69    0x7fffffff,
      70    0x7fffffff,
      71    0x7fffffff,
      72    0x80000000,
      73    0x7fffffff,
      74    0x80000000,
      75    0x80000000,
      76    0x80000000,
      77    0x80000000,
      78    0x80000000,
      79    0x80000000,
      80  };
      81  
      82  #define TEST_MSG "VCVTH_N_S32_F16"
      83  #define INSN_NAME vcvth_n_s32_f16
      84  
      85  #define INPUT input
      86  #define EXPECTED_1 expected_1
      87  #define EXPECTED_2 expected_2
      88  #define EXPECTED_3 expected_3
      89  
      90  #define INPUT_TYPE float16_t
      91  #define OUTPUT_TYPE uint32_t
      92  #define OUTPUT_TYPE_SIZE 32
      93  
      94  #define SCALAR_OPERANDS
      95  #define SCALAR_1 1
      96  #define SCALAR_2 2
      97  #define SCALAR_3 32
      98  
      99  /* Include the template for unary scalar operations.  */
     100  #include "unary_scalar_op.inc"