mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
update memdep when an instruction is deleted. This code isn't
actually reached in the testcase in PR8954, but it's safe and good practice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123224 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1383,8 +1383,11 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!CanDoPRE) {
|
if (!CanDoPRE) {
|
||||||
while (!NewInsts.empty())
|
while (!NewInsts.empty()) {
|
||||||
NewInsts.pop_back_val()->eraseFromParent();
|
Instruction *I = NewInsts.pop_back_val();
|
||||||
|
if (MD) MD->removeInstruction(I);
|
||||||
|
I->eraseFromParent();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user