aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr97786-1.c
blob: 3951770f65b9094ab215663b5e421fb9e3c231b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
/* { dg-require-effective-target powerpc_vsx } */

int test1 (double x)
{
  return __builtin_isinf (x);
}

int test2 (float x)
{
  return __builtin_isinf (x);
}

int test3 (float x)
{
  return __builtin_isinff (x);
}

/* { dg-final { scan-assembler-not {\mfcmp} } } */
/* { dg-final { scan-assembler-times {\mxststdcsp\M} 2 } } */
/* { dg-final { scan-assembler-times {\mxststdcdp\M} 1 } } */