mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Minor address space code simplification.
Remove assertion that the verifier should catch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187692 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -181,8 +181,7 @@ template<typename IRBuilderTy>
|
||||
Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &TD, User *GEP,
|
||||
bool NoAssumptions = false) {
|
||||
GEPOperator *GEPOp = cast<GEPOperator>(GEP);
|
||||
unsigned AS = GEPOp->getPointerAddressSpace();
|
||||
Type *IntPtrTy = TD.getIntPtrType(GEP->getContext(), AS);
|
||||
Type *IntPtrTy = TD.getIntPtrType(GEP->getType());
|
||||
Value *Result = Constant::getNullValue(IntPtrTy);
|
||||
|
||||
// If the GEP is inbounds, we know that none of the addressing operations will
|
||||
@@ -190,7 +189,7 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &TD, User *GEP,
|
||||
bool isInBounds = GEPOp->isInBounds() && !NoAssumptions;
|
||||
|
||||
// Build a mask for high order bits.
|
||||
unsigned IntPtrWidth = TD.getPointerSizeInBits(AS);
|
||||
unsigned IntPtrWidth = IntPtrTy->getScalarType()->getIntegerBitWidth();
|
||||
uint64_t PtrSizeMask = ~0ULL >> (64 - IntPtrWidth);
|
||||
|
||||
gep_type_iterator GTI = gep_type_begin(GEP);
|
||||
|
Reference in New Issue
Block a user