aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-11 21:27:41 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-11 21:27:41 +0000
commitfb384d61c78b60787ed65475d8403aee65023962 (patch)
tree7bf869f21ac85ae4ddbeea3069784c88381bd07e /lib/Analysis/ValueTracking.cpp
parentd9a3bad4487dee0b9ed1a0f5555dffe605826158 (diff)
Revert 165732 for further review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ValueTracking.cpp')
-rw-r--r--lib/Analysis/ValueTracking.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp
index 1d7f0692cb..951b442b87 100644
--- a/lib/Analysis/ValueTracking.cpp
+++ b/lib/Analysis/ValueTracking.cpp
@@ -40,8 +40,7 @@ static unsigned getBitWidth(Type *Ty, const DataLayout *TD) {
if (unsigned BitWidth = Ty->getScalarSizeInBits())
return BitWidth;
assert(isa<PointerType>(Ty) && "Expected a pointer type!");
- return TD ?
- TD->getPointerSizeInBits(cast<PointerType>(Ty)->getAddressSpace()) : 0;
+ return TD ? TD->getPointerSizeInBits() : 0;
}
static void ComputeMaskedBitsAddSub(bool Add, Value *Op0, Value *Op1, bool NSW,
@@ -1622,8 +1621,7 @@ Value *llvm::GetPointerBaseWithConstantOffset(Value *Ptr, int64_t &Offset,
// Re-sign extend from the pointer size if needed to get overflow edge cases
// right.
- unsigned AS = GEP->getPointerAddressSpace();
- unsigned PtrSize = TD.getPointerSizeInBits(AS);
+ unsigned PtrSize = TD.getPointerSizeInBits();
if (PtrSize < 64)
Offset = SignExtend64(Offset, PtrSize);