Patchwork Fix PR 47408, add explicit -mno-vsx to Altivec tests

login
register
mail settings
Submitter Michael Meissner
Date Jan. 21, 2011, 8:02 p.m.
Message ID <20110121200223.GA21919@hungry-tiger.westford.ibm.com>
Download mbox | patch
Permalink /patch/79916/
State New
Headers show

Comments

Michael Meissner - Jan. 21, 2011, 8:02 p.m.
This patch adds an explicit -mno-vsx to the various Altivec tests that should
not be compiled with VSX instructions.   This shows up if you build the
compiler with the --with-cpu=power7 configuration option.

Are these ok to install?

2011-01-21  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/47408
	* gcc.target/powerpc/altivec-11.c: Add explicit -mno-vsx.
	* gcc.target/powerpc/altivec-14.c: Ditto.
	* gcc.target/powerpc/altivec-33.c: Ditto.
	* gcc.target/powerpc/altivec-types-1.c: Ditto.
	* gcc.target/powerpc/altivec-types-2.c: Ditto.
	* gcc.target/powerpc/altivec-types-3.c: Ditto.
	* gcc.target/powerpc/altivec-types-4.c: Ditto.
	* gcc.target/powerpc/ppc-vector-memcpy.c: Ditto.
	* gcc.target/powerpc/ppc-vector-memset.c: Ditto.
	* g++.dg/ext/altivec-15.C: Ditto.
	* g++.dg/ext/altivec-types-1.C: Ditto.
	* g++.dg/ext/altivec-types-2.C: Ditto.
	* g++.dg/ext/altivec-types-3.C: Ditto.
	* g++.dg/ext/altivec-types-4.C: Ditto.
David Edelsohn - Jan. 23, 2011, 12:15 a.m.
On Fri, Jan 21, 2011 at 3:02 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> This patch adds an explicit -mno-vsx to the various Altivec tests that should
> not be compiled with VSX instructions.   This shows up if you build the
> compiler with the --with-cpu=power7 configuration option.
>
> Are these ok to install?
>
> 2011-01-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
>
>        PR target/47408
>        * gcc.target/powerpc/altivec-11.c: Add explicit -mno-vsx.
>        * gcc.target/powerpc/altivec-14.c: Ditto.
>        * gcc.target/powerpc/altivec-33.c: Ditto.
>        * gcc.target/powerpc/altivec-types-1.c: Ditto.
>        * gcc.target/powerpc/altivec-types-2.c: Ditto.
>        * gcc.target/powerpc/altivec-types-3.c: Ditto.
>        * gcc.target/powerpc/altivec-types-4.c: Ditto.
>        * gcc.target/powerpc/ppc-vector-memcpy.c: Ditto.
>        * gcc.target/powerpc/ppc-vector-memset.c: Ditto.
>        * g++.dg/ext/altivec-15.C: Ditto.
>        * g++.dg/ext/altivec-types-1.C: Ditto.
>        * g++.dg/ext/altivec-types-2.C: Ditto.
>        * g++.dg/ext/altivec-types-3.C: Ditto.
>        * g++.dg/ext/altivec-types-4.C: Ditto.

Okay.

Thanks, David

Patch

Index: gcc/testsuite/gcc.target/powerpc/altivec-types-2.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/altivec-types-2.c	(revision 169068)
+++ gcc/testsuite/gcc.target/powerpc/altivec-types-2.c	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile { target powerpc*-*-linux* } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec" } */
+/* { dg-options "-maltivec -mno-vsx" } */
 
 /* These should get warnings for 32-bit code.  */
 
Index: gcc/testsuite/gcc.target/powerpc/altivec-14.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/altivec-14.c	(revision 169068)
+++ gcc/testsuite/gcc.target/powerpc/altivec-14.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec" } */
+/* { dg-options "-maltivec -mno-vsx" } */
 
 #include <altivec.h>
 
Index: gcc/testsuite/gcc.target/powerpc/altivec-types-3.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/altivec-types-3.c	(revision 169068)
+++ gcc/testsuite/gcc.target/powerpc/altivec-types-3.c	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile { target powerpc*-*-linux* } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec" } */
+/* { dg-options "-maltivec -mno-vsx" } */
 
 /* These should be rejected for 64-bit code.  */
 
Index: gcc/testsuite/gcc.target/powerpc/altivec-types-4.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/altivec-types-4.c	(revision 169068)
+++ gcc/testsuite/gcc.target/powerpc/altivec-types-4.c	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile { target powerpc*-*-linux* } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec -mno-warn-altivec-long" } */
+/* { dg-options "-maltivec -mno-warn-altivec-long -mno-vsx" } */
 
 /* These should not get warnings for 32-bit code when the warning is
    disabled.  */
