https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87540
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2018-10-06 Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- you need high level loop optimizations to do this. Something like graphite. But you need to also prove it is profitable too. This is not a simple loop optimization either.