Message ID | a018b6e7-f493-1217-027d-f585a5953225@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On Thu, Feb 02, 2017 at 02:09:55PM -0600, Pat Haugen wrote: > 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? Okay. Thanks, Segher > 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: 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" } } */