From 70ce6d0819ffd5822bb176fffe94bcf29a1deda4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 10 Nov 2009 02:04:54 +0000 Subject: [PATCH] I misread the parens, not so redundant after all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86648 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/InstructionSimplify.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index 08fb8da4ff2..6953f16dc92 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -63,8 +63,8 @@ Value *llvm::SimplifyAndInst(Value *Op0, Value *Op1, // A & ~A = ~A & A = 0 Value *A, *B; - if (match(Op0, m_Not(m_Value(A)) && A == Op1) || - match(Op1, m_Not(m_Value(A)) && A == Op0)) + if ((match(Op0, m_Not(m_Value(A))) && A == Op1) || + (match(Op1, m_Not(m_Value(A))) && A == Op0)) return Constant::getNullValue(Op0->getType()); // (A | ?) & A = A @@ -123,8 +123,8 @@ Value *llvm::SimplifyOrInst(Value *Op0, Value *Op1, // A | ~A = ~A | A = -1 Value *A, *B; - if (match(Op0, m_Not(m_Value(A)) && A == Op1) || - match(Op1, m_Not(m_Value(A)) && A == Op0)) + if ((match(Op0, m_Not(m_Value(A))) && A == Op1) || + (match(Op1, m_Not(m_Value(A))) && A == Op0)) return Constant::getAllOnesValue(Op0->getType()); // (A & ?) | A = A