diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-01-30 07:45:37 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-01-30 07:45:37 +0000 |
commit | 0e3a5cb14ac1614aab732877d12ca7917a32443a (patch) | |
tree | 208d258a2ef2837aa8915637221d16d3da782b10 /llvm/lib/Transforms | |
parent | 05ba4cbe178057a2a0588ddba2eb25d38902c34d (diff) | |
download | bcm5719-llvm-0e3a5cb14ac1614aab732877d12ca7917a32443a.tar.gz bcm5719-llvm-0e3a5cb14ac1614aab732877d12ca7917a32443a.zip |
Don't DCE FreeInst's. We were using those! Patch from Owen Anderson.
llvm-svn: 46553
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index 7e2588ab77d..ba0d1bdf2bd 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -420,7 +420,7 @@ bool DSE::handleEndBlock(BasicBlock& BB, } else { // For any non-memory-affecting non-terminators, DCE them as we reach them Instruction *CI = BBI; - if (!CI->isTerminator() && CI->getNumUses() == 0) { + if (!CI->isTerminator() && CI->getNumUses() == 0 && !isa<FreeInst>(CI)) { // DCE instructions only used to calculate that load for (Instruction::op_iterator OI = CI->op_begin(), OE = CI->op_end(); |