diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-24 19:48:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-24 19:48:06 +0000 |
commit | fcd74e2e3113bea02b0adda6c9d5a5a9c2f0c44c (patch) | |
tree | 1b861316016975ff93c772e45dcc8422fa7640ef | |
parent | d0d09e6c8f0693635b6c4e1f123fd596752ebc56 (diff) |
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
-rw-r--r-- | lib/Transforms/Scalar/TailDuplication.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index e736f970af..04736f07e1 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); } |