Add paranoia checking

llvm-svn: 6856
This commit is contained in:
Chris Lattner 2003-06-22 20:46:00 +00:00
parent 08cc123f78
commit a98d464fd6

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;