From: Will Schmidt Date: Fri, 16 Feb 2018 20:33:09 +0000 (+0000) Subject: builtins-3-p8.c: Update stanzas. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=023e7b552641153895b906b6da22f6703c3bfdae;p=gcc.git builtins-3-p8.c: Update stanzas. [testsuite] 2018-02-16 Will Schmidt target/pr84371 * gcc.target/powerpc/builtins-3-p8.c: Update stanzas. * gcc.target/powerpc/builtins-3-p9.c: Update stanzas, Enhance test. * gcc.target/powerpc/builtins-3-runnable.c: Update stanzas. * gcc.target/powerpc/builtins-3-vec_reve_runnable.c: Same. * gcc.target/powerpc/builtins-3.c: Same. From-SVN: r257758 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 51f8d1f1a59..9cd3b397235 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2018-02-16 Will Schmidt + + target/pr84371 + * gcc.target/powerpc/builtins-3-p8.c: Update stanzas. + * gcc.target/powerpc/builtins-3-p9.c: Update stanzas, Enhance test. + * gcc.target/powerpc/builtins-3-runnable.c: Update stanzas. + * gcc.target/powerpc/builtins-3-vec_reve_runnable.c: Same. + * gcc.target/powerpc/builtins-3.c: Same. + 2018-02-16 Nathan Sidwell * g++.old-deja/g++.jason/scoping15.C: Fix dg-warning. diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c b/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c index 83d538b2cf3..a58680554d4 100644 --- a/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c +++ b/gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target powerpc_p8vector_ok } */ -/* { dg-options "-mcpu=power8" } */ +/* { dg-options "-maltivec -mcpu=power8" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ #include diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c b/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c index 9dc53da58ad..146f8b73c98 100644 --- a/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c +++ b/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target powerpc_p9vector_ok } */ /* { dg-options "-mcpu=power9 -O1" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ #include @@ -47,6 +48,43 @@ test_vull_bperm_vull_vuc (vector unsigned long long x, return vec_bperm (x, y); } +vector signed char +test_nabs_char (vector signed char x) +{ + return vec_nabs (x); +} + +vector short +test_nabs_short (vector short x) +{ + return vec_nabs (x); +} + +vector int +test_nabs_int (vector int x) +{ + return vec_nabs (x); +} + + +vector signed char +test_neg_char (vector signed char x) +{ + return vec_neg (x); +} + +vector short +test_neg_short (vector short x) +{ + return vec_neg (x); +} + +vector int +test_neg_int (vector int x) +{ + return vec_neg (x); +} + /* Expected test results: test_ne_char 1 vcmpneb @@ -57,6 +95,12 @@ test_vull_bperm_vull_vuc (vector unsigned long long x, test_vull_bperm_vull_vuc 1 vbpermd test_nabs_long_long (-O0) 1 xxspltib, 1 vsubudm, 1 vminsd test_nabs_long_long (-O1) 1 vnegd, vminsd + test_nabs_char (P9) 1 xxspltib, 1 vsububm, 1 vminsb + test_nabs_short (P9) 1 xxspltib, 1 vsubuhm, 1 vminsh + test_nabs_int (P9) 1 vnegw, 1 vminsw + test_neg_char (P9) 1 xxspltib, 1 vsububm + test_neg_short (P9) 1 xxspltib, 1 vsubuhm + test_neg_int (P9) 1 vnegw */ /* { dg-final { scan-assembler-times "vcmpneb" 1 } } */ @@ -64,9 +108,16 @@ test_vull_bperm_vull_vuc (vector unsigned long long x, /* { dg-final { scan-assembler-times "vcmpnew" 1 } } */ /* { dg-final { scan-assembler-times "vcmpequd" 1 } } */ /* { dg-final { scan-assembler-times "xxlnor" 1 } } */ -/* { dg-final { scan-assembler-times "xxspltib" 0 } } */ +/* { dg-final { scan-assembler-times "xxspltib" 4 } } */ /* { dg-final { scan-assembler-times "vsubudm" 0 } } */ +/* { dg-final { scan-assembler-times "vsububm" 2 } } */ +/* { dg-final { scan-assembler-times "vsubuhm" 2 } } */ +/* { dg-final { scan-assembler-times "vsubuwm" 0 } } */ +/* { dg-final { scan-assembler-times "vminsb" 1 } } */ +/* { dg-final { scan-assembler-times "vminsh" 1 } } */ +/* { dg-final { scan-assembler-times "vminsw" 1 } } */ /* { dg-final { scan-assembler-times "vminsd" 1 } } */ /* { dg-final { scan-assembler-times "vnegd" 2 } } */ +/* { dg-final { scan-assembler-times "vnegw" 2 } } */ /* { dg-final { scan-assembler-times "vbpermd" 1 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3-runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-3-runnable.c index 15498173a34..43de4545861 100644 --- a/gcc/testsuite/gcc.target/powerpc/builtins-3-runnable.c +++ b/gcc/testsuite/gcc.target/powerpc/builtins-3-runnable.c @@ -1,7 +1,7 @@ -/* { dg-do run { target { powerpc*-*-linux* } } } */ +/* { dg-do run { target { p8vector_hw } } } */ /* { dg-require-effective-target vsx_hw } */ /* { dg-options "-O2 -mvsx -mcpu=power8" } */ -/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=power8" } } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ #include // vector diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3-vec_reve-runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-3-vec_reve-runnable.c index f7c3c3d9138..de378e09697 100644 --- a/gcc/testsuite/gcc.target/powerpc/builtins-3-vec_reve-runnable.c +++ b/gcc/testsuite/gcc.target/powerpc/builtins-3-vec_reve-runnable.c @@ -1,5 +1,4 @@ -/* { dg-do run { target { powerpc*-*-linux* } } } */ -/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ +/* { dg-do run { target { vsx_hw } } } */ /* { dg-options "-O2 -mvsx -mcpu=power7" } */ #include // vector diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3.c b/gcc/testsuite/gcc.target/powerpc/builtins-3.c index 833116e597f..b8a6dcdbb33 100644 --- a/gcc/testsuite/gcc.target/powerpc/builtins-3.c +++ b/gcc/testsuite/gcc.target/powerpc/builtins-3.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target powerpc_vsx_ok } */ -/* { dg-options "-maltivec -mvsx" } */ +/* { dg-options "-O2 -mvsx -mcpu=power6" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */ #include