Short trip counted loop nest (perfect or not) is not fully unrolled, only the innnermost loop: (-O3 -fno-tree-vectorize)
#ifndef TC #define TC 3 #endif int a[100][100]; int foo(void) { int i, j; for (i = 0; i < TC; i ++) { for (j = 0; j < TC; j++) a[2*i][j] += a[i][j]; } return 0; } -- Summary: Full unrolling limitation -- inner most loop only Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: xinliangli at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35342