https://bugs.llvm.org/show_bug.cgi?id=39056
Bug ID: 39056
Summary: clang miscompiles with "-newgvn" at -O2 on valid code
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangb...@nondot.org
Reporter: helloqi...@gmail.com
CC: llvm-bugs@lists.llvm.org
clang-r329389: first working build
clang-r329395: next failing build
$ clang-trunk -v
clang version 8.0.0 (trunk 342833)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
$ clang-trunk abc.c ; ./a.out
0
0
1
0
0
0
$ clang-trunk -mllvm -enable-newgvn -O2 abc.c ; ./a.out
0
0
0
0
0
0
$ cat abc.c
int printf(const char *, ...);
volatile int a, d, f;
short b;
char c[6][1];
char e;
int main() {
int g = 7;
for (; d <= 1; d++) {
b = e = g || b;
c[2][0] = e;
a;
g = 0;
}
for (; f < 6; f++)
printf("%d\n", c[f][0]);
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs