diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-prof/val-prof-9.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-9.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-9.c new file mode 100644 index 0000000..8fc2301 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-9.c @@ -0,0 +1,18 @@ +/* { dg-options "-O0 -fdump-tree-optimized" } */ + +int +main (int argc, char **argv) +{ + unsigned u = (argc - 1); + int counter = 0; + + for (unsigned i = 0; i < 100; i++) + { + counter += u % 16; + } + + return counter; +} + +/* autofdo does not do value profiling so far */ +/* { dg-final-use-not-autofdo { scan-tree-dump-times "__gcov_pow2_profiler" 0 "optimized" } } */ |