Vectorizer fails to handle this: ---------------------------------------------------- #define align(x) __attribute__((align(x))) typedef float align(16) MATRIX[3][3];
void RotateMatrix(MATRIX ret, MATRIX a, MATRIX b) { int i, j; for (j = 0; j < 3; j++) for (i = 0; i < 3; i++) ret[j][i] = a[j][0] * b[0][i] + a[j][1] * b[1][i] + a[j][2] * b[2][i]; } ---------------------------------------------------- loop at bench.cc:33: not vectorized: unsupported scalar cycle. loop at bench.cc:33: bad scalar cycle. -- Summary: vectorizer failed for matrix multiplication Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: giovannibajo at libero dot it CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18437