Disallow EXTRACT_LAST_REDUCTION for reduction chains
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 10 Dec 2019 11:30:49 +0000 (11:30 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 10 Dec 2019 11:30:49 +0000 (11:30 +0000)
commitca49c831ca9c042db6cea746c21040c1ada18abb
tree9e6852083c60a649efeb63abd2e0bc9a964348ef
parent9995ce07f190d963ec52f52697ccc155dd079568
Disallow EXTRACT_LAST_REDUCTION for reduction chains

gcc.dg/vect/vect-cond-reduc-5.c was ICEing for SVE because we
tried to use an extract-last reduction for a chain of COND_EXPRs.
Adding support for the chained case would be too invasive for stage 3
so this patch explicitly forbids it instead.  I've filed PR92884 for
the possible future work.

2019-12-10  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-loop.c (vectorizable_reduction): Don't use
EXTRACT_LAST_REDUCTION for chained reductions.

From-SVN: r279161
gcc/ChangeLog
gcc/tree-vect-loop.c