Skip to content

Commit 1a7061c

Browse files
committed
[InstCombine] Remove redundant logical select fold (NFCI)
This has been subsumed by simplifyWithOpReplaced().
1 parent 34c33bb commit 1a7061c

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3055,14 +3055,6 @@ Instruction *InstCombinerImpl::foldSelectOfBools(SelectInst &SI) {
30553055
if (match(CondVal, m_Select(m_Value(A), m_Value(B), m_Zero())) &&
30563056
match(TrueVal, m_Specific(B)) && match(FalseVal, m_Zero()))
30573057
return replaceOperand(SI, 0, A);
3058-
// select a, (select ~a, true, b), false -> select a, b, false
3059-
if (match(TrueVal, m_c_LogicalOr(m_Not(m_Specific(CondVal)), m_Value(B))) &&
3060-
match(FalseVal, m_Zero()))
3061-
return replaceOperand(SI, 1, B);
3062-
// select a, true, (select ~a, b, false) -> select a, true, b
3063-
if (match(FalseVal, m_c_LogicalAnd(m_Not(m_Specific(CondVal)), m_Value(B))) &&
3064-
match(TrueVal, m_One()))
3065-
return replaceOperand(SI, 2, B);
30663058

30673059
// ~(A & B) & (A | B) --> A ^ B
30683060
if (match(&SI, m_c_LogicalAnd(m_Not(m_LogicalAnd(m_Value(A), m_Value(B))),

0 commit comments

Comments
 (0)