Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/vrp92.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdisable-tree-evrp -fno-tree-fre -fdump-tree-vrp1 -fdisable-tree-ethread" } */
3
4 void bar (void);
5 int foo (int i, int j)
6 {
7 int res = 1;
8 if (i < j)
9 {
10 /* We should be able to simplify the following conditional
11 during propagation. */
12 if (i > j)
13 res = 0;
14 }
15 /* And compute res as having a value-range of [1,1]. */
16 if (res)
17 return i;
18 return j;
19 }
20
21 /* { dg-final { scan-tree-dump-not "PHI" "vrp1" } } */
22 /* { dg-final { scan-tree-dump-not "goto" "vrp1" } } */
23 /* { dg-final { scan-tree-dump-not "if" "vrp1" } } */