mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-30 15:22:41 +00:00
Explicitly check for StoreInst, do not lose the chance to delete
unused loads or bitcasts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
16767c6b49
commit
b0c4199a55
@ -1223,7 +1223,7 @@ void SROA::CleanupAllocaUsers(AllocationInst *AI) {
|
||||
CleanupGEP(GEPI);
|
||||
else if (Instruction *I = dyn_cast<Instruction>(U)) {
|
||||
SmallVector<DbgInfoIntrinsic *, 2> DbgInUses;
|
||||
if (!I->use_empty() && OnlyUsedByDbgInfoIntrinsics(I, &DbgInUses)) {
|
||||
if (!isa<StoreInst>(I) && OnlyUsedByDbgInfoIntrinsics(I, &DbgInUses)) {
|
||||
// Safe to remove debug info uses.
|
||||
while (!DbgInUses.empty()) {
|
||||
DbgInfoIntrinsic *DI = DbgInUses.back(); DbgInUses.pop_back();
|
||||
|
Loading…
x
Reference in New Issue
Block a user