http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57787
Bug ID: 57787 Summary: Waste work in ix86_valid_target_attribute_inner_p() and ix86_pad_returns() Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pchang9 at cs dot wisc.edu CC: nistor1 at illinois dot edu Created attachment 30426 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30426&action=edit Suggested patch The problem appears in revision 200588 in version 4.9. I have attached a simple patch that fixes it. In method "ix86_valid_target_attribute_inner_p()" in i386.c, the loop on line 4325 should break immediately after "ret" is set to "false". All the iterations after "ret" set to "false" do not perform any useful work, at best they just set "ret" again to "false". Also, in method "ix86_pad_returns()", the loop on line 35744 should break immediately after "replace" is set to "true". All the iterations after "replace" set to "true" do not perform any useful work, at best they just set "replace" again to "true".