aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp86.c
blob: c07f69ebc9d23eb9c56d9ee92175f5c581fcdf87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* PR tree-optimization/54471 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp1" } */

#ifdef __SIZEOF_INT128__
#define T __int128
#else
#define T long long
#endif

void fn1call (void);
void fn2call (void);

void
foo (unsigned T x)
{
  if (x > (unsigned T) -3)
    return;
  unsigned T y = 2 * x;
  if (y == 42)
    fn1call ();
  else
    fn2call ();
}

/* { dg-final { scan-tree-dump "fn1call" "vrp1"} } */
/* { dg-final { scan-tree-dump "fn2call" "vrp1"} } */