[Bug tree-optimization/103116] SLP vectoriser fails to peel for gaps
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 22 11:21:49 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103116
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:ff408622a5f8fb395e5584a494aaaad05b3611db
commit r11-10167-gff408622a5f8fb395e5584a494aaaad05b3611db
Author: Richard Biener <rguenther@suse.de>
Date: Wed May 4 10:43:07 2022 +0200
tree-optimization/103116 - SLP permutes and peeling for gaps
The testcase shows that we can end up with a contiguous access across
loop iterations but by means of permutations the elements accessed
might only cover parts of a vector. In this case we end up with
GROUP_GAP == 0 but still need to avoid accessing excess elements
in the last loop iterations. Peeling for gaps is designed to cover
this but a single scalar iteration might not cover all of the excess
elements. The following ensures peeling for gaps is done in this
situation and when that isn't sufficient because we need to peel
more than one iteration (gcc.dg/vect/pr103116-2.c), fail the SLP
vectorization.
2022-05-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/103116
* tree-vect-stmts.c (get_group_load_store_type): Handle the
case we need peeling for gaps even though GROUP_GAP is zero.
* gcc.dg/vect/pr103116-1.c: New testcase.
* gcc.dg/vect/pr103116-2.c: Likewise.
(cherry picked from commit 52b7b86f8c72eb19e637f1e72ffd10f39b8cb829)
More information about the Gcc-bugs
mailing list