From: Uros Bizjak Date: Tue, 3 Nov 2015 08:34:42 +0000 (+0100) Subject: mvc1.c: Move to ... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbe741d0e2c6d5a7247a2a724699f7ba20cb6ad9;p=gcc.git mvc1.c: Move to ... * 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 74a0c1aa0b3..444d4b79f27 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,22 @@ +2015-11-03 Uros Bizjak + + * 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 PR tree-optimization/68083 diff --git a/gcc/testsuite/g++.dg/ext/mvc1.C b/gcc/testsuite/g++.dg/ext/mvc1.C index fbf90116694..ff37238a4e0 100644 --- a/gcc/testsuite/g++.dg/ext/mvc1.C +++ b/gcc/testsuite/g++.dg/ext/mvc1.C @@ -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 index 8e02721c91e..00000000000 --- a/gcc/testsuite/gcc.dg/mvc1.c +++ /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 index af0c6f777a0..00000000000 --- a/gcc/testsuite/gcc.dg/mvc2.c +++ /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 index 3af3e35b4ec..00000000000 --- a/gcc/testsuite/gcc.dg/mvc3.c +++ /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 index 48ec9a163ee..00000000000 --- a/gcc/testsuite/gcc.dg/mvc4.c +++ /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 index 89001e571ae..00000000000 --- a/gcc/testsuite/gcc.dg/mvc5.c +++ /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 index 16219851398..00000000000 --- a/gcc/testsuite/gcc.dg/mvc6.c +++ /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 index d61d78e4036..00000000000 --- a/gcc/testsuite/gcc.dg/mvc7.c +++ /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 index 00000000000..752b3af7469 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/mvc1.c @@ -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 index 00000000000..9635ec83fac --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/mvc2.c @@ -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 index 00000000000..f940cdbbf55 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/mvc3.c @@ -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 index 00000000000..91293c34cca --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/mvc4.c @@ -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 index 00000000000..0b1981d4ad6 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/mvc5.c @@ -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 index 00000000000..d584f573328 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/mvc6.c @@ -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 index 00000000000..efc4b69aa49 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/mvc7.c @@ -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(); +}