https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91756
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- The disambiguation needs "translation" (vn_reference_lookup_3 using the original ref for path-based disambiguation), but we do not allow this when looking across backedges in the maybe_skip_until walk and the loop we have to cross in alias disambiguation looks like do { if (n <= i) break; ptr->a[i].foo = 1; // this stmt to disambiguate against } while (1); but then DOM is happy with this structure because it valueizes in the IL itself. So the guard against backedges must be too conservative since DOM also walks across them. I've added this as fix for PR87132.