[InstCombine] Fold two select patterns into or-and
This patch is the follow-up improvement of D122152. Fixes https://github.com/llvm/llvm-project/issues/64558. `select (a | c), a, b -> select a, true, (select ~c, b, false)` where `c` is free to invert `select (c & ~b), a, b -> select b, true, (select c, a, false)` Alive2: https://alive2.llvm.org/ce/z/KwxtMA Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D158983
Loading
Please sign in to comment