diff options
| author | Zhou Sheng <zhousheng00@gmail.com> | 2009-03-18 12:48:48 +0000 |
|---|---|---|
| committer | Zhou Sheng <zhousheng00@gmail.com> | 2009-03-18 12:48:48 +0000 |
| commit | 4e2af3cb5549af0c920e0c19968dc555399ea4f9 (patch) | |
| tree | 232d779604ab65c60658f4b7ba38a8f3ebcdf308 /llvm/lib | |
| parent | 05bea906c181f7cc22bdfd96194a35337259586a (diff) | |
| download | bcm5719-llvm-4e2af3cb5549af0c920e0c19968dc555399ea4f9.tar.gz bcm5719-llvm-4e2af3cb5549af0c920e0c19968dc555399ea4f9.zip | |
Explicitly check for StoreInst, do not lose the chance to delete
unused loads or bitcasts.
llvm-svn: 67202
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 358b0981cc8..9cbe073e292 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -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(); |

