Created attachment 30423 [details] Suggested patch The problem appears in revision 200588 in version 4.9. I have attached a patch that fixes it. In method "remove_path()" in cfgloopmanip.c, the loop on line 343 should break immediately after "irred_invalidated" is set to "true". All the iterations after "irred_invalidated" set to "true" do not perform any useful work, at best they just set "irred_invalidated" again to "true".
Patch sent to gcc-patches@ http://gcc.gnu.org/ml/gcc-patches/2013-07/msg00963.html
Installed onto mainline.