https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115895
--- Comment #4 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:1b5d2ccd060ce983c7459ee165275e0205271396 commit r15-6939-g1b5d2ccd060ce983c7459ee165275e0205271396 Author: Richard Biener <rguent...@suse.de> Date: Tue Jan 14 15:26:21 2025 +0100 tree-optimization/115895 - overrun with masked loop The following addresses the fact that with loop masking (or regular mask loads) we do not implement load shortening but we override the case where we need that for correctness. Likewise when we attempt to use loop masking to handle large trailing gaps we cannot do so when there's this overrun case. PR tree-optimization/115895 * tree-vect-stmts.cc (get_group_load_store_type): When we might overrun because the group size is not a multiple of the vector size we cannot use loop masking since that does not implement the required load shortening. * gcc.target/i386/vect-pr115895.c: New testcase.