mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
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:
@ -328,7 +328,8 @@ llvm::RecursivelyDeleteDeadPHINode(PHINode *PN) {
|
|||||||
if (!PHIs.insert(cast<PHINode>(JP))) {
|
if (!PHIs.insert(cast<PHINode>(JP))) {
|
||||||
// Break the cycle and delete the PHI and its operands.
|
// Break the cycle and delete the PHI and its operands.
|
||||||
JP->replaceAllUsesWith(UndefValue::get(JP->getType()));
|
JP->replaceAllUsesWith(UndefValue::get(JP->getType()));
|
||||||
Changed |= RecursivelyDeleteTriviallyDeadInstructions(JP);
|
(void)RecursivelyDeleteTriviallyDeadInstructions(JP);
|
||||||
|
Changed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Changed;
|
return Changed;
|
||||||
|
Reference in New Issue
Block a user