Add paranoia checking

llvm-svn: 6856
This commit is contained in:
Chris Lattner 2003-06-22 20:46:00 +00:00
parent 3a8622527c
commit 92963de6fa
1 changed files with 1 additions and 1 deletions

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;