mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-06 02:29:51 +00:00
implement or.ll:test20
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21709 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
056ea904a7
commit
828eeddb38
@ -1872,6 +1872,13 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
|
||||
A = 0;
|
||||
}
|
||||
|
||||
if (match(Op0, m_And(m_Value(A), m_Value(B))))
|
||||
if (A == Op1 || B == Op1) // (A & ?) | A --> A
|
||||
return ReplaceInstUsesWith(I, Op1);
|
||||
if (match(Op1, m_And(m_Value(A), m_Value(B))))
|
||||
if (A == Op0 || B == Op0) // A | (A & ?) --> A
|
||||
return ReplaceInstUsesWith(I, Op0);
|
||||
|
||||
if (match(Op1, m_Not(m_Value(B)))) { // Op0 | ~B
|
||||
if (Op0 == B)
|
||||
return ReplaceInstUsesWith(I,
|
||||
|
Loading…
x
Reference in New Issue
Block a user