From: George Burgess IV Date: Sun, 23 Dec 2018 03:10:56 +0000 (+0000) Subject: [Loads] Use LocationSize instead of ints; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8bf0c718a9341001043557e7b9f4dbc9507765d8;p=llvm [Loads] Use LocationSize instead of ints; NFC 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 --- diff --git a/lib/Analysis/Loads.cpp b/lib/Analysis/Loads.cpp index d319d4c249d..cd986dcfde8 100644 --- a/lib/Analysis/Loads.cpp +++ b/lib/Analysis/Loads.cpp @@ -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();