From 62064ec0093bc9d2561b1ca1c163adb1daa5dc01 Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Tue, 17 Dec 2019 16:37:09 +0000 Subject: [PATCH] Fix vector testcases for amdgcn. 2019-12-17 Andrew Stubbs gcc/testsuite/ * gcc.dg/vect/pr65947-8.c: Change pass conditions for amdgcn. * gcc.dg/vect/vect-multitypes-11.c: Ensure that main isn't vectorized. * gcc.dg/vect/vect-multitypes-12.c: Likewise. From-SVN: r279465 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/vect/pr65947-8.c | 7 ++++--- gcc/testsuite/gcc.dg/vect/vect-multitypes-11.c | 1 + gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3794eba80ee..9cc9c69d703 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-12-17 Andrew Stubbs + + * gcc.dg/vect/pr65947-8.c: Change pass conditions for amdgcn. + * gcc.dg/vect/vect-multitypes-11.c: Ensure that main isn't vectorized. + * gcc.dg/vect/vect-multitypes-12.c: Likewise. + 2019-12-17 Christophe Lyon * gcc.target/arm/pr45701-1.c: Adjust for -mpure-code. 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*-*-* } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-11.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-11.c index c58391f495e..b840f18d0c4 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-11.c +++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-11.c @@ -17,6 +17,7 @@ foo (int len, int *z) { } +__attribute__ ((optimize(("no-tree-vectorize")))) int main (void) { short i; diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c index b09caeb51b6..a7e24797b31 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c +++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c @@ -16,7 +16,7 @@ foo (int len, int *z) { } } - +__attribute__ ((optimize("no-tree-vectorize"))) int main (void) { char i; -- 2.30.2