This patch fixes a test failure caused by GCN's ability to vectorize
mixed-mode operations not typically available on other platforms.
Basically, the testcase attempts to compare a vector of char against a
scalar int. GCN can do this just fine, so the loop vectorizes, but the
pass conditions expect that it will not.
I fixed it by special-casing GCN. There's might be a more general way,
but apparently this does happen for other architectures (?)
Andrew
Fix vect/pr65947-8.c testcase for amdgcn.
2019-12-18 Andrew Stubbs <a...@codesourcery.com>
gcc/testsuite/
* gcc.dg/vect/pr65947-8.c: Change pass conditions for amdgcn.
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-8.c b/gcc/testsuite/gcc.dg/vect/pr65947-8.c
index f0f1ac29699..a2a940daf1a 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-8.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-8.c
@@ -7,7 +7,7 @@ extern void abort (void) __attribute__ ((noreturn));
#define N 27
/* Condition reduction with multiple types in the comparison. Will fail to
- vectorize. */
+ vectorize on architectures requiring matching vector sizes. */
int
condition_reduction (char *a, int min_v)
@@ -41,5 +41,6 @@ main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
-/* { dg-final { scan-tree-dump "multiple types in double reduction or condition reduction" "vect" } } */
+/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" { target { ! amdgcn*-*-* } } } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target amdgcn*-*-* } } } */
+/* { dg-final { scan-tree-dump "multiple types in double reduction or condition reduction" "vect" { target { ! amdgcn*-*-* } } } } */