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 | 066ab6ac80ae93af64857c5822efc81298eaca32 (patch) | |
tree | fad3d002c5b9f3f2a59fb6a021c56fc1598adfc3 /lib/Transforms | |
parent | ddd7e39537087a2fb8172a1f3d3a03df1f7f5f8d (diff) |
Add paranoia checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/TailDuplication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index 17237431a9..e736f970af 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/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; |