[llvm-commits] [llvm] r86648 - /llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Chris Lattner sabre at nondot.org
Mon Nov 9 18:04:54 PST 2009


Author: lattner
Date: Mon Nov  9 20:04:54 2009
New Revision: 86648

URL: http://llvm.org/viewvc/llvm-project?rev=86648&view=rev
Log:
I misread the parens, not so redundant after all.

Modified:
    llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=86648&r1=86647&r2=86648&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Mon Nov  9 20:04:54 2009
@@ -63,8 +63,8 @@
   
   // 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 @@
   
   // 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





More information about the llvm-commits mailing list