[PATCH rs6000 testsuite] Fix PR79158

Segher Boessenkool segher@kernel.crashing.org
Fri Feb 3 01:59:00 GMT 2017


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



More information about the Gcc-patches mailing list