gcc/
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / phi-opt-8.c
blob775926da98065c7695f9be7946b85e8d18c07c66
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-optimized -fdump-tree-phiopt1" } */
4 int g(int,int);
5 int f(int t, int c)
7 int d = 0;
8 int e = 0;
9 if (t)
11 d = 1;
12 e = t;
14 else d = 0, e = 0;
15 return g(e,d);
18 /* This testcase should be reduced to e = t; d = t != 0; in phiopt1
19 but currently is not as PHI-OPT does not reduce the t PHI as we have
20 two phis. Note this is fixed with
21 http://gcc.gnu.org/ml/gcc-patches/2012-01/msg01195.html . */
22 /* { dg-final { scan-tree-dump-not "if" "phiopt1" } } */
23 /* { dg-final { scan-tree-dump "g .t_\[0-9\]*.D.," "optimized" } } */
24 /* { dg-final { scan-tree-dump-not "PHI" "optimized" } } */
25 /* { dg-final { cleanup-tree-dump "phiopt1" } } */
26 /* { dg-final { cleanup-tree-dump "optimized" } } */