]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / phi-opt-7.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
3
4 int g(int,int);
5 int f(int t, int c)
6 {
7 int d = 0;
8 int e = 0;
9 if (t)
10 {
11 d = t;
12 if (c) e = 1;
13 }
14 else d = 0, e = 0;
15 return g(d,e);
16 }
17
18 /* There should be one ifs as one of them should be changed into
19 a conditional and the other should be there still. */
20 /* { dg-final { scan-tree-dump-times "if" 1 "optimized" } }*/
21 /* { dg-final { scan-tree-dump-times "\[^\r\n\]*_\[0-9\]* = c_\[0-9\]*.D. != 0" 1 "optimized" } } */
22