Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/recip_2.c

raw
1 /* { dg-options "-Ofast -mlow-precision-div" } */
2
3 #define DEF_LOOP(TYPE) \
4 void \
5 test_##TYPE (TYPE *restrict x, TYPE *restrict y, int n) \
6 { \
7 for (int i = 0; i < n; ++i) \
8 x[i] /= y[i]; \
9 }
10
11 #define TEST_ALL(T) \
12 T (_Float16) \
13 T (float) \
14 T (double)
15
16 TEST_ALL (DEF_LOOP)
17
18 /* { dg-final { scan-assembler-not {\tfrecpe\tz[0-9]+\.h} } } */
19 /* { dg-final { scan-assembler-not {\tfrecps\tz[0-9]+\.h} } } */
20
21 /* { dg-final { scan-assembler-times {\tfmul\tz[0-9]+\.s} 2 } } */
22 /* { dg-final { scan-assembler-times {\tfrecpe\tz[0-9]+\.s} 1 } } */
23 /* { dg-final { scan-assembler-times {\tfrecps\tz[0-9]+\.s} 1 } } */
24
25 /* { dg-final { scan-assembler-times {\tfmul\tz[0-9]+\.d} 3 } } */
26 /* { dg-final { scan-assembler-times {\tfrecpe\tz[0-9]+\.d} 1 } } */
27 /* { dg-final { scan-assembler-times {\tfrecps\tz[0-9]+\.d} 2 } } */