remove the instsimplify logic I added in r121754. It is apparently
authorChris Lattner <sabre@nondot.org>
Tue, 14 Dec 2010 07:53:03 +0000 (07:53 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 14 Dec 2010 07:53:03 +0000 (07:53 +0000)
breaking the selfhost builds, though I can't fathom how.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121761 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SimplifyCFG.cpp

index 288ff0462bce75c8ca700101b3afdffc5eb0d525..f0c97fd4a04243760b3e747e7fef8aed818fdc73 100644 (file)
@@ -1238,17 +1238,7 @@ static bool FoldTwoEntryPHINode(PHINode *PN, const TargetData *TD) {
     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();