diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-22 20:46:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-22 20:46:00 +0000 |
commit | 92963de6fa5a2d4c9c37ff9399634e95bce61f13 (patch) | |
tree | 0385bdf5257daf54bb9f2c7ef62df887b9cd5c7c /llvm/lib/Transforms/Scalar/TailDuplication.cpp | |
parent | 3a8622527c2ad6c7b24f5a2898fce950b0efebc1 (diff) | |
download | bcm5719-llvm-92963de6fa5a2d4c9c37ff9399634e95bce61f13.tar.gz bcm5719-llvm-92963de6fa5a2d4c9c37ff9399634e95bce61f13.zip |
Add paranoia checking
llvm-svn: 6856
Diffstat (limited to 'llvm/lib/Transforms/Scalar/TailDuplication.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/TailDuplication.cpp | 2 |
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; |