Debian Codegraph @

gcc/testsuite/gcc.dg/tree-prof/val-prof-8.c

raw
1 /* { dg-options "-O0 -fdump-ipa-profile" } */
2
3 int
4 main (int argc, char **argv)
5 {
6 unsigned u = (argc - 1);
7 int counter = 0;
8
9 for (unsigned i = 0; i < 100; i++)
10 {
11 unsigned x = i < 10 ? 16 : 15;
12 counter += u % x;
13 }
14
15 return counter;
16 }
17
18 /* autofdo does not do value profiling so far */
19 /* { dg-final-use-not-autofdo { scan-ipa-dump "Pow2 counter pow2:10 nonpow2:90." "profile" } } */