Nick Lewycky pointed out that this code makes changes unconditionally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92739 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-01-05 17:50:58 +00:00
parent f0fd3afeff
commit ba25f0924e

View File

@ -328,7 +328,8 @@ llvm::RecursivelyDeleteDeadPHINode(PHINode *PN) {
if (!PHIs.insert(cast<PHINode>(JP))) {
// Break the cycle and delete the PHI and its operands.
JP->replaceAllUsesWith(UndefValue::get(JP->getType()));
Changed |= RecursivelyDeleteTriviallyDeadInstructions(JP);
(void)RecursivelyDeleteTriviallyDeadInstructions(JP);
Changed = true;
break;
}
return Changed;