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

Chris Lattner lattner at cs.uiuc.edu
Thu Oct 13 11:16:45 PDT 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.35 -> 1.36
---
Log message:

Fix a minor bug in the dag combiner that broke pcompress2 and some other
tests.


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

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


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.35 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.36
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.35	Wed Oct 12 22:11:28 2005
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Thu Oct 13 13:16:34 2005
@@ -805,13 +805,12 @@
     // before Legalize, or the resulting zextload is legal on the target, then
     // go ahead and do the fold.
     if ((N1C->getValue() == (1ULL << MVT::getSizeInBits(EVT))-1) &&
-        (!AfterLegalize || 
-         TargetLowering::Legal == TLI.getOperationAction(ISD::ZEXTLOAD, EVT))) {
+        (!AfterLegalize || TLI.isOperationLegal(ISD::ZEXTLOAD, EVT))) {
       SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, N0.getOperand(0),
                                          N0.getOperand(1), N0.getOperand(2),
                                          EVT);
-      CombineTo(N0.Val, ExtLoad, ExtLoad.getOperand(0));
       WorkList.push_back(N);
+      CombineTo(N0.Val, ExtLoad, ExtLoad.getValue(1));
       return SDOperand();
     }
   }
@@ -827,8 +826,8 @@
       SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, N0.getOperand(0),
                                          N0.getOperand(1), N0.getOperand(2),
                                          EVT);
-      CombineTo(N0.Val, ExtLoad, ExtLoad.getOperand(0));
       WorkList.push_back(N);
+      CombineTo(N0.Val, ExtLoad, ExtLoad.getValue(1));
       return SDOperand();
     }
   }






More information about the llvm-commits mailing list