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

Dan Gohman djg at cray.com
Thu Jun 14 15:58:31 PDT 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.311 -> 1.312
LegalizeDAG.cpp updated: 1.496 -> 1.497
SelectionDAG.cpp updated: 1.406 -> 1.407
SelectionDAGISel.cpp updated: 1.462 -> 1.463
---
Log message:

Rename MVT::getVectorBaseType to MVT::getVectorElementType.


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

 DAGCombiner.cpp      |    2 +-
 LegalizeDAG.cpp      |   10 +++++-----
 SelectionDAG.cpp     |    4 ++--
 SelectionDAGISel.cpp |    4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.311 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.312
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.311	Thu May 24 21:19:06 2007
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Thu Jun 14 17:58:02 2007
@@ -1809,7 +1809,7 @@
       return DAG.getConstant(0, VT);
     } else if (!AfterLegalize || TLI.isOperationLegal(ISD::BUILD_VECTOR, VT)) {
       // Produce a vector of zeros.
-      SDOperand El = DAG.getConstant(0, MVT::getVectorBaseType(VT));
+      SDOperand El = DAG.getConstant(0, MVT::getVectorElementType(VT));
       std::vector<SDOperand> Ops(MVT::getVectorNumElements(VT), El);
       return DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size());
     }


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.496 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.497
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.496	Wed Jun 13 10:12:02 2007
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp	Thu Jun 14 17:58:02 2007
@@ -1014,7 +1014,7 @@
         
         unsigned NumElts = MVT::getVectorNumElements(Tmp1.getValueType());
         MVT::ValueType ShufMaskVT = MVT::getIntVectorWithNumElements(NumElts);
-        MVT::ValueType ShufMaskEltVT = MVT::getVectorBaseType(ShufMaskVT);
+        MVT::ValueType ShufMaskEltVT = MVT::getVectorElementType(ShufMaskVT);
         
         // We generate a shuffle of InVec and ScVec, so the shuffle mask should
         // be 0,1,2,3,4,5... with the appropriate element replaced with elt 0 of
@@ -1110,7 +1110,7 @@
       // FALLTHROUGH
     case TargetLowering::Expand: {
       MVT::ValueType VT = Node->getValueType(0);
-      MVT::ValueType EltVT = MVT::getVectorBaseType(VT);
+      MVT::ValueType EltVT = MVT::getVectorElementType(VT);
       MVT::ValueType PtrVT = TLI.getPointerTy();
       SDOperand Mask = Node->getOperand(2);
       unsigned NumElems = Mask.getNumOperands();
@@ -2386,7 +2386,7 @@
              "Cannot expand this binary operator!");
       // Expand the operation into a bunch of nasty scalar code.
       SmallVector<SDOperand, 8> Ops;
-      MVT::ValueType EltVT = MVT::getVectorBaseType(Node->getValueType(0));
+      MVT::ValueType EltVT = MVT::getVectorElementType(Node->getValueType(0));
       MVT::ValueType PtrVT = TLI.getPointerTy();
       for (unsigned i = 0, e = MVT::getVectorNumElements(Node->getValueType(0));
            i != e; ++i) {
@@ -4006,7 +4006,7 @@
     // Build the shuffle constant vector: <0, 0, 0, 0>
     MVT::ValueType MaskVT = 
       MVT::getIntVectorWithNumElements(NumElems);
-    SDOperand Zero = DAG.getConstant(0, MVT::getVectorBaseType(MaskVT));
+    SDOperand Zero = DAG.getConstant(0, MVT::getVectorElementType(MaskVT));
     std::vector<SDOperand> ZeroVec(NumElems, Zero);
     SDOperand SplatMask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
                                       &ZeroVec[0], ZeroVec.size());
@@ -4036,7 +4036,7 @@
            E = Values.end(); I != E; ++I) {
       for (std::vector<unsigned>::iterator II = I->second.begin(),
              EE = I->second.end(); II != EE; ++II)
-        MaskVec[*II] = DAG.getConstant(i, MVT::getVectorBaseType(MaskVT));
+        MaskVec[*II] = DAG.getConstant(i, MVT::getVectorElementType(MaskVT));
       i += NumElems;
     }
     SDOperand ShuffleMask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT,


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.406 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.407
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.406	Wed Jun 13 10:12:02 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Thu Jun 14 17:58:02 2007
@@ -1114,7 +1114,7 @@
     break;
   case ISD::SCALAR_TO_VECTOR:
     assert(MVT::isVector(VT) && !MVT::isVector(Operand.getValueType()) &&
-           MVT::getVectorBaseType(VT) == Operand.getValueType() &&
+           MVT::getVectorElementType(VT) == Operand.getValueType() &&
            "Illegal SCALAR_TO_VECTOR node!");
     break;
   case ISD::FNEG:
@@ -1593,7 +1593,7 @@
     ExtType = ISD::NON_EXTLOAD;
 
   if (MVT::isVector(VT))
-    assert(EVT == MVT::getVectorBaseType(VT) && "Invalid vector extload!");
+    assert(EVT == MVT::getVectorElementType(VT) && "Invalid vector extload!");
   else
     assert(EVT < VT && "Should only be an extending load, not truncating!");
   assert((ExtType == ISD::EXTLOAD || MVT::isInteger(VT)) &&


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.462 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.463
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.462	Wed Jun 13 11:53:21 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Thu Jun 14 17:58:02 2007
@@ -793,7 +793,7 @@
     
     if (MVT::isVector(PTyElementVT)) {
       Ops.push_back(DAG.getConstant(NE * MVT::getVectorNumElements(PTyElementVT), MVT::i32));
-      Ops.push_back(DAG.getValueType(MVT::getVectorBaseType(PTyElementVT)));
+      Ops.push_back(DAG.getValueType(MVT::getVectorElementType(PTyElementVT)));
       N = DAG.getNode(ISD::VCONCAT_VECTORS, MVT::Vector, &Ops[0], Ops.size());
     } else {
       Ops.push_back(DAG.getConstant(NE, MVT::i32));
@@ -2905,7 +2905,7 @@
     return DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Val, 
                        DAG.getConstant(MVT::getVectorNumElements(RegVT),
                                        MVT::i32),
-                       DAG.getValueType(MVT::getVectorBaseType(RegVT)));
+                       DAG.getValueType(MVT::getVectorElementType(RegVT)));
   }
   
   if (MVT::isInteger(RegVT)) {






More information about the llvm-commits mailing list