Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-1a.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 [[gnu::const]]
5 int constcall(int);
6
7 int f(int a, int b)
8 {
9 int c = b+a;
10 int t = constcall(c);
11 int d;
12 if (a == 0) d= b; else d= c;
13 return constcall(d) + t;
14 }
15
16 /* There should be no if statement and 2 calls to call1. */
17 /* { dg-final { scan-tree-dump-not "if " "optimized" } } */
18 /* { dg-final { scan-tree-dump-times "constcall " 1 "optimized" } } */
19