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:
e345378
)
don't invalidate PN, rewrite of this code is in progress anyway.
author
Chris Lattner
<sabre@nondot.org>
Tue, 10 Nov 2009 01:19:06 +0000
(
01:19
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 10 Nov 2009 01:19:06 +0000
(
01:19
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86639
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/JumpThreading.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/JumpThreading.cpp
b/lib/Transforms/Scalar/JumpThreading.cpp
index 46d40ef5d1564ac6deb2dca605c79f898be2ca76..7a7f407b96b8d4d169175ddb55a9376ccfc0d76b 100644
(file)
--- a/
lib/Transforms/Scalar/JumpThreading.cpp
+++ b/
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);