summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-08-22 10:27:46 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-08-22 10:27:46 +0000
commitf733cf303bcdc952c92b81dd62199a40a1f555ec (patch)
tree0a9a9e0f28aa7c7f5bc4d1d1d0e9647163cac4f7 /gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c
parente0e4357b88efe5dc53e50d341a09de4d02331200 (diff)
downloadgcc-tarball-gcc-6.2.0.tar.gz
gcc-6.2.0gcc-6.2.0
Diffstat (limited to 'gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c')
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c
new file mode 100644
index 0000000000..d6ee4f72a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dtstsfi-58.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mcpu=power9" } */
+
+#include <altivec.h>
+
+int doTestBCDSignificance (_Decimal128 *p)
+{
+ _Decimal128 source = *p;
+
+ if (__builtin_dfp_dtstsfi_eq_td (63, source))
+ return 3;
+ else
+ return 5;
+}
+
+/* { dg-final { scan-assembler "dtstsfiq" } } */
+