| Issue |
63336
|
| Summary |
[NewGVN] wrong code at O3 with -mllvm -enable-newgvn
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
zhendongsu
|
It appears to be a recent regression as it doesn't reproduce with 16.0.0.
Compiler Explorer: https://godbolt.org/z/xqjvYxfoE
```
[542] % clangtk -v
clang version 17.0.0 (https://github.com/llvm/llvm-project.git 09d6ee765780837d5156ac81f968465bdcec73ba)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;@m64
Selected multilib: .;@m64
[543] %
[543] % clangtk -O3 -mllvm -enable-newgvn small.c
[544] % ./a.out
Aborted
[545] % clangtk -O3 small.c; ./a.out
[546] %
[546] % cat small.c
int a, e, *f;
char b;
volatile int c, d;
int main() {
int g = 1;
L:
if (!b)
while (d && a)
g++;
if (c) {
if (g) {
int *i;
*i = e;
}
*f = 0;
goto L;
}
if (!g)
__builtin_abort();
return 0;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs