[llvm-commits] [llvm] r95643 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

Chris Lattner sabre at nondot.org
Mon Feb 8 17:14:07 PST 2010


Author: lattner
Date: Mon Feb  8 19:14:06 2010
New Revision: 95643

URL: http://llvm.org/viewvc/llvm-project?rev=95643&view=rev
Log:
simplify this code, duh.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp?rev=95643&r1=95642&r2=95643&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp Mon Feb  8 19:14:06 2010
@@ -1147,19 +1147,15 @@
     return 0;
 
   // ((cond?-1:0)&C) | (B&(cond?0:-1)) -> cond ? C : B.
-  if (match(D, m_Not(m_SExt(m_Specific(Cond)))) &&
-      Cond->getType()->isInteger(1))
+  if (match(D, m_Not(m_SExt(m_Specific(Cond)))))
     return SelectInst::Create(Cond, C, B);
-  if (match(D, m_SExt(m_Not(m_Specific(Cond)))) &&
-      Cond->getType()->isInteger(1))
+  if (match(D, m_SExt(m_Not(m_Specific(Cond)))))
     return SelectInst::Create(Cond, C, B);
   
   // ((cond?-1:0)&C) | ((cond?0:-1)&D) -> cond ? C : D.
-  if (match(B, m_Not(m_SExt(m_Specific(Cond)))) &&
-      Cond->getType()->isInteger(1))
+  if (match(B, m_Not(m_SExt(m_Specific(Cond)))))
     return SelectInst::Create(Cond, C, D);
-  if (match(B, m_SExt(m_Not(m_Specific(Cond)))) &&
-      Cond->getType()->isInteger(1))
+  if (match(B, m_SExt(m_Not(m_Specific(Cond)))))
     return SelectInst::Create(Cond, C, D);
   return 0;
 }





More information about the llvm-commits mailing list