Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.56 -> 1.57 --- Log message: Fix DSE to not nuke dead stores unless they redundant store is the same VT as the killing one. Fix fixes PR491: http://llvm.cs.uiuc.edu/PR491 --- Diffs of the changes: (+4 -1) DAGCombiner.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.56 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.57 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.56 Thu Oct 27 00:06:38 2005 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Oct 27 02:10:34 2005 @@ -1976,7 +1976,10 @@ // If this is a store that kills a previous store, remove the previous store. if (Chain.getOpcode() == ISD::STORE && Chain.getOperand(2) == Ptr && - Chain.Val->hasOneUse() /* Avoid introducing DAG cycles */) { + Chain.Val->hasOneUse() /* Avoid introducing DAG cycles */ && + // Make sure that these stores are the same value type: + // FIXME: we really care that the second store is >= size of the first. + Value.getValueType() == Chain.getOperand(1).getValueType()) { // Create a new store of Value that replaces both stores. SDNode *PrevStore = Chain.Val; if (PrevStore->getOperand(1) == Value) // Same value multiply stored. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits