From d708ec4c6a3e55865b2d4d8096871a2fc8087bf8 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 30 Aug 2011 18:51:55 +0000 Subject: When walking backwards to eliminate final stores to allocas at the end of a function, encountering an unrelated store should not cause us to give up like encountering a load does. llvm-svn: 138809 --- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index 8559147b716..d575a63a51f 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -617,8 +617,9 @@ bool DSE::handleEndBlock(BasicBlock &BB) { DeleteDeadInstruction(Dead, *MD, &DeadStackObjects); ++NumFastStores; MadeChange = true; - continue; } + + continue; } // Remove any dead non-memory-mutating instructions. -- cgit v1.2.3