https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95969
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51397|0 |1 is obsolete| | --- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 51407 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51407&action=edit Updated patch which should fix the regressions So it turns out it was not evpr/complete_unrolling handling of this but rather if a replacement happens inside gimple_fold you need to unlink the vdefs and such. Attached is the new patch which I am now doing a full test run on.