Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* PR tree-optimization/114894 */
3 /* Phi-OPT should be able to optimize these without sinking being invoked. */
4 /* { dg-options "-O -fdump-tree-phiopt2 -fdump-tree-phiopt3 -fdump-tree-optimized -fno-tree-sink" } */
5
6 int fmul1(int a, int b)
7 {
8 int c = a * b;
9 if (a != 0)
10 return c;
11 return 0;
12 }
13
14
15 int fand1(int a, int b)
16 {
17 int c = a & b;
18 if (a != 0)
19 return c;
20 return 0;
21 }
22
23
24 void g(int);
25
26 int fdiv1(int a, int b)
27 {
28 int d = b|1;
29 g(d);
30 int c = a / d;
31 return a != 0 ? c : 0;
32 }
33
34 /* { dg-final { scan-tree-dump-not "goto" "phiopt2" } } */
35 /* { dg-final { scan-tree-dump-not "goto" "phiopt3" } } */
36 /* { dg-final { scan-tree-dump-not "goto" "optimized" } } */
37