diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 2017-09-21 22:41:08 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2017-09-21 22:41:08 +0000 |
commit | e7722a2fed9f0a35d25c2a2145e0dba084e48653 (patch) | |
tree | 015f87c9c694ac4fe574400b80565384b8967023 /gcc/testsuite | |
parent | 1debe7ea0aa0672d560b7671c0a7f8400432f727 (diff) | |
download | gcc-e7722a2fed9f0a35d25c2a2145e0dba084e48653.zip gcc-e7722a2fed9f0a35d25c2a2145e0dba084e48653.tar.gz gcc-e7722a2fed9f0a35d25c2a2145e0dba084e48653.tar.bz2 |
<commit missing files>
2017-09-13 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/float128-fma1.c: New test.
* gcc.target/powerpc/float128-fma2.c: Likewise.
* gcc.target/powerpc/float128-sqrt1.c: Likewise.
* gcc.target/powerpc/float128-sqrt2.c: Likewise.
From-SVN: r253083
Diffstat (limited to 'gcc/testsuite')
-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" } */ +} |