aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-12-14 07:53:03 +0000
committerChris Lattner <sabre@nondot.org>2010-12-14 07:53:03 +0000
commit071edc81f2a34ff689a2008e327ce7bce3a8edbf (patch)
tree1464aaef942364a5fa506ccab746608e4f2124f6 /lib
parent44da7ca4213333bcade57a407a890970351db494 (diff)
downloadexternal_llvm-071edc81f2a34ff689a2008e327ce7bce3a8edbf.zip
external_llvm-071edc81f2a34ff689a2008e327ce7bce3a8edbf.tar.gz
external_llvm-071edc81f2a34ff689a2008e327ce7bce3a8edbf.tar.bz2
remove the instsimplify logic I added in r121754. It is apparently
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
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp
index 288ff04..f0c97fd 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -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();