Add paranoia checking

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6856 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-06-22 20:46:00 +00:00
parent ddd7e39537
commit 066ab6ac80

View File

@ -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;