[llvm] [InstCombine] Reduce nested logical operator if poison is implied (PR #86823)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 02:50:30 PDT 2024


================
@@ -2985,6 +2985,13 @@ Instruction *InstCombinerImpl::foldSelectOfBools(SelectInst &SI) {
       return BinaryOperator::CreateOr(CondVal, FalseVal);
     }
 
+    if (match(CondVal, m_OneUse(m_Select(m_Value(A), m_One(), m_Value(B)))) &&
+        impliesPoison(FalseVal, B)) {
----------------
XChy wrote:

Gently ping. @nikic 

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


More information about the llvm-commits mailing list