mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 15:51:54 +00:00
Fix bug where use still existed in dead code
llvm-svn: 5824
This commit is contained in:
parent
e3fca9bc04
commit
a489b529fe
@ -168,6 +168,8 @@ void PromoteMem2Reg::run() {
|
||||
//
|
||||
while (!I->use_empty()) {
|
||||
Instruction *U = cast<Instruction>(I->use_back());
|
||||
if (!U->use_empty()) // If uses remain in dead code segment...
|
||||
U->replaceAllUsesWith(Constant::getNullValue(U->getType()));
|
||||
U->getParent()->getInstList().erase(U);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user