diff options
author | Micah Villmow <villmow@gmail.com> | 2012-10-24 18:36:13 +0000 |
---|---|---|
committer | Micah Villmow <villmow@gmail.com> | 2012-10-24 18:36:13 +0000 |
commit | b52fb876171e3670e7307fda4459ca005d49d9f5 (patch) | |
tree | e3327db438225073f62c4f4733c814082c9abfe5 /lib/Transforms/Utils/Local.cpp | |
parent | 199063ea37d8cc651a20ab00eef4326cd9331371 (diff) |
Add some cleanup to the DataLayout changes requested by Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 9729687a83..b03c878ef3 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -807,7 +807,7 @@ unsigned llvm::getOrEnforceKnownAlignment(Value *V, unsigned PrefAlign, assert(V->getType()->isPointerTy() && "getOrEnforceKnownAlignment expects a pointer!"); unsigned AS = cast<PointerType>(V->getType())->getAddressSpace(); - unsigned BitWidth = TD ? TD->getPointerSizeInBits(AS) : 64; + unsigned BitWidth = TD ? TD->getTypeSizeInBits(V->getType()) : 64; APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0); ComputeMaskedBits(V, KnownZero, KnownOne, TD); unsigned TrailZ = KnownZero.countTrailingOnes(); |