https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80155
--- Comment #5 from Thomas Preud'homme <thopre01 at gcc dot gnu.org> --- (In reply to Richard Biener from comment #4) > Can you benchmark the 2nd candidate (most appropriate at this stage I think, > would also fix 77498). > > It will cause pessimizations for code that benefits from predictive > commoning transforms that PRE can do at -O2 because predictive commoning > doesn't run at -O2. > The fix for that would be to run predictive commoning at -O2 but in a mode > that doesn't perform unrolling for example. [even pcom can blow through > register pressure limits though] > > Any other approach to fixing this particular bug cannot be done for GCC 7 > (even this one is quite late ...). So in the end I'd vote for WONTFIX for > GCC 7. Sadly it doesn't. Well not quite true, there is a very slight improvement but we're far from the uplift -fno-code-hoisting provides. There's maybe more than one bug at play and the reduced testcase only show one.