https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119681
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note I think the bigger issue is the RTL unroller does do introduce new pseudo registers when it is copying basic blocks and does not do live range splitting which is why you get the moves inside the loop. I think your hack might fix the exit block, it does not fix the overall issue.