Use getStoreSize() instead of getStoreSizeInBits()/8.
authorDan Gohman <gohman@apple.com>
Wed, 23 Sep 2009 21:07:02 +0000 (21:07 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 23 Sep 2009 21:07:02 +0000 (21:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82656 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/Blackfin/BlackfinISelLowering.cpp

index 9de0ce82377f2b8a61254802b0c5801087bbdd56..ba8d01217a5fdf132ae79d260f8ef6689fd69ac6 100644 (file)
@@ -1904,8 +1904,8 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
         // For big endian targets, we need to add an offset to the pointer to
         // load the correct bytes.  For little endian systems, we merely need to
         // read fewer bytes from the same pointer.
-        unsigned LVTStoreBytes = LoadedVT.getStoreSizeInBits()/8;
-        unsigned EVTStoreBytes = ExtVT.getStoreSizeInBits()/8;
+        unsigned LVTStoreBytes = LoadedVT.getStoreSize();
+        unsigned EVTStoreBytes = ExtVT.getStoreSize();
         unsigned PtrOff = LVTStoreBytes - EVTStoreBytes;
         unsigned Alignment = LN0->getAlignment();
         SDValue NewPtr = LN0->getBasePtr();
index d2dffc41efe667d0d2176df1dff4c87fb2d1177d..8ac8063be9ffee9ed8a5524cbb163352c0f59239 100644 (file)
@@ -1545,7 +1545,7 @@ void DAGTypeLegalizer::ExpandIntRes_LOAD(LoadSDNode *N,
     // Big-endian - high bits are at low addresses.  Favor aligned loads at
     // the cost of some bit-fiddling.
     EVT MemVT = N->getMemoryVT();
-    unsigned EBytes = MemVT.getStoreSizeInBits()/8;
+    unsigned EBytes = MemVT.getStoreSize();
     unsigned IncrementSize = NVT.getSizeInBits()/8;
     unsigned ExcessBits = (EBytes - IncrementSize)*8;
 
@@ -2230,7 +2230,7 @@ SDValue DAGTypeLegalizer::ExpandIntOp_STORE(StoreSDNode *N, unsigned OpNo) {
     GetExpandedInteger(N->getValue(), Lo, Hi);
 
     EVT ExtVT = N->getMemoryVT();
-    unsigned EBytes = ExtVT.getStoreSizeInBits()/8;
+    unsigned EBytes = ExtVT.getStoreSize();
     unsigned IncrementSize = NVT.getSizeInBits()/8;
     unsigned ExcessBits = (EBytes - IncrementSize)*8;
     EVT HiVT = EVT::getIntegerVT(*DAG.getContext(), ExtVT.getSizeInBits() - ExcessBits);
index f49332d6478e1215d86656e175f0c7d975ddb4d1..0aa0314643bc8c61ce4c1744561f96455defe84c 100644 (file)
@@ -1367,7 +1367,7 @@ SDValue SelectionDAG::getShiftAmountOperand(SDValue Op) {
 /// specified value type.
 SDValue SelectionDAG::CreateStackTemporary(EVT VT, unsigned minAlign) {
   MachineFrameInfo *FrameInfo = getMachineFunction().getFrameInfo();
-  unsigned ByteSize = VT.getStoreSizeInBits()/8;
+  unsigned ByteSize = VT.getStoreSize();
   const Type *Ty = VT.getTypeForEVT(*getContext());
   unsigned StackAlign =
   std::max((unsigned)TLI.getTargetData()->getPrefTypeAlignment(Ty), minAlign);
index a3d86954c32e6dba52f83eede774a960b088b413..374ac278fa1ab8726443fd0a6f528629a0c7fc3f 100644 (file)
@@ -206,7 +206,7 @@ BlackfinTargetLowering::LowerFormalArguments(SDValue Chain,
       InVals.push_back(ArgValue);
     } else {
       assert(VA.isMemLoc() && "CCValAssign must be RegLoc or MemLoc");
-      unsigned ObjSize = VA.getLocVT().getStoreSizeInBits()/8;
+      unsigned ObjSize = VA.getLocVT().getStoreSize();
       int FI = MFI->CreateFixedObject(ObjSize, VA.getLocMemOffset());
       SDValue FIN = DAG.getFrameIndex(FI, MVT::i32);
       InVals.push_back(DAG.getLoad(VA.getValVT(), dl, Chain, FIN, NULL, 0));