From 666b46c6106dbd3ad6a27be4bf1844ccbaa8e67d Mon Sep 17 00:00:00 2001 From: Sudakshina Das Date: Thu, 12 Dec 2019 18:01:18 +0000 Subject: [PATCH] [Committed, testsuite] Fix PR92870 With my recent commit, I added a test that is not passing on all targets. My change was valid for targets that have a vector/scalar shift/rotate optabs (optab that supports vector shifted by scalar). Since it does not seem to be easy to find out which targets would support it, I am limiting the test to the targets that I know pass. gcc/testsuite/ChangeLog 2019-12-12 Sudakshina Das PR testsuite/92870 * gcc.dg/vect/vect-shift-5.c: Add target to scan-tree-dump. From-SVN: r279310 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/vect/vect-shift-5.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cde7d7279fe..7ddcae3c87f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-12-12 Sudakshina Das + + PR testsuite/92870 + * gcc.dg/vect/vect-shift-5.c: Add target to scan-tree-dump. + 2019-12-12 Ed Schonberg * gnat.dg/warn24.adb: Remove expected warning. diff --git a/gcc/testsuite/gcc.dg/vect/vect-shift-5.c b/gcc/testsuite/gcc.dg/vect/vect-shift-5.c index c1fd4f23952..e47797f3366 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-shift-5.c +++ b/gcc/testsuite/gcc.dg/vect/vect-shift-5.c @@ -16,4 +16,7 @@ int foo (uint32_t arr[4][4]) return (((uint16_t)sum) + ((uint32_t)sum >> 16)) >> 1; } -/* { dg-final { scan-tree-dump {vectorizable_shift ===[\n\r][^\n]*prologue_cost = 0} "vect" } } */ +/* For a target that has a vector/scalar shift/rotate optab, check + that we are not adding the cost of creating a vector from the scalar + in the prologue. */ +/* { dg-final { scan-tree-dump {vectorizable_shift ===[\n\r][^\n]*prologue_cost = 0} "vect" { target { aarch64*-*-* x86_64-*-* } } } } */ -- 2.30.2