This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH rs6000 testsuite] Fix PR79158
- From: Pat Haugen <pthaugen at linux dot vnet dot ibm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Segher Boessenkool <segher at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Thu, 2 Feb 2017 14:09:55 -0600
- Subject: [PATCH rs6000 testsuite] Fix PR79158
- Authentication-results: sourceware.org; auth=none
The testcase has been failing on BE because the compiler is simply storing the value straight from the GPRs. The following patch fixes the issue by using 'r' in an expression which forces the value back to a VSR. Verified the testcase now passes for powerpc64 and still passes for powerpc64le. Ok for trunk?
-Pat
testsuite/ChangeLog:
2017-02-02 Pat Haugen <pthaugen@us.ibm.com>
PR target/79158
* gcc.target/powerpc/pr70669.c: Use 'r' in an expression to force back
to VSX reg.
Index: gcc.target/powerpc/pr70669.c
===================================================================
--- gcc.target/powerpc/pr70669.c (revision 245032)
+++ gcc.target/powerpc/pr70669.c (working copy)
@@ -13,7 +13,7 @@ void foo (TYPE *p, TYPE *q)
#ifndef NO_ASM
__asm__ (" # %0" : "+r" (r));
#endif
- *p = r;
+ *p = r + r;
}
/* { dg-final { scan-assembler "mfvsrd" } } */