aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhou Sheng <zhousheng00@gmail.com>2009-03-18 12:48:48 +0000
committerZhou Sheng <zhousheng00@gmail.com>2009-03-18 12:48:48 +0000
commitb0c4199a55d72fb9560f00b84a92a062fb8e79ea (patch)
tree83ea24a79b87442d3262e1f2677de6d754613ad2
parent16767c6b49659d5187ebb70c97207b0bf146ba35 (diff)
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
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 358b0981cc..9cbe073e29 100644
--- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/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();