mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 22:50:47 +00:00
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
This commit is contained in:
parent
df706e3f0c
commit
98599ba6c6
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user