]> granicus.if.org Git - llvm/commitdiff
[Loads] Use LocationSize instead of ints; NFC
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Sun, 23 Dec 2018 03:10:56 +0000 (03:10 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Sun, 23 Dec 2018 03:10:56 +0000 (03:10 +0000)
Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.

This tries to find literal loads/stores of the given type, so this has
to be precise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350016 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/Loads.cpp

index d319d4c249d33f7162192c9575352e8387a52902..cd986dcfde87989b094080d1b4e2244ac2fe9c88 100644 (file)
@@ -345,7 +345,7 @@ Value *llvm::FindAvailablePtrLoadStore(Value *Ptr, Type *AccessTy,
   const DataLayout &DL = ScanBB->getModule()->getDataLayout();
 
   // Try to get the store size for the type.
-  uint64_t AccessSize = DL.getTypeStoreSize(AccessTy);
+  auto AccessSize = LocationSize::precise(DL.getTypeStoreSize(AccessTy));
 
   Value *StrippedPtr = Ptr->stripPointerCasts();