https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111950
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 56500 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56500&action=edit patch Some of the "fixup"s done earlier get in the way of simplifying things. Specifically /* If the PHI node dominates the loop then we shouldn't create a new LC-SSSA PHI for it in the intermediate block. Unless the the loop has been versioned. If it has then we need the PHI node such that later when the loop guard is added the original dominating PHI can be found. */ basic_block def_bb = gimple_bb (SSA_NAME_DEF_STMT (new_arg)); if (loop == scalar_loop && (!def_bb || !flow_bb_inside_loop_p (loop, def_bb))) { auto gsi = gsi_for_stmt (phi); remove_phi_node (&gsi, true); } gets the LC PHI nodes out-of-sync where we usually expect a 1:1 mapping across all loop copies (also for the removed virtual PHI, but that's way easier to detect as missing). I wonder if the above is still needed. At least vect.exp succeeds without it (not that this means much). I'm giving the attached some more testing (I'll split out the vectorizable_live_operation changes, they are not required for fixing this bug)