public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] Fix PR70957 (skip vsx-elemrev-[24].c tests for a downlevel assembler)
@ 2016-06-02 20:50 Bill Schmidt
  2016-06-03 10:31 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Schmidt @ 2016-06-02 20:50 UTC (permalink / raw)
  To: GCC Patches; +Cc: Segher Boessenkool, David Edelsohn

Hi,

PR70957 reports that the two subject tests fail on an older P7 machine.  These tests rely on
built-ins that exploit POWER9 vector support.  It turns out that the failure occurs because the
configured assembler is downlevel, and does not support even POWER8 instructions.  This 
causes TARGET_P8_VECTOR to be set to false, which in turn causes TARGET_P9_VECTOR
to be set to false, so the built-ins in question are not linked into the overloaded built-in table.

The only way I know to make the test predictable is to use a run-time test to check whether
P9 vector instructions will execute.  Thus this solution.  I’ve verified we no longer have test
failures on machines with a downlevel assembler, and the tests run correctly on machines
with an up-to-date assembler.  Is this ok for trunk and 6.2?

Thanks,
Bill


[2016-06-02]  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/70957
	* gcc.target/powerpc/vsx-elemrev-2.c: Require p9vector hardware
	support.
	* gcc.target/powerpc/vsx-elemrev-4.c: Likewise.


Index: gcc/testsuite/gcc.target/powerpc/vsx-elemrev-2.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/vsx-elemrev-2.c	(revision 237044)
+++ gcc/testsuite/gcc.target/powerpc/vsx-elemrev-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc64le*-*-* } } } */
 /* { dg-skip-if "do not override mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
 /* { dg-options "-mcpu=power9 -O0" } */
+/* { dg-require-effective-target p9vector_hw } */
 /* { dg-final { scan-assembler-times "lxvd2x" 6 } } */
 /* { dg-final { scan-assembler-times "lxvw4x" 6 } } */
 /* { dg-final { scan-assembler-times "lxvh8x" 4 } } */
Index: gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c	(revision 237044)
+++ gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc64-*-* } } } */
 /* { dg-skip-if "do not override mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
 /* { dg-options "-mcpu=power9 -O0" } */
+/* { dg-require-effective-target p9vector_hw } */
 /* { dg-final { scan-assembler-times "lxvx" 40 } } */
 /* { dg-final { scan-assembler-times "stxvx" 40 } } */
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, rs6000] Fix PR70957 (skip vsx-elemrev-[24].c tests for a downlevel assembler)
  2016-06-02 20:50 [PATCH, rs6000] Fix PR70957 (skip vsx-elemrev-[24].c tests for a downlevel assembler) Bill Schmidt
@ 2016-06-03 10:31 ` Segher Boessenkool
  0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2016-06-03 10:31 UTC (permalink / raw)
  To: Bill Schmidt; +Cc: GCC Patches, David Edelsohn

On Thu, Jun 02, 2016 at 03:50:21PM -0500, Bill Schmidt wrote:
> The only way I know to make the test predictable is to use a run-time test to check whether
> P9 vector instructions will execute.  Thus this solution.  I’ve verified we no longer have test
> failures on machines with a downlevel assembler, and the tests run correctly on machines
> with an up-to-date assembler.  Is this ok for trunk and 6.2?

This is fine.  Okay for both.  Thanks,


Segher

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-03 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02 20:50 [PATCH, rs6000] Fix PR70957 (skip vsx-elemrev-[24].c tests for a downlevel assembler) Bill Schmidt
2016-06-03 10:31 ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).