aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-10-12 15:22:24 +0000
committerJim Laskey <jlaskey@mac.com>2006-10-12 15:22:24 +0000
commit3ad175bd707f268436afa42af8672569b5b92cb2 (patch)
tree8a5ed7880e67292c339d8965ce1dcae8c3678fa2 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentb870100f2a2be0e7de99f7710db01a3e1f9d305b (diff)
D'oh - need to use the rigth kind of store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 737c068553..2c15f39db4 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -49,7 +49,7 @@ namespace {
static cl::opt<bool>
CombinerAA("combiner-alias-analysis", cl::Hidden,
cl::desc("Turn on alias analysis turning testing"));
-
+
//------------------------------ DAGCombiner ---------------------------------//
class VISIBILITY_HIDDEN DAGCombiner {
@@ -504,7 +504,7 @@ SDOperand DAGCombiner::visit(SDNode *N) {
case ISD::BR_CC: return visitBR_CC(N);
case ISD::LOAD: return visitLOAD(N);
// FIXME - Switch over after StoreSDNode comes online.
- case ISD::TRUNCSTORE: // Fail thru
+ case ISD::TRUNCSTORE: // Fall thru
case ISD::STORE: return visitSTORE(N);
case ISD::INSERT_VECTOR_ELT: return visitINSERT_VECTOR_ELT(N);
case ISD::VINSERT_VECTOR_ELT: return visitVINSERT_VECTOR_ELT(N);
@@ -2708,7 +2708,10 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
// If there is a better chain.
if (Chain != BetterChain) {
// Replace the chain to avoid dependency.
- SDOperand ReplTStore = DAG.getStore(BetterChain, Value, Ptr, SrcValue);
+ SDOperand ReplTStore = DAG.getNode(ISD::TRUNCSTORE, MVT::Other,
+ BetterChain, Value, Ptr, SrcValue,
+ N->getOperand(4));
+
// Create token to keep both nodes around.
return DAG.getNode(ISD::TokenFactor, MVT::Other, Chain, ReplTStore);
}