https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108500
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 54331 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54331&action=edit CFG cleanup "early merging" OK, I take that back. For this simple testcase the attached works, delaying the dominance compute until the iterative cleanup phase for blocks with multiple predecessors. I didn't otherwise test it and I think if you add a diamond to the inlined function you will still hit the issue, so it isn't a "fix". It's also going to slow down CFG cleanup a bit. Though it would be nice to not require dominance queries during it since it's inevitably going to do slow queries. That also hints at another possible fix which is to simply not compute those from CFG cleanup (but there's no API entry for that yet).