diff mbox

[rs6000] Fix PR70957 (skip vsx-elemrev-[24].c tests for a downlevel assembler)

Message ID 357F7A5D-0FB5-41F9-8959-E9A3366A0D51@linux.vnet.ibm.com
State New
Headers show

Commit Message

Bill Schmidt June 2, 2016, 8:50 p.m. UTC
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.

Comments

Segher Boessenkool June 3, 2016, 10:31 a.m. UTC | #1
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
diff mbox

Patch

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