aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp-float-relations-2.c
blob: 76c913021679f09d664e54cad8c3cd50d9437f88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile }
// { dg-options "-O2 -fdump-tree-threadfull1-details" }

void stuff();

void foo (float a, int cond)
{
  float x;

  if (cond)
    x = a;
  else
    x = 8.0;

  /* We should be able to fold this as false on the path coming out of
     cond == TRUE conditional.  */
  if (x < a)
    stuff();
}

// { dg-final { scan-tree-dump "Registering jump thread: \\(2, 4\\)" "threadfull1" } }