aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/fold-isinf-2.c
blob: a236ca10310fbf6acc20017e94085824b0004d11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-require-effective-target inf } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

int foo(unsigned int x)
{
  return __builtin_isinf((double)x);
}

int foof(unsigned int x)
{
  return __builtin_isinff((float)x);
}

int fool(unsigned int x)
{
  return __builtin_isinfl((long double)x);
}

/* { dg-final { scan-tree-dump-times "_isinf" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times " u<= " 0 "optimized" } } */