Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c

raw
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 no ifs as this is converted into `(t != 0) & (c != 0)`.
19 /* { dg-final { scan-tree-dump-not "if" "optimized" } } */
20 /* { dg-final { scan-tree-dump-times "\[^\r\n\]*_\[0-9\]* = c_\[0-9\]*.D. != 0" 1 "optimized" } } */
21 /* { dg-final { scan-tree-dump-times "\[^\r\n\]*_\[0-9\]* = t_\[0-9\]*.D. != 0" 1 "optimized" } } */
22