[PATCH] D98475: [LoopInterchange] Fix transformation bugs in loop interchange
Congzhe Cao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 08:27:03 PDT 2021
congzhe added a comment.
Updated a test case that current trunk fails:
#include <stdio.h>
int a;
short b[3][5][8] = {{}, {{}, 0, 0, 0, 6, 1, 6}};
int main() {
int c = 0, d;
for (; c <= 2; c++) {
if (c)
continue;
d = 0;
for (; d <= 2; d++)
a |= b[d][d][c + 5];
}
printf("%d\n", a);
}
Running with `clang -O1 -mllvm -enable-loopinterchange=true -w test.c -o a.out && ./a.out` outputs `0`.
Running with `clang -O1 -mllvm -enable-loopinterchange=false -w test.c -o a.out && ./a.out` outputs `6`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98475/new/
https://reviews.llvm.org/D98475
More information about the llvm-commits
mailing list