This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH rs6000 testsuite] Fix PR79158


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"    } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]