diff options
author | Richard Biener <rguenther@suse.de> | 2024-03-01 09:29:32 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2024-05-10 15:04:48 +0200 |
commit | 52d4691294c84793b301ad3cc24e277b8c7efe0b (patch) | |
tree | 88d7d72b2e90cc936c95f1aa749d787c34940e08 /gcc/value-range.cc | |
parent | af64af69c3cc85dbe00c520651a54850bf5cadc1 (diff) | |
download | gcc-52d4691294c84793b301ad3cc24e277b8c7efe0b.zip gcc-52d4691294c84793b301ad3cc24e277b8c7efe0b.tar.gz gcc-52d4691294c84793b301ad3cc24e277b8c7efe0b.tar.bz2 |
Allow patterns in SLP reductions
The following removes the over-broad rejection of patterns for SLP
reductions which is done by removing them from LOOP_VINFO_REDUCTIONS
during pattern detection. That's also insufficient in case the
pattern only appears on the reduction path. Instead this implements
the proper correctness check in vectorizable_reduction and guides
SLP discovery to heuristically avoid forming later invalid groups.
I also couldn't find any testcase that FAILs when allowing the SLP
reductions to form so I've added one.
I came across this for single-lane SLP reductions with the all-SLP
work where we rely on patterns to properly vectorize COND_EXPR
reductions.
* tree-vect-patterns.cc (vect_pattern_recog_1): Do not
remove reductions involving patterns.
* tree-vect-loop.cc (vectorizable_reduction): Reject SLP
reduction groups with multiple lane-reducing reductions.
* tree-vect-slp.cc (vect_analyze_slp_instance): When discovering
SLP reduction groups avoid including lane-reducing ones.
* gcc.dg/vect/vect-reduc-sad-9.c: New testcase.
Diffstat (limited to 'gcc/value-range.cc')
0 files changed, 0 insertions, 0 deletions