https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115252
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:f46eaad445e680034df51bd0dec4e6c7b1f372a4 commit r15-896-gf46eaad445e680034df51bd0dec4e6c7b1f372a4 Author: Richard Biener <rguent...@suse.de> Date: Mon May 27 16:04:35 2024 +0200 tree-optimization/115252 - enhance peeling for gaps avoidance Code generation for contiguous load vectorization can already deal with generalized avoidance of loading from a gap. The following extends detection of peeling for gaps requirement with that, gets rid of the old special casing of a half load and makes sure when we do access the gap we have peeling for gaps enabled. PR tree-optimization/115252 * tree-vect-stmts.cc (get_group_load_store_type): Enhance detecting the number of cases where we can avoid accessing a gap during code generation. (vectorizable_load): Remove old half-vector peeling for gap avoidance which is now redundant. Add gap-aligned case where it's OK to access the gap. Add assert that we have peeling for gaps enabled when we access a gap. * gcc.dg/vect/slp-gap-1.c: New testcase.