http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56493
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 30312 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30312&action=edit gcc49-pr56493.patch Untested patch that in the FE restores the performance on the simplified testcase. Haven't tried the original. Of course, having this optimization be performed in GIMPLE will be much more worthwhile, but likely not backportable.