[llvm-commits] [llvm] r121761 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Chris Lattner sabre at nondot.org
Mon Dec 13 23:53:03 PST 2010


Author: lattner
Date: Tue Dec 14 01:53:03 2010
New Revision: 121761

URL: http://llvm.org/viewvc/llvm-project?rev=121761&view=rev
Log:
remove the instsimplify logic I added in r121754.  It is apparently
breaking the selfhost builds, though I can't fathom how.

Modified:
    llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=121761&r1=121760&r2=121761&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Tue Dec 14 01:53:03 2010
@@ -1238,17 +1238,7 @@
     Value *TrueVal  = PN->getIncomingValue(PN->getIncomingBlock(0) == IfFalse);
     Value *FalseVal = PN->getIncomingValue(PN->getIncomingBlock(0) == IfTrue);
     
-    Value *NV;
-    if (Value *V = SimplifySelectInst(IfCond, TrueVal, FalseVal, TD))
-      NV = V;
-    else if (TrueVal->getType()->isIntegerTy(1) && isa<ConstantInt>(TrueVal) &&
-             cast<ConstantInt>(TrueVal)->isOne()) {
-      if (Value *V = SimplifyOrInst(IfCond, FalseVal, TD))
-        NV = V;
-      else
-        NV = BinaryOperator::CreateOr(IfCond, FalseVal, "", AfterPHIIt);
-    } else
-      NV = SelectInst::Create(IfCond, TrueVal, FalseVal, "", AfterPHIIt);
+    Value *NV = SelectInst::Create(IfCond, TrueVal, FalseVal, "", AfterPHIIt);
     PN->replaceAllUsesWith(NV);
     NV->takeName(PN);
     PN->eraseFromParent();





More information about the llvm-commits mailing list