| Issue |
76554
|
| Summary |
missed optimization: `((a ^ b) & c) | a` -> `a | (b & c)`
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
k-arrows
|
Consider the following.
https://godbolt.org/z/Tzzx1aveT
```cpp
int foo(int a, int b, int c)
{
return ((a ^ b) & c) | a;
}
int bar(int a, int b, int c)
{
return a | (b & c);
}
```
Alive2 proof (I used `i16` to prevent timeout.)
https://alive2.llvm.org/ce/z/CReg2u
Original test (gcc testsuite):
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/tree-ssa/pr109938.c
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs