diff options
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/float128-fma1.c | 32 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/float128-fma2.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/float128-sqrt1.c | 11 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/float128-sqrt2.c | 9 |
4 files changed, 61 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/float128-fma1.c b/gcc/testsuite/gcc.target/powerpc/float128-fma1.c new file mode 100644 index 0000000..9bc538e --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/float128-fma1.c @@ -0,0 +1,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" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/float128-fma2.c b/gcc/testsuite/gcc.target/powerpc/float128-fma2.c new file mode 100644 index 0000000..e5f15aa --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/float128-fma2.c @@ -0,0 +1,9 @@ +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-options "-mpower9-vector -mno-float128-hardware -O2" } */ + +__float128 +xfma (__float128 a, __float128 b, __float128 c) +{ + return __builtin_fmaf128 (a, b, c); /* { dg-error "ISA 3.0 IEEE 128-bit" } */ +} diff --git a/gcc/testsuite/gcc.target/powerpc/float128-sqrt1.c b/gcc/testsuite/gcc.target/powerpc/float128-sqrt1.c new file mode 100644 index 0000000..792aa05 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/float128-sqrt1.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-options "-mpower9-vector -O2" } */ + +__float128 +xsqrt (__float128 a) +{ + return __builtin_sqrtf128 (a); +} + +/* { dg-final { scan-assembler "xssqrtqp" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/float128-sqrt2.c b/gcc/testsuite/gcc.target/powerpc/float128-sqrt2.c new file mode 100644 index 0000000..94527eb --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/float128-sqrt2.c @@ -0,0 +1,9 @@ +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-options "-mpower9-vector -mno-float128-hardware -O2" } */ + +__float128 +xsqrt (__float128 a) +{ + return __builtin_sqrtf128 (a); /* { dg-error "ISA 3.0 IEEE 128-bit" } */ +} |