Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/tree-prof/val-prof-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ | |
2 int a[1000]; | |
3 int b = 256; | |
4 int c = 257; | |
5 int | |
6 main () | |
7 { | |
8 int i; | |
9 int n; | |
10 for (i = 0; i < 1000; i++) | |
11 { | |
12 if (i % 17) | |
13 n = c; | |
14 else n = b; | |
15 a[i] /= n; | |
16 } | |
17 return 0; | |
18 } | |
19 /* autofdo does not do value profiling so far */ | |
20 /* { dg-final-use-not-autofdo { scan-ipa-dump "Div.mod by constant n_\[0-9\]*=257 transformation on insn" "profile"} } */ | |
21 /* { dg-final-use-not-autofdo { scan-tree-dump "if \\(n_\[0-9\]* != 257\\)" "optimized"} } */ | |
22 /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ |