aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/cmp-2.c
blob: 9b029019c06f97701ea5fc78e381cc880116ec91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-forwprop" } */

/* PR tree-optimization/110949 */
/* Transform `(cmp) - 1` into `-icmp`. */

int f1(int a)
{
  int t = a == 115;
  return t - 1;
}

/* { dg-final { scan-tree-dump " != 115" "forwprop1" } } */
/* { dg-final { scan-tree-dump-not " == 115" "forwprop1" } } */