From f5ef2a143cc5ab8e8d8e25e2e74228d160bacb55 Mon Sep 17 00:00:00 2001 From: Will Schmidt Date: Fri, 26 Jan 2018 15:30:41 +0000 Subject: [PATCH] fold-vec-cmp-int.c: Delete. [testsuite] 2018-01-24 Will Schmidt * gcc.target/powerpc/fold-vec-cmp-int.c: Delete. * gcc.target/powerpc/fold-vec-cmp-int.h: New. * gcc.target/powerpc/fold-vec-cmp-int.p7.c: New. * gcc.target/powerpc/fold-vec-cmp-int.p8.c: New. * gcc.target/powerpc/fold-vec-cmp-int.p9.c: New. * gcc.target/powerpc/fold-vec-cmp-short.c: Delete. * gcc.target/powerpc/fold-vec-cmp-short.h: New. * gcc.target/powerpc/fold-vec-cmp-short.p8.c: New. * gcc.target/powerpc/fold-vec-cmp-short.p9.c: New. * gcc.target/powerpc/fold-vec-cmp-char.c: Delete. * gcc.target/powerpc/fold-vec-cmp-char.h: New. * gcc.target/powerpc/fold-vec-cmp-char.p8.c: New. * gcc.target/powerpc/fold-vec-cmp-char.p9.c: New. From-SVN: r257095 --- gcc/testsuite/ChangeLog | 16 ++++++++++++++++ .../{fold-vec-cmp-char.c => fold-vec-cmp-char.h} | 13 ++----------- .../gcc.target/powerpc/fold-vec-cmp-char.p8.c | 15 +++++++++++++++ .../gcc.target/powerpc/fold-vec-cmp-char.p9.c | 16 ++++++++++++++++ .../{fold-vec-cmp-int.c => fold-vec-cmp-int.h} | 5 ----- .../gcc.target/powerpc/fold-vec-cmp-int.p7.c | 14 ++++++++++++++ .../gcc.target/powerpc/fold-vec-cmp-int.p8.c | 14 ++++++++++++++ .../gcc.target/powerpc/fold-vec-cmp-int.p9.c | 15 +++++++++++++++ ...fold-vec-cmp-short.c => fold-vec-cmp-short.h} | 5 ----- .../gcc.target/powerpc/fold-vec-cmp-short.p8.c | 16 ++++++++++++++++ .../gcc.target/powerpc/fold-vec-cmp-short.p9.c | 16 ++++++++++++++++ 11 files changed, 124 insertions(+), 21 deletions(-) rename gcc/testsuite/gcc.target/powerpc/{fold-vec-cmp-char.c => fold-vec-cmp-char.h} (73%) create mode 100644 gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.p8.c create mode 100644 gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.p9.c rename gcc/testsuite/gcc.target/powerpc/{fold-vec-cmp-int.c => fold-vec-cmp-int.h} (86%) create mode 100644 gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p7.c create mode 100644 gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p8.c create mode 100644 gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p9.c rename gcc/testsuite/gcc.target/powerpc/{fold-vec-cmp-short.c => fold-vec-cmp-short.h} (87%) create mode 100644 gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.p8.c create mode 100644 gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.p9.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3a5c840cdc7..fa0a167e2fd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2018-01-26 Will Schmidt + + * gcc.target/powerpc/fold-vec-cmp-int.c: Delete. + * gcc.target/powerpc/fold-vec-cmp-int.h: New. + * gcc.target/powerpc/fold-vec-cmp-int.p7.c: New. + * gcc.target/powerpc/fold-vec-cmp-int.p8.c: New. + * gcc.target/powerpc/fold-vec-cmp-int.p9.c: New. + * gcc.target/powerpc/fold-vec-cmp-short.c: Delete. + * gcc.target/powerpc/fold-vec-cmp-short.h: New. + * gcc.target/powerpc/fold-vec-cmp-short.p8.c: New. + * gcc.target/powerpc/fold-vec-cmp-short.p9.c: New. + * gcc.target/powerpc/fold-vec-cmp-char.c: Delete. + * gcc.target/powerpc/fold-vec-cmp-char.h: New. + * gcc.target/powerpc/fold-vec-cmp-char.p8.c: New. + * gcc.target/powerpc/fold-vec-cmp-char.p9.c: New. + 2018-01-26 Martin Liska * lib/target-supports.exp: Return a value, otherwise -Wreturn-type diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.h similarity index 73% rename from gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.c rename to gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.h index 3a1aa60cbff..53161213ca9 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.h @@ -1,9 +1,5 @@ -/* Verify that overloaded built-ins for vec_cmp{eq,ge,gt,le,lt,ne} with - char inputs produce the right code. */ - -/* { dg-do compile } */ -/* { dg-require-effective-target powerpc_p8vector_ok } */ -/* { dg-options "-mpower8-vector -O2" } */ +/* Header file for fold-vec-cmp-char*.c tests. Used to verify codegen results + for vec_cmp{eq,ge,gt,le,lt,ne} builtins. */ #include @@ -79,8 +75,3 @@ test6_ne (vector unsigned char x, vector unsigned char y) return vec_cmpne (x, y); } -/* { dg-final { scan-assembler-times "vcmpequb" 4 } } */ -/* { dg-final { scan-assembler-times "vcmpgtsb" 4 } } */ -/* { dg-final { scan-assembler-times "vcmpgtub" 4 } } */ -/* { dg-final { scan-assembler-times "xxlnor" 6 } } */ - diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.p8.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.p8.c new file mode 100644 index 00000000000..c14a98e735a --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.p8.c @@ -0,0 +1,15 @@ +/* Verify that overloaded built-ins for vec_cmp{eq,ge,gt,le,lt,ne} with + char inputs produce the right code when -mcpu=power8 is specified. */ + +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-options "-mpower8-vector -mcpu=power8 -O2" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ + +#include "fold-vec-cmp-char.h" + +/* { dg-final { scan-assembler-times "vcmpequb" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtsb" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtub" 4 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 6 } } */ + diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.p9.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.p9.c new file mode 100644 index 00000000000..e3ff89c483e --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.p9.c @@ -0,0 +1,16 @@ +/* Verify that overloaded built-ins for vec_cmp{eq,ge,gt,le,lt,ne} with + char inputs produce the right code when -mcpu=power9 is specified. */ + +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-options "-mpower8-vector -mcpu=power9 -O2" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ + +#include "fold-vec-cmp-char.h" + +/* { dg-final { scan-assembler-times "vcmpneb" 2 } } */ +/* { dg-final { scan-assembler-times "vcmpequb" 2 } } */ +/* { dg-final { scan-assembler-times "vcmpgtsb" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtub" 4 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 4 } } */ + diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.h similarity index 86% rename from gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.c rename to gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.h index d53994d3ac8..0da58e0e0a9 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.h @@ -79,8 +79,3 @@ test6_ne (vector unsigned int x, vector unsigned int y) return vec_cmpne (x, y); } -/* { dg-final { scan-assembler-times "vcmpequw" 4 } } */ -/* { dg-final { scan-assembler-times "vcmpgtsw" 4 } } */ -/* { dg-final { scan-assembler-times "vcmpgtuw" 4 } } */ -/* { dg-final { scan-assembler-times "xxlnor" 6 } } */ - diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p7.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p7.c new file mode 100644 index 00000000000..87038ebd606 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p7.c @@ -0,0 +1,14 @@ +/* Verify that overloaded built-ins for vec_cmp with int + inputs produce the right code. */ + +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-options "-mcpu=power7 -O2" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ + +#include "fold-vec-cmp-int.h" + +/* { dg-final { scan-assembler-times "vcmpequw" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtsw" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtuw" 4 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 6 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p8.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p8.c new file mode 100644 index 00000000000..023ea7345d4 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p8.c @@ -0,0 +1,14 @@ +/* Verify that overloaded built-ins for vec_cmp with int + inputs produce the right code. */ + +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-options "-mpower8-vector -mcpu=power8 -O2" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ + +#include "fold-vec-cmp-int.h" + +/* { dg-final { scan-assembler-times "vcmpequw" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtsw" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtuw" 4 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 6 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p9.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p9.c new file mode 100644 index 00000000000..ba6d788afca --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.p9.c @@ -0,0 +1,15 @@ +/* Verify that overloaded built-ins for vec_cmp with int + inputs produce the right code. */ + +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-options "-mpower9-vector -O2" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ + +#include "fold-vec-cmp-int.h" + +/* { dg-final { scan-assembler-times "vcmpequw" 2 } } */ +/* { dg-final { scan-assembler-times "vcmpnew" 2 } } */ +/* { dg-final { scan-assembler-times "vcmpgtsw" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtuw" 4 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 4 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.h similarity index 87% rename from gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.c rename to gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.h index 60676691efe..5729db4aaee 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.h @@ -80,8 +80,3 @@ test6_ne (vector unsigned short x, vector unsigned short y) return vec_cmpne (x, y); } -/* { dg-final { scan-assembler-times "vcmpequh" 4 } } */ -/* { dg-final { scan-assembler-times "vcmpgtsh" 4 } } */ -/* { dg-final { scan-assembler-times "vcmpgtuh" 4 } } */ -/* { dg-final { scan-assembler-times "xxlnor" 6 } } */ - diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.p8.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.p8.c new file mode 100644 index 00000000000..d7dd06d11e5 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.p8.c @@ -0,0 +1,16 @@ +/* Verify that overloaded built-ins for vec_cmp with short + inputs produce the right code. */ + +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-options "-mpower8-vector -mcpu=power8 -O2" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ + +#include "fold-vec-cmp-short.h" + +/* { dg-final { scan-assembler-times "vcmpequh" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpneh" 0 } } */ +/* { dg-final { scan-assembler-times "vcmpgtsh" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtuh" 4 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 6 } } */ + diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.p9.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.p9.c new file mode 100644 index 00000000000..1fc68589313 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-short.p9.c @@ -0,0 +1,16 @@ +/* Verify that overloaded built-ins for vec_cmp with short + inputs produce the right code. */ + +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-options "-mpower9-vector -mcpu=power9 -O2" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ + +#include "fold-vec-cmp-short.h" + +/* { dg-final { scan-assembler-times "vcmpequh" 2 } } */ +/* { dg-final { scan-assembler-times "vcmpneh" 2 } } */ +/* { dg-final { scan-assembler-times "vcmpgtsh" 4 } } */ +/* { dg-final { scan-assembler-times "vcmpgtuh" 4 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 4 } } */ + -- 2.30.2