Allow inner-loop reductions with variable-length vectors
While working on PR 86871, I noticed we were being overly restrictive
when handling variable-length vectors. For:
for (i : ...)
{
res = ...;
for (j : ...)
res op= ...;
a[i] = res;
}
we don't need a reduction operation (although we do for double
reductions like:
res = ...;
for (i : ...)
for (j : ...)
res op= ...;
a[i] = res;
which must still be rejected).
2018-08-08 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
reductions for variable-length vectors.
gcc/testsuite/
* gcc.target/aarch64/sve/reduc_8.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263451 138bc75d-0d04-0410-961f-82ee72b054a4