https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117594
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:b1e14fc244c6b4543eb0ec1857afcf125cfbd917 commit r14-11005-gb1e14fc244c6b4543eb0ec1857afcf125cfbd917 Author: Richard Biener <rguent...@suse.de> Date: Mon Nov 18 13:46:52 2024 +0100 tree-optimization/117594 - fix live op vectorization for length masked case The code was passing factor == 0 to vect_get_loop_len which always returns an unmodified length, even if the number of scalar elements doesn't agree. It also failed to insert the eventually generated code. PR tree-optimization/117594 * tree-vect-loop.cc (vectorizable_live_operation_1): Pass factor == 1 to vect_get_loop_len, insert generated stmts. * gcc.dg/vect/pr117594.c: New testcase. (cherry picked from commit c108785c425b2042f63fa975c58c274d19a8d160)