https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115843
--- Comment #14 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:a177be05f6952c3f7e62186d2e138d96c475b81a commit r15-2055-ga177be05f6952c3f7e62186d2e138d96c475b81a Author: Richard Biener <rguent...@suse.de> Date: Mon Jul 15 13:50:58 2024 +0200 tree-optimization/115843 - fix wrong-code with fully-masked loop and peeling When AVX512 uses a fully masked loop and peeling we fail to create the correct initial loop mask when the mask is composed of multiple components in some cases. The following fixes this by properly applying the bias for the component to the shift amount. PR tree-optimization/115843 * tree-vect-loop-manip.cc (vect_set_loop_condition_partial_vectors_avx512): Properly bias the shift of the initial mask for alignment peeling. * gcc.dg/vect/pr115843.c: New testcase.