| Issue |
207909
|
| Summary |
[InstCombine] failed to fold (a & b) != b ? (a | b) : a to (a | b)
|
| Labels |
llvm:instcombine,
missed-optimization
|
| Assignees |
|
| Reporter |
Andarwinux
|
```c
int f(int a, int b) { return (a & b) != b ? (a | b) : a; }
int f0(int a, int b) { return a | b; }
```
```asm
f(int, int):
andn eax, edi, esi
cmovne eax, esi
or eax, edi
ret
f0(int, int):
mov eax, edi
or eax, esi
ret
```
https://godbolt.org/z/sK6cnsbTc
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs