forked from OSchip/llvm-project
[polly] Get rid of a couple uses of PointerType::getElementType().
This commit is contained in:
parent
68fa6f7c7c
commit
43705149ed
|
@ -278,8 +278,8 @@ Value *BlockGenerator::generateLocationAccessed(
|
|||
// the newly generated pointer.
|
||||
auto OldPtrTy = ExpectedType->getPointerTo();
|
||||
auto NewPtrTy = Address->getType();
|
||||
OldPtrTy = PointerType::get(OldPtrTy->getElementType(),
|
||||
NewPtrTy->getPointerAddressSpace());
|
||||
OldPtrTy = PointerType::getWithSamePointeeType(
|
||||
OldPtrTy, NewPtrTy->getPointerAddressSpace());
|
||||
|
||||
if (OldPtrTy != NewPtrTy)
|
||||
Address = Builder.CreateBitOrPointerCast(Address, OldPtrTy);
|
||||
|
@ -801,7 +801,6 @@ void BlockGenerator::generateScalarStores(
|
|||
|
||||
// The new Val might have a different type than the old Val due to
|
||||
// ScalarEvolution looking through bitcasts.
|
||||
if (Val->getType() != Address->getType()->getPointerElementType())
|
||||
Address = Builder.CreateBitOrPointerCast(
|
||||
Address, Val->getType()->getPointerTo());
|
||||
|
||||
|
|
Loading…
Reference in New Issue