comparison gcc/testsuite/gcc.target/aarch64/sve/sqrt_1_run.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-Ofast -mlow-precision-sqrt" } */
3
4 #include "sqrt_1.c"
5
6 #define N 77
7
8 #define TEST_LOOP(TYPE, FN) \
9 { \
10 TYPE a[N]; \
11 for (int i = 0; i < N; ++i) \
12 a[i] = i; \
13 test_##TYPE (a, N); \
14 for (int i = 0; i < N; ++i) \
15 { \
16 double diff = a[i] - __builtin_sqrt (i); \
17 if (__builtin_fabs (diff) > 0x1.0p-8) \
18 __builtin_abort (); \
19 } \
20 }
21
22 int
23 main (void)
24 {
25 TEST_ALL (TEST_LOOP);
26 return 0;
27 }