http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57782
Bug ID: 57782 Summary: Waste work in remove_path() Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: pchang9 at cs dot wisc.edu CC: nistor1 at illinois dot edu Created attachment 30423 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30423&action=edit 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".