From 34f73967aecfebcc0ab62d18af51ae57cfb5c33c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 18 Jul 2023 11:52:27 +0200 Subject: [PATCH] [polly] Remove use of getWithSamePointeeType() (NFC) --- polly/lib/CodeGen/BlockGenerators.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index 4c13364..3de1781 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -265,19 +265,7 @@ Value *BlockGenerator::generateLocationAccessed( if (AccessExpr) { AccessExpr = isl_ast_expr_address_of(AccessExpr); - auto Address = ExprBuilder->create(AccessExpr); - - // Cast the address of this memory access to a pointer type that has the - // same element type as the original access, but uses the address space of - // the newly generated pointer. - auto OldPtrTy = ExpectedType->getPointerTo(); - auto NewPtrTy = Address->getType(); - OldPtrTy = PointerType::getWithSamePointeeType( - OldPtrTy, NewPtrTy->getPointerAddressSpace()); - - if (OldPtrTy != NewPtrTy) - Address = Builder.CreateBitOrPointerCast(Address, OldPtrTy); - return Address; + return ExprBuilder->create(AccessExpr); } assert( Pointer && -- 2.7.4