projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df706e3
)
remove some trickiness that broke yacr2 and some other programs last night
author
Chris Lattner
<sabre@nondot.org>
Wed, 10 Aug 2005 17:15:20 +0000
(17:15 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 10 Aug 2005 17:15:20 +0000
(17:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22751
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/LoopSimplify.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/LoopSimplify.cpp
b/lib/Transforms/Utils/LoopSimplify.cpp
index 69b2ec444707d378020ef8898002f10ddd6f6148..fcea05402d02c36b1cbfda9cea48a8ecb37e4b01 100644
(file)
--- 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();
}