https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69564
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Richard Biener from comment #4) > Yeah, didn't try to figure out whether the C vs. C++ thing is a > regression. But I suspect the change to the C++ loop lowering. Yes, the relatively small difference between C and C++ without LTO seems to be due to the loop inversion that the C front end still does, and the C++ front end doesn't. But if I add loop inversion back into the C++ front end so that the .optimized output is indistinguishable, that resolves the difference without LTO, but LTO still makes the C++ output much slower.