summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-22 20:46:00 +0000
committerChris Lattner <sabre@nondot.org>2003-06-22 20:46:00 +0000
commit92963de6fa5a2d4c9c37ff9399634e95bce61f13 (patch)
tree0385bdf5257daf54bb9f2c7ef62df887b9cd5c7c /llvm/lib/Transforms
parent3a8622527c2ad6c7b24f5a2898fce950b0efebc1 (diff)
downloadbcm5719-llvm-92963de6fa5a2d4c9c37ff9399634e95bce61f13.tar.gz
bcm5719-llvm-92963de6fa5a2d4c9c37ff9399634e95bce61f13.zip
Add paranoia checking
llvm-svn: 6856
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/TailDuplication.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/TailDuplication.cpp b/llvm/lib/Transforms/Scalar/TailDuplication.cpp
index 17237431a91..e736f970af5 100644
--- a/llvm/lib/Transforms/Scalar/TailDuplication.cpp
+++ b/llvm/lib/Transforms/Scalar/TailDuplication.cpp
@@ -303,7 +303,7 @@ Value *TailDup::GetValueInBlock(BasicBlock *BB, Value *OrigVal,
}
// Found a value to replace the PHI node with?
- if (ReplVal) {
+ if (ReplVal && ReplVal != PN) {
PN->replaceAllUsesWith(ReplVal);
BBVal = ReplVal;
if (BBOutVal == PN) BBOutVal = ReplVal;
OpenPOWER on IntegriCloud