https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67754
--- Comment #2 from Sebastian Pop <spop at gcc dot gnu.org> --- We diffed the output of -fdump-tree-graphite-all for interchange-1.c and the problem seems to be related to the ISL scheduler: I would highly recommend that people stop using outdated ISL versions. with ISL 0.15, the code generated looks like this: ISL AST generated by ISL: { for (int c1 = 0; c1 <= 1334; c1 += 51) for (int c2 = 0; c2 <= 1334; c2 += 51) for (int c3 = c1; c3 <= min(1334, c1 + 50); c3 += 1) for (int c4 = c2; c4 <= min(1334, c2 + 50); c4 += 1) S_4(c3, c4); for (int c1 = 0; c1 <= 1334; c1 += 1) S_10(c1); S_8(); } with ISL 0.14: ISL AST generated by ISL: { for (int c0 = -1377; c0 < 0; c0 += 51) for (int c1 = -1326; c1 <= c0 + 70; c1 += 51) for (int c2 = max(max(-1334, c0), c1 - 20); c2 <= c0 + 50; c2 += 1) for (int c3 = max(-1314, c1); c3 <= min(c1 + 50, c2 + 20); c3 += 1) S_4(c2 - c3 + 20, -c3 + 20); for (int c1 = -1326; c1 < 0; c1 += 51) { for (int c3 = max(-1314, c1); c3 <= c1 + 50; c3 += 1) { S_4(-c3 + 20, -c3 + 20); S_10(-c3 + 20); } for (int c2 = 1; c2 <= min(50, c1 + 1364); c2 += 1) for (int c3 = max(c1, c2 - 1314); c3 <= c1 + 50; c3 += 1) S_4(c2 - c3 + 20, -c3 + 20); } S_4(20, 20); S_10(20); S_8(); for (int c3 = 1; c3 <= 20; c3 += 1) { S_4(-c3 + 20, -c3 + 20); S_10(-c3 + 20); } for (int c2 = 1; c2 <= 50; c2 += 1) for (int c3 = 0; c3 <= 20; c3 += 1) S_4(c2 - c3 + 20, -c3 + 20); for (int c0 = 51; c0 <= 1334; c0 += 51) for (int c1 = c0 - 1326; c1 <= 20; c1 += 51) for (int c2 = c0; c2 <= min(min(1334, c0 + 50), c1 + 1364); c2 += 1) for (int c3 = max(c1, c2 - 1314); c3 <= min(20, c1 + 50); c3 += 1) S_4(c2 - c3 + 20, -c3 + 20); }