diff mbox

[rs6000] Fix PR79160 (vsx-elemrev-4.c)

Message ID 1485384066.5423.13.camel@oc8801110288.ibm.com
State New
Headers show

Commit Message

Bill Schmidt Jan. 25, 2017, 10:41 p.m. UTC
Hi,

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79160 records that
gcc.target/powerpc/vsx-elemrev-4.c fails on powerpc64 big-endian.  The
test was developed just prior to the introduction of D-form memory
access instructions lxv and stxv, so it relied on output of X-form
instructions lxvx and stxvx.  Either would be acceptable, but with the
introduction of the D-form instructions, they are preferred by the code
generator when they apply.  I've changed the test case to accept either
the D-form or the X-form instructions.

Tested adn veriried on powerpc64-unknown-linux-gnu.  Ok for trunk?

Thanks,
Bill


2017-01-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/vsx-elemrev-4.c: Change expected code
	generation to accept D-mode memory accesses.

Comments

Segher Boessenkool Jan. 26, 2017, 2:40 a.m. UTC | #1
On Wed, Jan 25, 2017 at 04:41:06PM -0600, Bill Schmidt wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79160 records that
> gcc.target/powerpc/vsx-elemrev-4.c fails on powerpc64 big-endian.  The
> test was developed just prior to the introduction of D-form memory
> access instructions lxv and stxv, so it relied on output of X-form
> instructions lxvx and stxvx.  Either would be acceptable, but with the
> introduction of the D-form instructions, they are preferred by the code
> generator when they apply.  I've changed the test case to accept either
> the D-form or the X-form instructions.
> 
> Tested adn veriried on powerpc64-unknown-linux-gnu.  Ok for trunk?

I hope you did proofread the patch better than your email ;-)

> --- gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c	(revision 244824)
> +++ gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c	(working copy)
> @@ -3,8 +3,8 @@
>  /* { dg-options "-mcpu=power9 -O0" } */
>  /* { dg-require-effective-target powerpc_p9vector_ok } */
>  /* { dg-skip-if "" { powerpc*-*-aix* } { "*" } { "" } } */
> -/* { dg-final { scan-assembler-times "lxvx" 40 } } */
> -/* { dg-final { scan-assembler-times "stxvx" 40 } } */
> +/* { dg-final { scan-assembler-times "lxv" 40 } } */
> +/* { dg-final { scan-assembler-times "stxv" 40 } } */

Please add a comment saying this is meant to match either lxv or lxvx,
etc.  Okay with that added.  Thanks,


Segher
diff mbox

Patch

Index: gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c	(revision 244824)
+++ gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c	(working copy)
@@ -3,8 +3,8 @@ 
 /* { dg-options "-mcpu=power9 -O0" } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
 /* { dg-skip-if "" { powerpc*-*-aix* } { "*" } { "" } } */
-/* { dg-final { scan-assembler-times "lxvx" 40 } } */
-/* { dg-final { scan-assembler-times "stxvx" 40 } } */
+/* { dg-final { scan-assembler-times "lxv" 40 } } */
+/* { dg-final { scan-assembler-times "stxv" 40 } } */
 
 #include <altivec.h>