mvc1.c: Move to ...
authorUros Bizjak <ubizjak@gmail.com>
Tue, 3 Nov 2015 08:34:42 +0000 (09:34 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 3 Nov 2015 08:34:42 +0000 (09:34 +0100)
* 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.

From-SVN: r229697

16 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/mvc1.C
gcc/testsuite/gcc.dg/mvc1.c [deleted file]
gcc/testsuite/gcc.dg/mvc2.c [deleted file]
gcc/testsuite/gcc.dg/mvc3.c [deleted file]
gcc/testsuite/gcc.dg/mvc4.c [deleted file]
gcc/testsuite/gcc.dg/mvc5.c [deleted file]
gcc/testsuite/gcc.dg/mvc6.c [deleted file]
gcc/testsuite/gcc.dg/mvc7.c [deleted file]
gcc/testsuite/gcc.target/i386/mvc1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/mvc2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/mvc3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/mvc4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/mvc5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/mvc6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/mvc7.c [new file with mode: 0644]

index 74a0c1aa0b333ae1bfcef55ca3aa4740cf86a9a6..444d4b79f275aefaea05e8509c278354e28bb50d 100644 (file)
@@ -1,3 +1,22 @@
+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.
+
 2015-11-02  Alexandre Oliva <aoliva@redhat.com>
 
        PR tree-optimization/68083
index fbf90116694a05be75f41bd0fb30c006a63a824f..ff37238a4e0ae72105b56fa708d0596026464abf 100644 (file)
@@ -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
diff --git a/gcc/testsuite/gcc.dg/mvc1.c b/gcc/testsuite/gcc.dg/mvc1.c
deleted file mode 100644 (file)
index 8e02721..0000000
+++ /dev/null
@@ -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;
-}
diff --git a/gcc/testsuite/gcc.dg/mvc2.c b/gcc/testsuite/gcc.dg/mvc2.c
deleted file mode 100644 (file)
index af0c6f7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-
-__attribute__((target_clones("avx","arch=slm","arch=core-avx2")))
-int foo ();
diff --git a/gcc/testsuite/gcc.dg/mvc3.c b/gcc/testsuite/gcc.dg/mvc3.c
deleted file mode 100644 (file)
index 3af3e35..0000000
+++ /dev/null
@@ -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();
-}
diff --git a/gcc/testsuite/gcc.dg/mvc4.c b/gcc/testsuite/gcc.dg/mvc4.c
deleted file mode 100644 (file)
index 48ec9a1..0000000
+++ /dev/null
@@ -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;
-}
diff --git a/gcc/testsuite/gcc.dg/mvc5.c b/gcc/testsuite/gcc.dg/mvc5.c
deleted file mode 100644 (file)
index 89001e5..0000000
+++ /dev/null
@@ -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 ();
-}
diff --git a/gcc/testsuite/gcc.dg/mvc6.c b/gcc/testsuite/gcc.dg/mvc6.c
deleted file mode 100644 (file)
index 1621985..0000000
+++ /dev/null
@@ -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];
-    }
-}
diff --git a/gcc/testsuite/gcc.dg/mvc7.c b/gcc/testsuite/gcc.dg/mvc7.c
deleted file mode 100644 (file)
index d61d78e..0000000
+++ /dev/null
@@ -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();
-}
diff --git a/gcc/testsuite/gcc.target/i386/mvc1.c b/gcc/testsuite/gcc.target/i386/mvc1.c
new file mode 100644 (file)
index 0000000..752b3af
--- /dev/null
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-require-ifunc "" } */
+
+__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;
+}
diff --git a/gcc/testsuite/gcc.target/i386/mvc2.c b/gcc/testsuite/gcc.target/i386/mvc2.c
new file mode 100644 (file)
index 0000000..9635ec8
--- /dev/null
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+
+__attribute__((target_clones("avx","arch=slm","arch=core-avx2")))
+int foo ();
diff --git a/gcc/testsuite/gcc.target/i386/mvc3.c b/gcc/testsuite/gcc.target/i386/mvc3.c
new file mode 100644 (file)
index 0000000..f940cdb
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+
+__attribute__((target_clones("avx","arch=slm","arch=core-avx2")))
+int foo (); /* { dg-error "default target was not set" } */
+
+int
+bar ()
+{
+  return foo();
+}
diff --git a/gcc/testsuite/gcc.target/i386/mvc4.c b/gcc/testsuite/gcc.target/i386/mvc4.c
new file mode 100644 (file)
index 0000000..91293c3
--- /dev/null
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-require-ifunc "" } */
+
+__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;
+}
diff --git a/gcc/testsuite/gcc.target/i386/mvc5.c b/gcc/testsuite/gcc.target/i386/mvc5.c
new file mode 100644 (file)
index 0000000..0b1981d
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { 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 ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/mvc6.c b/gcc/testsuite/gcc.target/i386/mvc6.c
new file mode 100644 (file)
index 0000000..d584f57
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { 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];
+    }
+}
diff --git a/gcc/testsuite/gcc.target/i386/mvc7.c b/gcc/testsuite/gcc.target/i386/mvc7.c
new file mode 100644 (file)
index 0000000..efc4b69
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-final { scan-assembler-times "foo.ifunc" 4 } } */
+
+__attribute__((target_clones("avx","default","arch=slm","arch=core-avx2")))
+int foo ();
+
+int main()
+{
+  return foo();
+}