https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101291
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:5df86357becfc5c3a676b9f506bf2c1c625306f2 commit r11-8725-g5df86357becfc5c3a676b9f506bf2c1c625306f2 Author: Richard Biener <rguent...@suse.de> Date: Mon Jul 5 11:53:07 2021 +0200 middle-end/101291 - set loop copy of versioned loop This fixes the vectorizer loop versioning code failing to clear niter related info on the scalar loop as it assumed get_loop_copy would work even for the outermost loop. The patch makes that assumption hold by adjusting the loop versioning code. 2021-07-05 Richard Biener <rguent...@suse.de> PR middle-end/101291 * cfgloopmanip.c (loop_version): Set the loop copy of the versioned loop to the new loop. (cherry picked from commit 38872c6c0db1b10b17d3913b277c499913208d0b)