+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.
/* { 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>
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
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 } } */
/* { 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 } } */