]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/tree-ssa/pr76174.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr76174.c
CommitLineData
45ddb395
RB
1/* { dg-do compile } */
2/* { dg-options "-O2 -fdump-tree-cddce1" } */
3
4void foo();
5
6void l(unsigned int r) {
7 unsigned int q = 0;
8 unsigned int c = r;
9 for (unsigned int x = 0; x<r; x++) {
10 if (q == c) {
11 foo();
12 c *= 2;
13 }
14 q++;
15 }
16}
17
18/* We should be able to elide the body of the function by means of
19 figuring out the equality between the two IVs and then simplifying
20 the q == c test. */
21/* { dg-final { scan-tree-dump-not "foo" "cddce1" } } */
22/* { dg-final { scan-tree-dump-times "bb" 1 "cddce1" } } */