[PATCH, testsuite]: Move x86 specific tests to gcc.target/i386 directory

Uros Bizjak ubizjak@gmail.com
Tue Nov 3 08:39:00 GMT 2015


... and add ifunc effective target requirement where necessary.

2015-11-03  Uros Bizjak  <ubizjak@gmail.com>

    * gcc.dg/mvc1.c: Move to ...
    * gcc.target/i386/mvc1.c: ... here.  Require ifunc.
    * gcc.dg/mvc2.c: Move to ...
    * gcc.target/i386/mvc2.c: ... here.
    * gcc.dg/mvc3.c: Move to ...
    * gcc.target/i386/mvc3.c: ... here.
    * gcc.dg/mvc4.c: Move to ...
    * gcc.target/i386/mvc4.c: ... here.  Require ifunc.
    * gcc.dg/mvc5.c: Move to ...
    * gcc.target/i386/mvc5.c: ... here.
    * gcc.dg/mvc6.c: Move to ...
    * gcc.target/i386/mvc6.c: ... here.
    * gcc.dg/mvc7.c: Move to ...
    * gcc.target/i386/mvc7.c: ... here.

    * g++.dg/ext/mvc1.C: Require ifunc.

Tested on x86_64-linux-gnu {,-m32} CentOS 5.11 (no ifunc
functionality) and committed to mainline SVN.

Uros.
-------------- next part --------------
Index: gcc.target/i386/mvc3.c
===================================================================
--- gcc.target/i386/mvc3.c	(revision 229652)
+++ gcc.target/i386/mvc3.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
 
 __attribute__((target_clones("avx","arch=slm","arch=core-avx2")))
 int foo (); /* { dg-error "default target was not set" } */
Index: gcc.target/i386/mvc4.c
===================================================================
--- gcc.target/i386/mvc4.c	(revision 229652)
+++ gcc.target/i386/mvc4.c	(working copy)
@@ -1,4 +1,5 @@
-/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-ifunc "" } */
 
 __attribute__((target_clones("default","avx","default")))
 int
Index: gcc.target/i386/mvc5.c
===================================================================
--- gcc.target/i386/mvc5.c	(revision 229652)
+++ gcc.target/i386/mvc5.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
 /* { dg-options "-fno-inline" } */
 /* { dg-final { scan-assembler-times "foo.ifunc" 6 } } */
 
Index: gcc.target/i386/mvc6.c
===================================================================
--- gcc.target/i386/mvc6.c	(revision 229652)
+++ gcc.target/i386/mvc6.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
 /* { dg-options "-O3" } */
 /* { dg-final { scan-assembler "vpshufb" } } */
 /* { dg-final { scan-assembler "punpcklbw" } } */
Index: gcc.target/i386/mvc7.c
===================================================================
--- gcc.target/i386/mvc7.c	(revision 229652)
+++ gcc.target/i386/mvc7.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
 /* { dg-final { scan-assembler-times "foo.ifunc" 4 } } */
 
 __attribute__((target_clones("avx","default","arch=slm","arch=core-avx2")))
Index: gcc.target/i386/mvc1.c
===================================================================
--- gcc.target/i386/mvc1.c	(revision 229652)
+++ gcc.target/i386/mvc1.c	(working copy)
@@ -1,4 +1,5 @@
-/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-do run } */
+/* { dg-require-ifunc "" } */
 
 __attribute__((target_clones("avx","arch=slm","arch=core-avx2","default")))
 int
Index: gcc.target/i386/mvc2.c
===================================================================
--- gcc.target/i386/mvc2.c	(revision 229652)
+++ gcc.target/i386/mvc2.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
 
 __attribute__((target_clones("avx","arch=slm","arch=core-avx2")))
 int foo ();
Index: gcc.dg/mvc3.c
===================================================================
--- gcc.dg/mvc3.c	(revision 229652)
+++ gcc.dg/mvc3.c	(working copy)
@@ -1,10 +0,0 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-
-__attribute__((target_clones("avx","arch=slm","arch=core-avx2")))
-int foo (); /* { dg-error "default target was not set" } */
-
-int
-bar ()
-{
-  return foo();
-}
Index: gcc.dg/mvc7.c
===================================================================
--- gcc.dg/mvc7.c	(revision 229652)
+++ gcc.dg/mvc7.c	(working copy)
@@ -1,10 +0,0 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-final { scan-assembler-times "foo.ifunc" 4 } } */
-
-__attribute__((target_clones("avx","default","arch=slm","arch=core-avx2")))
-int foo ();
-
-int main()
-{
-  return foo();
-}
Index: gcc.dg/mvc4.c
===================================================================
--- gcc.dg/mvc4.c	(revision 229652)
+++ gcc.dg/mvc4.c	(working copy)
@@ -1,26 +0,0 @@
-/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-
-__attribute__((target_clones("default","avx","default")))
-int
-foo ()
-{
-  return -2;
-}
-
-int
-bar ()
-{
-  return 2;
-}
-
-int
-main ()
-{
-  int r = 0;
-  r += bar ();
-  r += foo ();
-  r += bar ();
-  r += foo ();
-  r += bar ();
-  return r - 2;
-}
Index: gcc.dg/mvc1.c
===================================================================
--- gcc.dg/mvc1.c	(revision 229652)
+++ gcc.dg/mvc1.c	(working copy)
@@ -1,26 +0,0 @@
-/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-
-__attribute__((target_clones("avx","arch=slm","arch=core-avx2","default")))
-int
-foo ()
-{
-  return -2;
-}
-
-int
-bar ()
-{
-  return 2;
-}
-
-int
-main ()
-{
-  int r = 0;
-  r += bar ();
-  r += foo ();
-  r += bar ();
-  r += foo ();
-  r += bar ();
-  return r - 2;
-}
Index: gcc.dg/mvc5.c
===================================================================
--- gcc.dg/mvc5.c	(revision 229652)
+++ gcc.dg/mvc5.c	(working copy)
@@ -1,17 +0,0 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-fno-inline" } */
-/* { dg-final { scan-assembler-times "foo.ifunc" 6 } } */
-
-__attribute__((target_clones("default","avx","avx2")))
-int
-foo ()
-{
-  return 10;
-}
-
-__attribute__((target_clones("default","avx","avx2")))
-int
-bar ()
-{
-  return -foo ();
-}
Index: gcc.dg/mvc2.c
===================================================================
--- gcc.dg/mvc2.c	(revision 229652)
+++ gcc.dg/mvc2.c	(working copy)
@@ -1,4 +0,0 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-
-__attribute__((target_clones("avx","arch=slm","arch=core-avx2")))
-int foo ();
Index: gcc.dg/mvc6.c
===================================================================
--- gcc.dg/mvc6.c	(revision 229652)
+++ gcc.dg/mvc6.c	(working copy)
@@ -1,16 +0,0 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O3" } */
-/* { dg-final { scan-assembler "vpshufb" } } */
-/* { dg-final { scan-assembler "punpcklbw" } } */
-
-__attribute__((target_clones("arch=core-avx2","arch=slm","default")))
-void
-foo(char *in, char *out, int size)
-{
-  int i;
-  for(i = 0; i < size; i++)
-    {
-	out[2 * i] = in[i];
-	out[2 * i + 1] = in[i];
-    }
-}
Index: g++.dg/ext/mvc1.C
===================================================================
--- g++.dg/ext/mvc1.C	(revision 229652)
+++ g++.dg/ext/mvc1.C	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
 
 __attribute__((target_clones("avx","arch=slm","arch=core-avx2","default")))
 int


More information about the Gcc-patches mailing list