summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-16 03:29:36 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-16 03:29:36 +0000
commitcc12a806f2938023f3dbbb9f635113845a6bfe70 (patch)
tree01c9d25d874f258a1487f3d6c63408347d9989cb /gcc/testsuite/gcc.target
parentc73d9f543e3d171c92f5c15849133ed42a0a3fe8 (diff)
downloadgcc-cc12a806f2938023f3dbbb9f635113845a6bfe70.tar.gz
PR target/63150
gcc/ * config/rs6000/rs6000.md (bswapdi2): Remove one scratch reg. Modify Z->r bswapdi splitter to use dest in place of scratch. In r->Z and Z->r bswapdi splitter rename word_high, word_low to word1, word2 and rearrange logic to suit. (bswapdi2_64bit): Remove early clobber on Z->r alternative. (bswapdi2_ldbrx): Likewise. Remove '??' on r->r. (bswapdi2_32bit): Remove early clobber on Z->r alternative. Add one '?' on r->r. Modify Z->r splitter to avoid need for early clobber. gcc/testsuite/ * gcc.target/powerpc/pr53199.c: Add extra functions. Revert 2014-12-05 change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221445 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr53199.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/pr53199.c b/gcc/testsuite/gcc.target/powerpc/pr53199.c
index e00683d7175..eede1dcb4f3 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr53199.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr53199.c
@@ -1,8 +1,8 @@
-/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
/* { dg-options "-O2 -mcpu=power6 -mavoid-indexed-addresses" } */
-/* { dg-final { scan-assembler-times "lwbrx" 6 } } */
+/* { dg-final { scan-assembler-times "lwbrx" 12 } } */
/* { dg-final { scan-assembler-times "stwbrx" 6 } } */
/* PR 51399: bswap gets an error if -mavoid-indexed-addresses was used in
@@ -26,6 +26,24 @@ load64_reverse_3 (long long *p, int i)
return __builtin_bswap64 (p[i]);
}
+long long
+load64_reverse_4 (long long dummy __attribute__ ((unused)), long long *p)
+{
+ return __builtin_bswap64 (*p);
+}
+
+long long
+load64_reverse_5 (long long dummy __attribute__ ((unused)), long long *p)
+{
+ return __builtin_bswap64 (p[1]);
+}
+
+long long
+load64_reverse_6 (long long dummy __attribute__ ((unused)), long long *p, int i)
+{
+ return __builtin_bswap64 (p[i]);
+}
+
void
store64_reverse_1 (long long *p, long long x)
{
@@ -45,7 +63,13 @@ store64_reverse_3 (long long *p, long long x, int i)
}
long long
-reg_reverse (long long x)
+reg_reverse_1 (long long x)
+{
+ return __builtin_bswap64 (x);
+}
+
+long long
+reg_reverse_2 (long long dummy __attribute__ ((unused)), long long x)
{
return __builtin_bswap64 (x);
}