https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118749
--- Comment #7 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:927e10bfce569947354cdd6b35c29b74e25c7816 commit r15-7383-g927e10bfce569947354cdd6b35c29b74e25c7816 Author: Richard Biener <rguent...@suse.de> Date: Wed Feb 5 10:28:25 2025 +0100 tree-optimization/118749 - bogus alignment peeling causes misaligned access The vectorizer thinks it can align a vector access to 16 bytes when using a vectorization factor of 8 and 1 byte elements. That of course does not work for the 2nd vector iteration. Apparently we lack a guard against such nonsense. PR tree-optimization/118749 * tree-vect-data-refs.cc (vector_alignment_reachable_p): Pass in the vectorization factor, when that cannot maintain the DRs target alignment do not claim we can reach that by peeling. * gcc.dg/vect/pr118749.c: New testcase.