From: Chris Lattner Date: Wed, 10 Aug 2005 17:15:20 +0000 (+0000) Subject: remove some trickiness that broke yacr2 and some other programs last night X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=98599ba6c6b12a01718b08f57ceb7aa3397c5b2d;p=oota-llvm.git remove some trickiness that broke yacr2 and some other programs last night git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22751 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 69b2ec44470..fcea05402d0 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -197,9 +197,7 @@ bool LoopSimplify::ProcessLoop(Loop *L) { DominatorSet &DS = getAnalysis(); for (BasicBlock::iterator I = L->getHeader()->begin(); (PN = dyn_cast(I++)); ) - if (Value *V = PN->hasConstantValue(true)) - if (!isa(V) || - DS.dominates(cast(V)->getParent(), L->getHeader())) { + if (Value *V = PN->hasConstantValue()) { PN->replaceAllUsesWith(V); PN->eraseFromParent(); }