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

Chris Lattner lattner at cs.uiuc.edu
Thu Oct 13 14:52:43 PDT 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.37 -> 1.38
---
Log message:

Fix some bugs in (sext (load x))


---
Diffs of the changes:  (+2 -1)

 DAGCombiner.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.37 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.38
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.37	Thu Oct 13 13:34:58 2005
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Thu Oct 13 16:52:31 2005
@@ -1248,8 +1248,9 @@
     SDOperand ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, N0.getOperand(0),
                                        N0.getOperand(1), N0.getOperand(2),
                                        N0.getValueType());
-    CombineTo(N0.Val, ExtLoad, ExtLoad.getOperand(0));
     WorkList.push_back(N);
+    CombineTo(N0.Val, DAG.getNode(ISD::TRUNCATE, N0.getValueType(), ExtLoad),
+              ExtLoad.getValue(1));
     return SDOperand();
   }
   return SDOperand();






More information about the llvm-commits mailing list