Temporarily Revert "[DataLayout] Fix occurrences that size and range of pointers are assumed to be the same."
This reverts commit 5f6208778f.
This caused failures in Transforms/PhaseOrdering/scev-custom-dl.ll
const: Assertion `getBitWidth() == CR.getBitWidth() && "ConstantRange types don't agree!"' failed.
This commit is contained in:
@@ -768,13 +768,13 @@ unsigned DataLayout::getPrefTypeAlignment(Type *Ty) const {
|
||||
|
||||
IntegerType *DataLayout::getIntPtrType(LLVMContext &C,
|
||||
unsigned AddressSpace) const {
|
||||
return IntegerType::get(C, getPointerSizeInBits(AddressSpace));
|
||||
return IntegerType::get(C, getIndexSizeInBits(AddressSpace));
|
||||
}
|
||||
|
||||
Type *DataLayout::getIntPtrType(Type *Ty) const {
|
||||
assert(Ty->isPtrOrPtrVectorTy() &&
|
||||
"Expected a pointer or pointer vector type.");
|
||||
unsigned NumBits = getPointerTypeSizeInBits(Ty);
|
||||
unsigned NumBits = getIndexTypeSizeInBits(Ty);
|
||||
IntegerType *IntTy = IntegerType::get(Ty->getContext(), NumBits);
|
||||
if (VectorType *VecTy = dyn_cast<VectorType>(Ty))
|
||||
return VectorType::get(IntTy, VecTy->getNumElements());
|
||||
|
||||
Reference in New Issue
Block a user