https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101291
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:1a4075c0a43fff9fac9df91c3e83e3a1949b69ff commit r10-10098-g1a4075c0a43fff9fac9df91c3e83e3a1949b69ff 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)