comparison gcc/testsuite/gcc.target/aarch64/sve/rsqrt_1.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
18:1830386684a0 19:2b5abeee2509
1 /* { dg-options "-Ofast -mlow-precision-sqrt" } */
2
3 #define DEF_LOOP(TYPE, FN) \
4 void \
5 test_##TYPE (TYPE *x, int n) \
6 { \
7 for (int i = 0; i < n; ++i) \
8 x[i] = (TYPE) 1 / FN (x[i]); \
9 }
10
11 #define TEST_ALL(T) \
12 T (_Float16, __builtin_sqrtf16) \
13 T (float, __builtin_sqrtf) \
14 T (double, __builtin_sqrt)
15
16 TEST_ALL (DEF_LOOP)
17
18 /* { dg-final { scan-assembler-not {\tfrsqrte\tz[0-9]+\.h} } } */
19 /* { dg-final { scan-assembler-not {\tfrsqrts\tz[0-9]+\.h} } } */
20
21 /* { dg-final { scan-assembler-times {\tfmul\tz[0-9]+\.s} 2 } } */
22 /* { dg-final { scan-assembler-times {\tfrsqrte\tz[0-9]+\.s} 1 } } */
23 /* { dg-final { scan-assembler-times {\tfrsqrts\tz[0-9]+\.s} 1 } } */
24
25 /* { dg-final { scan-assembler-times {\tfmul\tz[0-9]+\.d} 4 } } */
26 /* { dg-final { scan-assembler-times {\tfrsqrte\tz[0-9]+\.d} 1 } } */
27 /* { dg-final { scan-assembler-times {\tfrsqrts\tz[0-9]+\.d} 2 } } */