mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-12 06:06:19 +00:00
Don't DCE FreeInst's. We were using those! Patch from Owen Anderson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46553 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e504d76a15
commit
d29ce1783c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user