[llvm] [InstCombine] Optimise the expression `(C & A) | (select (C ^ true), B, false)` with `FoldOrOfAndsWithSelectToLogical` (PR #178438)

Rajveer Singh Bharadwaj via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 11 04:09:50 PST 2026


Rajveer100 wrote:

I have refactored and added few additional tests as well. Let me know is this works.

Also, there's actually another case that can be possible follow up:

```
(C && A) | (C && B) => C && (A | B)
```

https://github.com/llvm/llvm-project/pull/178438


More information about the llvm-commits mailing list