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

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 21 08:32:51 PDT 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.149 -> 1.150
---
Log message:

Fix a couple more memory issues


---
Diffs of the changes:  (+4 -4)

 DAGCombiner.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.149 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.150
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.149	Thu Apr 20 18:55:59 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Fri Apr 21 10:32:26 2006
@@ -739,7 +739,7 @@
     return N1.getOperand(0);
 
   if (!MVT::isVector(VT) && SimplifyDemandedBits(SDOperand(N, 0)))
-    return SDOperand();
+    return SDOperand(N, 0);
   
   // fold (a+b) -> (a|b) iff a and b share no bits.
   if (MVT::isInteger(VT) && !MVT::isVector(VT)) {
@@ -1144,7 +1144,7 @@
   // fold (and (sra)) -> (and (srl)) when possible.
   if (!MVT::isVector(VT) &&
       SimplifyDemandedBits(SDOperand(N, 0)))
-    return SDOperand();
+    return SDOperand(N, 0);
   // fold (zext_inreg (extload x)) -> (zextload x)
   if (N0.getOpcode() == ISD::EXTLOAD) {
     MVT::ValueType EVT = cast<VTSDNode>(N0.getOperand(3))->getVT();
@@ -1452,7 +1452,7 @@
   // Simplify the expression using non-local knowledge.
   if (!MVT::isVector(VT) &&
       SimplifyDemandedBits(SDOperand(N, 0)))
-    return SDOperand();
+    return SDOperand(N, 0);
   
   return SDOperand();
 }
@@ -1481,7 +1481,7 @@
   if (TLI.MaskedValueIsZero(SDOperand(N, 0), MVT::getIntVTBitMask(VT)))
     return DAG.getConstant(0, VT);
   if (SimplifyDemandedBits(SDOperand(N, 0)))
-    return SDOperand();
+    return SDOperand(N, 0);
   // fold (shl (shl x, c1), c2) -> 0 or (shl x, c1+c2)
   if (N1C && N0.getOpcode() == ISD::SHL && 
       N0.getOperand(1).getOpcode() == ISD::Constant) {






More information about the llvm-commits mailing list