Index: gcc/testsuite/gcc.target/powerpc/altivec-33.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/altivec-33.c	(revision 169068)
+++ gcc/testsuite/gcc.target/powerpc/altivec-33.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-O2 -maltivec" } */
+/* { dg-options "-O2 -maltivec -mno-vsx" } */
 
 /* We should only produce one vspltw as we already splatted the value.  */
 /* { dg-final { scan-assembler-times "vspltw" 1 } } */
Index: gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c	(revision 169068)
+++ gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target powerpc*-*-* } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-O -maltivec" } */
+/* { dg-options "-O -maltivec -mno-vsx" } */
 /* { dg-final { scan-assembler "lvx" } } */
 
 void foo(void)
Index: gcc/testsuite/gcc.target/powerpc/altivec-11.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/altivec-11.c	(revision 169068)
+++ gcc/testsuite/gcc.target/powerpc/altivec-11.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target powerpc*-*-* } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-O2 -maltivec -mabi=altivec" } */
+/* { dg-options "-O2 -maltivec -mno-vsx -mabi=altivec" } */
 /* { dg-final { scan-assembler-not "lvx" } } */
 #include <altivec.h>
 
Index: gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c	(revision 169068)
+++ gcc/testsuite/gcc.target/powerpc/ppc-vector-memset.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target powerpc*-*-* } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-O -maltivec" } */
+/* { dg-options "-O -maltivec -mno-vsx" } */
 /* { dg-final { scan-assembler "stvx" } } */
 
 #include <string.h>
Index: gcc/testsuite/gcc.target/powerpc/altivec-types-1.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/altivec-types-1.c	(revision 169068)
+++ gcc/testsuite/gcc.target/powerpc/altivec-types-1.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target powerpc*-*-linux* } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec" } */
+/* { dg-options "-maltivec -mno-vsx" } */
 
 /* Valid AltiVec vector types should be accepted with no warnings.  */
 
Index: gcc/testsuite/g++.dg/ext/altivec-types-2.C
===================================================================
--- gcc/testsuite/g++.dg/ext/altivec-types-2.C	(revision 169068)
+++ gcc/testsuite/g++.dg/ext/altivec-types-2.C	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile { target powerpc*-*-linux* } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec" } */
+/* { dg-options "-maltivec -mno-vsx" } */
 
 /* These should get warnings for 32-bit code.  */
 
Index: gcc/testsuite/g++.dg/ext/altivec-types-3.C
===================================================================
--- gcc/testsuite/g++.dg/ext/altivec-types-3.C	(revision 169068)
+++ gcc/testsuite/g++.dg/ext/altivec-types-3.C	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile { target powerpc*-*-linux* } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
 /* { dg-require-effective-target lp64 } */
-/* { dg-options "-maltivec" } */
+/* { dg-options "-maltivec -mno-vsx" } */
 
 /* These should be rejected for 64-bit code.  */
 
Index: gcc/testsuite/g++.dg/ext/altivec-15.C
===================================================================
--- gcc/testsuite/g++.dg/ext/altivec-15.C	(revision 169068)
+++ gcc/testsuite/g++.dg/ext/altivec-15.C	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target powerpc*-*-* } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec" } */
+/* { dg-options "-maltivec -mno-vsx" } */
 
 /* This test was added for an internal compiler error.  The number and
    content of error messages is irrelevant.  */
Index: gcc/testsuite/g++.dg/ext/altivec-types-4.C
===================================================================
--- gcc/testsuite/g++.dg/ext/altivec-types-4.C	(revision 169068)
+++ gcc/testsuite/g++.dg/ext/altivec-types-4.C	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile { target powerpc*-*-linux* } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec -mno-warn-altivec-long" } */
+/* { dg-options "-maltivec -mno-vsx -mno-warn-altivec-long" } */
 
 /* These should not get warnings for 32-bit code when the warning is
    disabled.  */
Index: gcc/testsuite/g++.dg/ext/altivec-types-1.C
===================================================================
--- gcc/testsuite/g++.dg/ext/altivec-types-1.C	(revision 169068)
+++ gcc/testsuite/g++.dg/ext/altivec-types-1.C	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target powerpc*-*-linux* } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec -std=c++98" } */
+/* { dg-options "-maltivec -mno-vsx -std=c++98" } */
 
 /* Valid AltiVec vector types should be accepted with no warnings.  */