Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / riscv / rvv / autovec / unop / math-ceil-run-0.c
blob600c161159d795e57dcba3d4cd328d7abcd20bc5
1 /* { dg-do run { target { riscv_vector } } } */
2 /* { dg-additional-options "-std=c2x -O3 -ftree-vectorize -fno-vect-cost-model -ffast-math" } */
4 #include "test-math.h"
6 #define ARRAY_SIZE 128
8 _Float16 in[ARRAY_SIZE];
9 _Float16 out[ARRAY_SIZE];
10 _Float16 ref[ARRAY_SIZE];
12 TEST_UNARY_CALL (_Float16, __builtin_ceilf16)
13 TEST_ASSERT (_Float16)
15 TEST_INIT (_Float16, 1.2, 2.0, 1)
16 TEST_INIT (_Float16, -1.2, -1.0, 2)
17 TEST_INIT (_Float16, 3.0, 3.0, 3)
18 TEST_INIT (_Float16, 1023.5, 1024.0, 4)
19 TEST_INIT (_Float16, 1025.0, 1025.0, 5)
20 TEST_INIT (_Float16, 0.0, 0.0, 6)
21 TEST_INIT (_Float16, -0.0, -0.0, 7)
22 TEST_INIT (_Float16, -1023.5, -1023.0, 8)
23 TEST_INIT (_Float16, -1024.0, -1024.0, 9)
25 int
26 main ()
28 RUN_TEST (_Float16, 1, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
29 RUN_TEST (_Float16, 2, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
30 RUN_TEST (_Float16, 3, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
31 RUN_TEST (_Float16, 4, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
32 RUN_TEST (_Float16, 5, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
33 RUN_TEST (_Float16, 6, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
34 RUN_TEST (_Float16, 7, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
35 RUN_TEST (_Float16, 8, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
36 RUN_TEST (_Float16, 9, __builtin_ceilf16, in, out, ref, ARRAY_SIZE);
38 return 0;