mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +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:
@ -3251,7 +3251,8 @@ static Value *SimplifyGEPInst(ArrayRef<Value *> Ops, const Query &Q, unsigned) {
|
||||
return Ops[0];
|
||||
|
||||
// Compute the (pointer) type returned by the GEP instruction.
|
||||
Type *LastType = GetElementPtrInst::getIndexedType(PtrTy, Ops.slice(1));
|
||||
Type *LastType =
|
||||
GetElementPtrInst::getIndexedType(PtrTy->getElementType(), Ops.slice(1));
|
||||
Type *GEPTy = PointerType::get(LastType, AS);
|
||||
if (VectorType *VT = dyn_cast<VectorType>(Ops[0]->getType()))
|
||||
GEPTy = VectorType::get(GEPTy, VT->getNumElements());
|
||||
|
Reference in New Issue
Block a user