Hi 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 target that I know pass. Committed as obvious r279310. gcc/testsuite/ChangeLog 2019-12-12 Sudakshina Das <sudi....@arm.com> PR testsuite/92870 * gcc.dg/vect/vect-shift-5.c: Add target to scan-tree-dump.
diff --git a/gcc/testsuite/gcc.dg/vect/vect-shift-5.c b/gcc/testsuite/gcc.dg/vect/vect-shift-5.c index c1fd4f2..68e517e 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-*-* } } } } */