aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-24 19:48:06 +0000
committerChris Lattner <sabre@nondot.org>2003-06-24 19:48:06 +0000
commitfcd74e2e3113bea02b0adda6c9d5a5a9c2f0c44c (patch)
tree1b861316016975ff93c772e45dcc8422fa7640ef /lib/Transforms
parentd0d09e6c8f0693635b6c4e1f123fd596752ebc56 (diff)
downloadexternal_llvm-fcd74e2e3113bea02b0adda6c9d5a5a9c2f0c44c.zip
external_llvm-fcd74e2e3113bea02b0adda6c9d5a5a9c2f0c44c.tar.gz
external_llvm-fcd74e2e3113bea02b0adda6c9d5a5a9c2f0c44c.tar.bz2
Fix bug: TailDup/2003-06-24-Simpleloop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/TailDuplication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp
index e736f97..04736f0 100644
--- a/lib/Transforms/Scalar/TailDuplication.cpp
+++ b/lib/Transforms/Scalar/TailDuplication.cpp
@@ -203,7 +203,8 @@ void TailDup::InsertPHINodesIfNecessary(Instruction *OrigInst, Value *NewInst,
for (Value::use_iterator I = OrigInst->use_begin(), E = OrigInst->use_end();
I != E; ++I) {
Instruction *In = cast<Instruction>(*I);
- if (In->getParent() != OrigBlock) // Don't modify uses in the orig block!
+ if (In->getParent() != OrigBlock || // Don't modify uses in the orig block!
+ isa<PHINode>(In))
Users.push_back(In);
}