https://bugs.llvm.org/show_bug.cgi?id=48113
Bug ID: 48113
Summary: [LoopInterchange] Tightly nested checking issue
Product: libraries
Version: trunk
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Loop Optimizer
Assignee: unassignedb...@nondot.org
Reporter: chenge...@huawei.com
CC: llvm-bugs@lists.llvm.org
$clang -Os -mllvm -enable-loopinterchange=true issue.c && ./a.out
9
clang -Os -mllvm -enable-loopinterchange=false issue.c && ./a.out
3
issue.c:
#include <stdio.h>
char a, d;
int b[][2];
char c[][9];
char *e;
static unsigned f;
short g;
static long h() {
for (; f <= 2; f++) {
char *i = &d;
int j = 0;
for (; j <= 2; j++)
b[j][1] = c[j][f];
++*i;
if (a)
g = *e;
}
}
int main() {
h();
printf("%lX\n", d);
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs