aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-08-07 14:44:20 +0200
committerRichard Biener <rguenther@suse.de>2023-08-08 14:38:10 +0200
commitd9f3ea61fe36e2de3354b90b65ff8245099114c9 (patch)
tree8907ce57966ceca77a774965c78cc2df4fd9b7be /gcc/recog.h
parent02a015fa320229a057ef721eaf663f3eb22a8ace (diff)
downloadgcc-d9f3ea61fe36e2de3354b90b65ff8245099114c9.zip
gcc-d9f3ea61fe36e2de3354b90b65ff8245099114c9.tar.gz
gcc-d9f3ea61fe36e2de3354b90b65ff8245099114c9.tar.bz2
tree-optimization/49955 - BB reduction with odd number of lanes
The following enhances BB reduction vectorization to support vectorizing only a subset of the lanes, keeping the rest as scalar ops. For now we try to make the number of lanes even by leaving alone the "last" lane. That's because SLP discovery with all lanes will fail too soon to get us any hint on which lane to strip and likewise we don't know what vector modes the target supports so restricting ourselves to power-of-two or other cases isn't easy. This is enough to get at the vectorization opportunity for the testcase in the PR - albeit with the chosen lanes not optimal but at least vectorizable. PR tree-optimization/49955 * tree-vectorizer.h (_slp_instance::remain_stmts): New. (SLP_INSTANCE_REMAIN_STMTS): Likewise. * tree-vect-slp.cc (vect_free_slp_instance): Release SLP_INSTANCE_REMAIN_STMTS. (vect_build_slp_instance): Make the number of lanes of a BB reduction even. (vectorize_slp_instance_root_stmt): Handle unvectorized defs of a BB reduction. * gfortran.dg/vect/pr49955.f: New testcase.
Diffstat (limited to 'gcc/recog.h')
0 files changed, 0 insertions, 0 deletions