summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-10 01:19:06 +0000
committerChris Lattner <sabre@nondot.org>2009-11-10 01:19:06 +0000
commitbe11db68943873256b01340ff364c784c066f6b3 (patch)
tree30c6d096499dfc899cacfe73ffb8933d68c9ebcc /llvm/lib/Transforms
parent612e38026a51b3a5ee9458bd8a9c3a0af8569ce9 (diff)
downloadbcm5719-llvm-be11db68943873256b01340ff364c784c066f6b3.tar.gz
bcm5719-llvm-be11db68943873256b01340ff364c784c066f6b3.zip
don't invalidate PN, rewrite of this code is in progress anyway.
llvm-svn: 86639
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/JumpThreading.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index 46d40ef5d15..7a7f407b96b 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -223,10 +223,11 @@ static void RemovePredecessorAndSimplify(BasicBlock *BB, BasicBlock *Pred,
U = PNV;
// See if we can simplify it.
- if (Value *V = SimplifyInstruction(User, TD)) {
- User->replaceAllUsesWith(V);
- User->eraseFromParent();
- }
+ if (User != PN)
+ if (Value *V = SimplifyInstruction(User, TD)) {
+ User->replaceAllUsesWith(V);
+ User->eraseFromParent();
+ }
}
PN->replaceAllUsesWith(PNV);
OpenPOWER on IntegriCloud