mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
[opaque pointer type] Change GetElementPtrInst::getIndexedType to take the pointee type
This pushes the use of PointerType::getElementType up into several callers - I'll essentially just have to keep pushing that up the stack until I can eliminate every call to it... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233604 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -611,8 +611,10 @@ static bool canReplaceGEPIdxWithZero(InstCombiner &IC, GetElementPtrInst *GEPI,
|
||||
return false;
|
||||
|
||||
SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx);
|
||||
Type *AllocTy =
|
||||
GetElementPtrInst::getIndexedType(GEPI->getOperand(0)->getType(), Ops);
|
||||
Type *AllocTy = GetElementPtrInst::getIndexedType(
|
||||
cast<PointerType>(GEPI->getOperand(0)->getType()->getScalarType())
|
||||
->getElementType(),
|
||||
Ops);
|
||||
if (!AllocTy || !AllocTy->isSized())
|
||||
return false;
|
||||
const DataLayout &DL = IC.getDataLayout();
|
||||
|
Reference in New Issue
Block a user