For the testcase double a[16][64], y[64], x[16]; void foo(void) { int i, j; for (j = 0; j < 64; ++j) for (i = 0; i < 16; ++i) y[j] = y[j] + a[i][j] * x[i]; }
with -O2 -fno-tree-pre -fno-tree-loop-im -ftree-loop-linear loop interchange is performed but with PRE or lim moving the load (and the store) from/to y[j] out of the innermost loop the interchange is no longer performed because before = gcc_loopnest_to_lambda_loopnest (loop_nest, &oldivs, &invariants, &lambda_obstack); returns NULL. -- Summary: Loop interchange not performed Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36010