]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/phi-opt-9.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / phi-opt-9.c
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-optimized" } */
3
4 int g(int,int);
5 int h(int);
6 int f(int t, int c)
7 {
8 int d = 0;
9 int e = 0;
10 if (t)
11 {
12 d = h(c);
13 e = t;
14 }
15 else d = 0, e = 0;
16 return g(e,d);
17 }
18
19 /* The value e should have been replaced with t and there should be only one PHI. */
20 /* { dg-final { scan-tree-dump "g .t_\[0-9\]*.D.," "optimized" } } */
21 /* { dg-final { scan-tree-dump-times "PHI" 1 "optimized" } } */