Hi,
Assorted updates for the vector intrinsics / gimple folding vec_cmp()
testcases to handle codegen variations as seen between P8,P9 targets.
This breaks apart the testcases into a #included header that contains the
testcase contents, and fold-vec-cmp-*.c tests that contain the target specific
stanzas.
sniff-tested across power systems.
This cleans up a handful of errors seen on P9.
OK for trunk?
Thanks,
-Will
[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.
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.c
b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.c
deleted file mode 100644
index 3a1aa60..000
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* 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" } */
-
-#include
-
-vector bool char
-test3_eq (vector signed char x, vector signed char y)
-{
- return vec_cmpeq (x, y);
-}
-
-vector bool char
-test6_eq (vector unsigned char x, vector unsigned char y)
-{
- return vec_cmpeq (x, y);
-}
-
-vector bool char
-test3_ge (vector signed char x, vector signed char y)
-{
- return vec_cmpge (x, y);
-}
-
-vector bool char
-test6_ge (vector unsigned char x, vector unsigned char y)
-{
- return vec_cmpge (x, y);
-}
-
-vector bool char
-test3_gt (vector signed char x, vector signed char y)
-{
- return vec_cmpgt (x, y);
-}
-
-vector bool char
-test6_gt (vector unsigned char x, vector unsigned char y)
-{
- return vec_cmpgt (x, y);
-}
-
-vector bool char
-test3_le (vector signed char x, vector signed char y)
-{
- return vec_cmple (x, y);
-}
-
-vector bool char
-test6_le (vector unsigned char x, vector unsigned char y)
-{
- return vec_cmple (x, y);
-}
-
-vector bool char
-test3_lt (vector signed char x, vector signed char y)
-{
- return vec_cmplt (x, y);
-}
-
-vector bool char
-test6_lt (vector unsigned char x, vector unsigned char y)
-{
- return vec_cmplt (x, y);
-}
-
-vector bool char
-test3_ne (vector signed char x, vector signed char y)
-{
- return vec_cmpne (x, y);
-}
-
-vector bool char
-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.h
b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.h
new file mode 100644
index 000..5316121
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-char.h
@@ -0,0 +1,77 @@
+/* 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
+
+vector bool char
+test3_eq (vector signed char x, vector signed char y)
+{
+ return vec_cmpeq (x, y);
+}
+
+vector bool char
+test6_eq (vector unsigned char x, vector unsigned char y)
+{
+ return vec_cmpeq (x, y);
+}
+
+vector bool char
+test3_ge (vector signed char x, vector signed char y)
+{
+ return vec_cmpge (x, y);
+}
+
+vector bool char
+test6_ge (vector unsigned char x, vector unsigned char y)
+{
+ return vec_cmpge (x, y);
+}
+
+vector bool char
+test3_gt (vector signed char x, vector signed char y)
+{
+ return vec_cmpgt (x, y);
+}
+
+vector bool char
+test6_gt (vector unsigned char x, vector unsigned char y)
+{
+ return vec_cmpgt (x, y);
+}
+
+vector bool char
+test3_le (vector signed char x, vector signed char y)
+{
+ return vec_cmple (x, y);
+}
+
+vector bool char
+test6_le (vector unsigned char x, vector unsigned char y)
+{
+ return vec_cmple (x, y);
+}
+
+vector bool char
+test3_lt (vector signed char x, vector signed char y)
+{
+ return vec_cmplt (x, y);
+}
+
+vector bool char
+test6_lt (vector unsigned char x, vector unsigned char y)
+{
+ return vec_cmplt (x, y);
+}
+
+vector bool char
+test3_ne (vector signed char x, vector signed char y)
+{
+ return vec_cmpne (x, y);
+}
+
+vector bool char
+test6_ne (vector unsigned