diff mbox

[committed] , Update tests for pr80510 on PowerPC

Message ID 20170621211815.GA24063@ibm-tiger.the-meissners.org
State New
Headers show

Commit Message

Michael Meissner June 21, 2017, 9:18 p.m. UTC
Andreas Schwab noticed that the tests for PR target/80510 were failing on
32-bit PowerPC systems.

In looking at the tests, the reason was it was trying to create a test that had
more than 32 live floating point values.  The loop to use all of the values had
tests of the form:

  for (i = 0; i < n; i++)
    {
      ITYPE bit = get_bits (bits[i]);

      if ((bit & ((ITYPE)1) << 33) != 0) x_33 += one;
    }

where ITYPE was a long type (and 32-bits on a 32-bit system).  I changed this
to __INT64_TYPE__, and the test does not work.  It turns out, only the 64-bit
system had added support for STXSDX and STXSSPX.

I've checked the following into trunk, and I will check it into the gcc-7 and
gcc-6 branches so that the test is run only on 64-bit systems, but I want to
look at enabling the support in 32-bit systems.

2017-06-21  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/80510
	* gcc.target/powerpc/pr80510-1.c: Restrict test to 64-bit until
	32-bit support is added.  Change ITYPE size to 64-bit integer.
	* gcc.target/powerpc/pr80510-2.c: Likewise.
diff mbox

Patch

Index: gcc/testsuite/gcc.target/powerpc/pr80510-1.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/pr80510-1.c	(revision 249466)
+++ gcc/testsuite/gcc.target/powerpc/pr80510-1.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
@@ -6,8 +6,10 @@ 
 
 /* Make sure that STXSDX is generated for double scalars in Altivec registers
    on power7 instead of moving the value to a FPR register and doing a X-FORM
-   store.  */
+   store.
 
+   32-bit currently does not have support for STXSDX in the mov{df,dd} patterns.  */
+
 #ifndef TYPE
 #define TYPE double
 #endif
@@ -21,7 +23,7 @@ 
 #endif
 
 #ifndef ITYPE
-#define ITYPE long
+#define ITYPE __INT64_TYPE__
 #endif
 
 #ifdef DO_CALL
Index: gcc/testsuite/gcc.target/powerpc/pr80510-2.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/pr80510-2.c	(revision 249466)
+++ gcc/testsuite/gcc.target/powerpc/pr80510-2.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
@@ -6,8 +6,10 @@ 
 
 /* Make sure that STXSSPX is generated for float scalars in Altivec registers
    on power7 instead of moving the value to a FPR register and doing a X-FORM
-   store.  */
+   store.
 
+   32-bit currently does not have support for STXSSPX in the mov{sf,sd} patterns.  */
+
 #ifndef TYPE
 #define TYPE float
 #endif
@@ -21,7 +23,7 @@ 
 #endif
 
 #ifndef ITYPE
-#define ITYPE long
+#define ITYPE __INT64_TYPE__
 #endif
 
 #ifdef DO_CALL