summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/float128-fma1.c
blob: 9bc538ed8598d87772c4ae55c6b8fb5d030d4b82 (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
29
30
31
32
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mpower9-vector -O2" } */

__float128
xfma (__float128 a, __float128 b, __float128 c)
{
  return __builtin_fmaf128 (a, b, c);
}

__float128
xfms (__float128 a, __float128 b, __float128 c)
{
  return __builtin_fmaf128 (a, b, -c);
}

__float128
xfnma (__float128 a, __float128 b, __float128 c)
{
  return -__builtin_fmaf128 (a, b, c);
}

__float128
xfnms (__float128 a, __float128 b, __float128 c)
{
  return -__builtin_fmaf128 (a, b, -c);
}

/* { dg-final { scan-assembler "xsmaddqp"  } } */
/* { dg-final { scan-assembler "xsmsubqp"  } } */
/* { dg-final { scan-assembler "xsnmaddqp" } } */
/* { dg-final { scan-assembler "xsnmsubqp" } } */