mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Revert 165732 for further review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165747 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user