aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr31531-1.c
blob: c27299151ebcf0061f59071c7014752bd908adc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
/* PR tree-optimization/31531 */

int f(int a)
{
  int b = ~a;
  return b<0;
}


int f1(unsigned a)
{
  int b = ~a;
  return b<0;
}
/* We should convert the above two functions from b <0 to ((int)a) >= 0. */
/* { dg-final { scan-tree-dump-times ">= 0" 2 "optimized"} } */
/* { dg-final { scan-tree-dump-times "~" 0 "optimized"} } */