| 1 |
/* { dg-do compile { target lp64 } } */ |
| 2 |
/* { dg-options "-mvsx -O2" } */ |
| 3 |
/* { dg-additional-options "-mdejagnu-cpu=power9" { target { ! has_arch_pwr9 } } } */ |
| 4 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 5 |
/* { dg-require-effective-target float128 } */ |
| 6 |
|
| 7 |
__float128 |
| 8 |
xfma (__float128 a, __float128 b, __float128 c) |
| 9 |
{ |
| 10 |
return __builtin_fmaf128 (a, b, c); |
| 11 |
} |
| 12 |
|
| 13 |
__float128 |
| 14 |
xfms (__float128 a, __float128 b, __float128 c) |
| 15 |
{ |
| 16 |
return __builtin_fmaf128 (a, b, -c); |
| 17 |
} |
| 18 |
|
| 19 |
__float128 |
| 20 |
xfnma (__float128 a, __float128 b, __float128 c) |
| 21 |
{ |
| 22 |
return -__builtin_fmaf128 (a, b, c); |
| 23 |
} |
| 24 |
|
| 25 |
__float128 |
| 26 |
xfnms (__float128 a, __float128 b, __float128 c) |
| 27 |
{ |
| 28 |
return -__builtin_fmaf128 (a, b, -c); |
| 29 |
} |
| 30 |
|
| 31 |
/* { dg-final { scan-assembler "xsmaddqp" } } */ |
| 32 |
/* { dg-final { scan-assembler "xsmsubqp" } } */ |
| 33 |
/* { dg-final { scan-assembler "xsnmaddqp" } } */ |
| 34 |
/* { dg-final { scan-assembler "xsnmsubqp" } } */ |