https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88440
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 45313 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45313&action=edit patch This enables distribution of patterns at -O[2s]+ and optimizes the testcase at -Os by adjusting the guards in loop distribution. Note that the interesting bits are compile-time, binary-size and performance at mainly -O2, eventually size at -Os. I suspect that at -O2 w/o profiling most loops would be optimize_loop_for_speed anyways so changing the heuristics isn't so bad but of course enabling distribution at -O2 might encour a penalty.