aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/div-cmp-2.c
blob: 95e5400d777d07f181e9b2bbff957e5e3783cbc6 (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
28
/* { dg-do compile } */
/* { dg-options "-O2 -funsafe-math-optimizations -ffinite-math-only -fdump-tree-optimized-raw" } */

int
cmp_1 (float x)
{
  return 5 / x >= 0;
}

int
cmp_2 (float x)
{
  return 1 / x <= 0;
}

int
cmp_3 (float x)
{
  return -2 / x >= 0;
}

int
cmp_4 (float x)
{
  return -5 / x <= 0;
}

/* { dg-final { scan-tree-dump-not "rdiv_expr" "optimized" } } */