diff options
author | Chris Lattner <sabre@nondot.org> | 2005-08-10 17:15:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-08-10 17:15:20 +0000 |
commit | 98599ba6c6b12a01718b08f57ceb7aa3397c5b2d (patch) | |
tree | e12698dac7c59e29211a388466b3797ccdc673ee /lib/Transforms | |
parent | df706e3f0c3a7936b3bdb6e36bf20642f467ebae (diff) |
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
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Utils/LoopSimplify.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 69b2ec4447..fcea05402d 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<DominatorSet>(); for (BasicBlock::iterator I = L->getHeader()->begin(); (PN = dyn_cast<PHINode>(I++)); ) - if (Value *V = PN->hasConstantValue(true)) - if (!isa<Instruction>(V) || - DS.dominates(cast<Instruction>(V)->getParent(), L->getHeader())) { + if (Value *V = PN->hasConstantValue()) { PN->replaceAllUsesWith(V); PN->eraseFromParent(); } |