From: Nikita Popov Date: Tue, 18 Jul 2023 09:52:27 +0000 (+0200) Subject: [polly] Remove use of getWithSamePointeeType() (NFC) X-Git-Tag: upstream/17.0.6~1380 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34f73967aecfebcc0ab62d18af51ae57cfb5c33c;p=platform%2Fupstream%2Fllvm.git [polly] Remove use of getWithSamePointeeType() (NFC) --- 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 &&