annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 /* { dg-options "-Ofast -mlow-precision-sqrt" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3 #define DEF_LOOP(TYPE, FN) \
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 void \
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 test_##TYPE (TYPE *x, int n) \
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6 { \
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 for (int i = 0; i < n; ++i) \
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 x[i] = (TYPE) 1 / FN (x[i]); \
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 #define TEST_ALL(T) \
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 T (_Float16, __builtin_sqrtf16) \
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 T (float, __builtin_sqrtf) \
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 T (double, __builtin_sqrt)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 TEST_ALL (DEF_LOOP)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 /* { dg-final { scan-assembler-not {\tfrsqrte\tz[0-9]+\.h} } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 /* { dg-final { scan-assembler-not {\tfrsqrts\tz[0-9]+\.h} } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 /* { dg-final { scan-assembler-times {\tfmul\tz[0-9]+\.s} 2 } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22 /* { dg-final { scan-assembler-times {\tfrsqrte\tz[0-9]+\.s} 1 } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 /* { dg-final { scan-assembler-times {\tfrsqrts\tz[0-9]+\.s} 1 } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 /* { dg-final { scan-assembler-times {\tfmul\tz[0-9]+\.d} 4 } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26 /* { dg-final { scan-assembler-times {\tfrsqrte\tz[0-9]+\.d} 1 } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 /* { dg-final { scan-assembler-times {\tfrsqrts\tz[0-9]+\.d} 2 } } */