Author: nicholas Date: Wed Jan 30 01:45:37 2008 New Revision: 46553 URL: http://llvm.org/viewvc/llvm-project?rev=46553&view=rev Log: Don't DCE FreeInst's. We were using those! Patch from Owen Anderson.
Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Modified: llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp?rev=46553&r1=46552&r2=46553&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Wed Jan 30 01:45:37 2008 @@ -420,7 +420,7 @@ } 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(); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits