If you test an x86_64 toolchain with -march=bdver3 in the multilib
options, as noted in
<http://gcc.gnu.org/ml/gcc-patches/2014-03/msg01662.html> various test
failures arise from tests whose own -march= in dg-options is
overridden.  This patch adds dg-skip-if to those tests to skip them
for conflicting -march= options, as has been done before for other
tests (obviously, if the option ordering is changed in future in
DejaGnu, such skips may become obsolete or could be conditioned on
DejaGnu version).  (No doubt other -march= options would show up
further tests needing such changes.)

Tested x86_64-linux-gnu.  OK to commit?

2014-04-02  Joseph Myers  <jos...@codesourcery.com>

        * gcc.target/i386/funcspec-2.c, gcc.target/i386/funcspec-3.c,
        gcc.target/i386/funcspec-9.c, gcc.target/i386/isa-1.c,
        gcc.target/i386/memcpy-strategy-1.c,
        gcc.target/i386/memcpy-strategy-2.c,
        gcc.target/i386/memcpy-vector_loop-1.c,
        gcc.target/i386/memcpy-vector_loop-2.c,
        gcc.target/i386/memset-vector_loop-1.c,
        gcc.target/i386/memset-vector_loop-2.c,
        gcc.target/i386/sse2-init-v2di-2.c, gcc.target/i386/ssetype-1.c,
        gcc.target/i386/ssetype-2.c, gcc.target/i386/ssetype-5.c: Skip for
        -march= options different from those in dg-options.

Index: gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c
===================================================================
--- gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c        (revision 
209023)
+++ gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c        (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } 
*/
 /* { dg-options "-O2 -march=atom -minline-all-stringops 
-mstringop-strategy=vector_loop" } */
 /* { dg-final { scan-assembler-times "movdqa" 4} } */
 
Index: gcc/testsuite/gcc.target/i386/ssetype-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/ssetype-1.c   (revision 209023)
+++ gcc/testsuite/gcc.target/i386/ssetype-1.c   (working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* This test checks for absolute memory operands.  */
 /* { dg-require-effective-target nonpic } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
 /* { dg-options "-O2 -msse2 -march=k8" } */
 /* { dg-final { scan-assembler "andpd\[^\\n\]*magic" } } */
 /* { dg-final { scan-assembler "andnpd\[^\\n\]*magic" } } */
Index: gcc/testsuite/gcc.target/i386/ssetype-5.c
===================================================================
--- gcc/testsuite/gcc.target/i386/ssetype-5.c   (revision 209023)
+++ gcc/testsuite/gcc.target/i386/ssetype-5.c   (working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* This test checks for absolute memory operands.  */
 /* { dg-require-effective-target nonpic } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
 /* { dg-options "-O2 -msse2 -march=k8" } */
 /* { dg-final { scan-assembler "pand\[^\\n\]*magic" } } */
 /* { dg-final { scan-assembler "pandn\[^\\n\]*magic" } } */
Index: gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c
===================================================================
--- gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c        (revision 
209023)
+++ gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c        (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } 
*/
 /* { dg-options "-O2 -march=atom -minline-all-stringops 
-mstringop-strategy=vector_loop" } */
 /* { dg-final { scan-assembler-times "movdqa" 4} } */
 
Index: gcc/testsuite/gcc.target/i386/ssetype-2.c
===================================================================
--- gcc/testsuite/gcc.target/i386/ssetype-2.c   (revision 209023)
+++ gcc/testsuite/gcc.target/i386/ssetype-2.c   (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
 /* { dg-options "-O2 -msse2 -march=k8" } */
 /* { dg-final { scan-assembler "andpd" } } */
 /* { dg-final { scan-assembler "andnpd" } } */
Index: gcc/testsuite/gcc.target/i386/funcspec-9.c
===================================================================
--- gcc/testsuite/gcc.target/i386/funcspec-9.c  (revision 209023)
+++ gcc/testsuite/gcc.target/i386/funcspec-9.c  (working copy)
@@ -1,5 +1,6 @@
 /* Test whether using target specific options, we can generate FMA4 code.  */
 /* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
 /* { dg-options "-O2 -march=k8 -mfpmath=sse -msse2" } */
 
 extern void exit (int);
Index: gcc/testsuite/gcc.target/i386/funcspec-2.c
===================================================================
--- gcc/testsuite/gcc.target/i386/funcspec-2.c  (revision 209023)
+++ gcc/testsuite/gcc.target/i386/funcspec-2.c  (working copy)
@@ -1,5 +1,6 @@
 /* Test whether using target specific options, we can generate FMA4 code.  */
 /* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
 /* { dg-options "-O2 -march=k8" } */
 
 extern void exit (int);
Index: gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c   (revision 209023)
+++ gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c   (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } 
*/
 /* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:-1:align" } */
 /* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } 
*/
 /* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
Index: gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
===================================================================
--- gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c    (revision 209023)
+++ gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c    (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=core2" } } 
*/
 /* { dg-options "-O2 -msse4 -march=core2 -dp" } */
 
 #include <emmintrin.h>
Index: gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c        (revision 
209023)
+++ gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c        (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } 
*/
 /* { dg-options "-O2 -march=atom -minline-all-stringops 
-mstringop-strategy=vector_loop" } */
 /* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } 
*/
 /* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
Index: gcc/testsuite/gcc.target/i386/funcspec-3.c
===================================================================
--- gcc/testsuite/gcc.target/i386/funcspec-3.c  (revision 209023)
+++ gcc/testsuite/gcc.target/i386/funcspec-3.c  (working copy)
@@ -2,6 +2,7 @@
    setting the architecture.  */
 /* { dg-do compile } */
 /* { dg-require-effective-target lp64 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
 /* { dg-options "-O2 -march=k8 -mno-sse3" } */
 
 extern void exit (int);
Index: gcc/testsuite/gcc.target/i386/isa-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/isa-1.c       (revision 209023)
+++ gcc/testsuite/gcc.target/i386/isa-1.c       (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=x86-64" } 
} */
 /* { dg-options "-march=x86-64 -msse4" } */
 
 extern void abort (void);
Index: gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c        (revision 
209023)
+++ gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c        (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } 
*/
 /* { dg-options "-O2 -march=atom -minline-all-stringops 
-mstringop-strategy=vector_loop" } */
 /* { dg-final { scan-assembler-times "movdqa" 4 } } */
 
Index: gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c
===================================================================
--- gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c   (revision 209023)
+++ gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c   (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } 
*/
 /* { dg-options "-O2 -march=atom 
-mmemcpy-strategy=vector_loop:3000:align,libcall:-1:align" } */
 /* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } 
*/
 /* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to