diff --git a/gcc/testsuite/gcc.target/powerpc/pr79251-run.c b/gcc/testsuite/gcc.target/powerpc/pr79251-run.c deleted file mode 100644 index 6afd357c7ba..00000000000 --- a/gcc/testsuite/gcc.target/powerpc/pr79251-run.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-require-effective-target vsx_hw } */ -/* { dg-options "-O2 -mvsx" } */ - -#include -#include -#include "pr79251.h" - -TEST_VEC_INSERT_ALL (test) - -#define run_test(TYPE, num) \ - { \ - vector TYPE v; \ - vector TYPE u = {0x0}; \ - for (long k = 0; k < 16 / sizeof (TYPE); k++) \ - v[k] = 0xaa; \ - for (long k = 0; k < 16 / sizeof (TYPE); k++) \ - { \ - u = test##num (v, 254, k); \ - if (u[k] != (TYPE) 254) \ - __builtin_abort (); \ - } \ - } - -int -main (void) -{ - TEST_VEC_INSERT_ALL (run_test) - return 0; -} diff --git a/gcc/testsuite/gcc.target/powerpc/pr79251-run.p8.c b/gcc/testsuite/gcc.target/powerpc/pr79251-run.p8.c new file mode 100644 index 00000000000..47d4d288f3c --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr79251-run.p8.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-require-effective-target p8vector_hw } */ +/* { dg-options "-O2 -mvsx -mdejagnu-cpu=power8" } */ + +#include +#include +#include "pr79251.h" + +int +main (void) +{ + TEST_VEC_INSERT_ALL (run_test) + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr79251-run.p9.c b/gcc/testsuite/gcc.target/powerpc/pr79251-run.p9.c new file mode 100644 index 00000000000..fd56b2356f4 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr79251-run.p9.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-require-effective-target p9vector_hw } */ +/* { dg-options "-O2 -mvsx -mdejagnu-cpu=power9" } */ + +#include +#include +#include "pr79251.h" + +int +main (void) +{ + TEST_VEC_INSERT_ALL (run_test) + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr79251.h b/gcc/testsuite/gcc.target/powerpc/pr79251.h index addb067f9ed..2684b660966 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr79251.h +++ b/gcc/testsuite/gcc.target/powerpc/pr79251.h @@ -17,3 +17,20 @@ T (unsigned long long, 7) \ T (float, 8) \ T (double, 9) + +TEST_VEC_INSERT_ALL (test) + +#define run_test(TYPE, num) \ + { \ + vector TYPE v; \ + vector TYPE u = {0x0}; \ + for (long k = 0; k < 16 / sizeof (TYPE); k++) \ + v[k] = 0xaa; \ + for (long k = 0; k < 16 / sizeof (TYPE); k++) \ + { \ + u = test##num (v, 254, k); \ + if (u[k] != (TYPE) 254) \ + __builtin_abort (); \ + } \ + } + diff --git a/gcc/testsuite/gcc.target/powerpc/pr79251.p8.c b/gcc/testsuite/gcc.target/powerpc/pr79251.p8.c index d31a905a013..77e8cbb55cc 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr79251.p8.c +++ b/gcc/testsuite/gcc.target/powerpc/pr79251.p8.c @@ -6,8 +6,6 @@ #include #include "pr79251.h" -TEST_VEC_INSERT_ALL (test) - /* { dg-final { scan-assembler-not {\mstxw\M} } } */ /* { dg-final { scan-assembler-times {\mlvsl\M} 10 { target lp64 } } } */ /* { dg-final { scan-assembler-times {\mlvsr\M} 3 { target lp64 } } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr79251.p9.c b/gcc/testsuite/gcc.target/powerpc/pr79251.p9.c index 78abd80f447..d4095d38319 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr79251.p9.c +++ b/gcc/testsuite/gcc.target/powerpc/pr79251.p9.c @@ -6,8 +6,6 @@ #include #include "pr79251.h" -TEST_VEC_INSERT_ALL (test) - /* { dg-final { scan-assembler-not {\mstxw\M} } } */ /* { dg-final { scan-assembler-times {\mlvsl\M} 10 { target lp64 } } } */ /* { dg-final { scan-assembler-times {\mlvsr\M} 10 { target lp64 } } } */