aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp-compare-1.c
blob: 9889cf347064400feaf615966a08705247f8c437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-evrp-details" } */
/* PR tree-optimization/28794 */

void g(int);
void f1(int x)
{
  if (x < 0)  return;
  g(x>0);
}

/* `x > 0` should be optimized to just `x != 0`  */
/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "evrp" } } */