| Issue |
71068
|
| Summary |
opt generates wrong code with "correlated-propagation,dce,flattencfg"
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Bazoka13
|
*******************************************************************************
OS and Platform:
Ubuntu 20.04.4 LTS
*******************************************************************************
clang version 17.0.4
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/ctc/llvm-releases/llvm-17.0.4/build/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
*******************************************************************************
Command Lines:
```shell
clang -O3 -mllvm -disable-llvm-optzns -c -emit-llvm a.c -o a.bc
opt -passes=correlated-propagation,dce,flattencfg a.bc -o a.opt.bc
clang a.opt.bc -o a.out
./a.out
Floating point exception (core dumped)
```
*******************************************************************************
Source Code:
```C
int a;
void b() {
int c;
unsigned int d = 6;
c = 3 % (((a || 0) < 0) - d || 0);
}
int main() { b(); }
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs