http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54565
Bug #: 54565 Summary: pass_update_address_taken before forwprop1 for vectors Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: gli...@gcc.gnu.org Created attachment 28186 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28186 IRC log Hello, during forwprop1, some of the optimizations for vectors fail because some vectors appear as PARM_DECL or such instead of SSA_NAME. An example is forwprop-22.c where the code does detect that {v[0],v[1]} is just v, but v is a PARM_DECL so it just gives up. Before forwprop2, something (fre?) changes it to an SSA_NAME and the optimization then works. Following some advice by pinskia and stevenb on IRC (log attached), I tried adding pass_update_address_taken right before forwprop1 and it did allow the optimization to happen in forwprop1. The log also contains an argument by pinskia that doing optimizations in forwprop1 can help a bit make better inlining decisions, and some later comments by richi.