builtins-3-p8.c: Update stanzas.
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Fri, 16 Feb 2018 20:33:09 +0000 (20:33 +0000)
committerWill Schmidt <willschm@gcc.gnu.org>
Fri, 16 Feb 2018 20:33:09 +0000 (20:33 +0000)
[testsuite]
2018-02-16  Will Schmidt  <will_schmidt@vnet.ibm.com>

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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/builtins-3-p8.c
gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c
gcc/testsuite/gcc.target/powerpc/builtins-3-runnable.c
gcc/testsuite/gcc.target/powerpc/builtins-3-vec_reve-runnable.c
gcc/testsuite/gcc.target/powerpc/builtins-3.c

index 51f8d1f1a59e856d871af1aa78b456f65055c8c4..9cd3b3972354537e6415db0fb7e4648ce6dd162f 100644 (file)
@@ -1,3 +1,12 @@
+2018-02-16  Will Schmidt  <will_schmidt@vnet.ibm.com>
+
+       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  <nathan@acm.org>
 
        * g++.old-deja/g++.jason/scoping15.C: Fix dg-warning.
index 83d538b2cf3f0cc8328f3e3a49a014bb5325b3be..a58680554d4bc6de3fec21d6f712305886682f76 100644 (file)
@@ -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 <altivec.h>
 
index 9dc53da58ade30b382d3381c8c63bc7ad71c3e56..146f8b73c980e5e0d7b29af630e7275bc1770928 100644 (file)
@@ -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 <altivec.h>
 
@@ -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 } } */
 
index 15498173a3437cbc2edeef276d6a11c793cfc96f..43de4545861307c4fff708a81db84c5de67e701c 100644 (file)
@@ -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 <altivec.h> // vector
 
index f7c3c3d913896a2347e2c97fe377e4d26080f06a..de378e09697999dc25b1a4c91ffaf447c0b243a2 100644 (file)
@@ -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 <altivec.h> // vector
index 833116e597fd76b8f778a32442b731bf61e2c47a..b8a6dcdbb334b817613ac7bb4ea3a5981165e59a 100644 (file)
@@ -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 <altivec.h>