[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Jim Laskey jlaskey at apple.com
Thu Oct 12 08:22:38 PDT 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.215 -> 1.216
---
Log message:

D'oh - need to use the rigth kind of store.

---
Diffs of the changes:  (+6 -3)

 DAGCombiner.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.215 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.216
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.215	Wed Oct 11 13:55:16 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Thu Oct 12 10:22:24 2006
@@ -49,7 +49,7 @@
   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 @@
   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 @@
       // 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);
       }






More information about the llvm-commits mailing list