]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/tree-ssa/vrp92.c
* passes.def (pass_early_thread_jumps): Schedule after forwprop.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp92.c
CommitLineData
fa64988a 1/* { dg-do compile } */
a18b7a33 2/* { dg-options "-O2 -fdump-tree-vrp1-details -fdisable-tree-ethread" } */
fa64988a 3
4void bar (void);
5int 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 "res_.: \\\[1, 1\\\]" "vrp1" } } */
22/* { dg-final { scan-tree-dump-not "Threaded" "vrp1" } } */