I misread the parens, not so redundant after all.

llvm-svn: 86648
This commit is contained in:
Chris Lattner 2009-11-10 02:04:54 +00:00
parent 3b9176985d
commit ab799110c6
1 changed files with 4 additions and 4 deletions

View File

@ -63,8 +63,8 @@ Value *llvm::SimplifyAndInst(Value *Op0, Value *Op1,
// A & ~A = ~A & A = 0 // A & ~A = ~A & A = 0
Value *A, *B; Value *A, *B;
if (match(Op0, m_Not(m_Value(A)) && A == Op1) || if ((match(Op0, m_Not(m_Value(A))) && A == Op1) ||
match(Op1, m_Not(m_Value(A)) && A == Op0)) (match(Op1, m_Not(m_Value(A))) && A == Op0))
return Constant::getNullValue(Op0->getType()); return Constant::getNullValue(Op0->getType());
// (A | ?) & A = A // (A | ?) & A = A
@ -123,8 +123,8 @@ Value *llvm::SimplifyOrInst(Value *Op0, Value *Op1,
// A | ~A = ~A | A = -1 // A | ~A = ~A | A = -1
Value *A, *B; Value *A, *B;
if (match(Op0, m_Not(m_Value(A)) && A == Op1) || if ((match(Op0, m_Not(m_Value(A))) && A == Op1) ||
match(Op1, m_Not(m_Value(A)) && A == Op0)) (match(Op1, m_Not(m_Value(A))) && A == Op0))
return Constant::getAllOnesValue(Op0->getType()); return Constant::getAllOnesValue(Op0->getType());
// (A & ?) | A = A // (A & ?) | A = A