http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50756
Bug #: 50756 Summary: request to better handle non-constant distance vectors to avoid unnecessary alias check Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: vincenzo.innoce...@cern.ch this is a follow up to PR50698 this snippet void loop(float * x, int n) { for (int i=0;i!=n; ++i) x[i]=x[i+n]+x[i+2*n]; } generates aliasing checks even if memory regions are clearly disjoint (see analysis in comments 6 and 7 of PR50698) I'm now experimenting with "structure of arrays" in place of "array of structures" to make better use of vectorization (and cpu-caches). Reducing unecessary aliasing will further improve performance (and reduce code size).It will also avoid the need to set --param vect-max-version-for-alias-checks=100 or so.