From 2e74b1c954857bd5d351ca2ae0b7ecb7c3f6cc73 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 17 Jul 2021 16:38:43 +0200 Subject: [PATCH] [OpaquePtr] Remove uses of CreateConstGEP1_64() without element type Remove uses of to-be-deprecated API. --- lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp b/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp index e57d971b6ef..4971b010870 100644 --- a/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp +++ b/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp @@ -165,8 +165,10 @@ bool AMDGPULateCodeGenPrepare::visitLoadInst(LoadInst &LI) { PointerType *Int32PtrTy = Type::getInt32PtrTy(LI.getContext(), AS); PointerType *Int8PtrTy = Type::getInt8PtrTy(LI.getContext(), AS); auto *NewPtr = IRB.CreateBitCast( - IRB.CreateConstGEP1_64(IRB.CreatePointerBitCastOrAddrSpaceCast(Base, Int8PtrTy), - Offset - Adjust), + IRB.CreateConstGEP1_64( + IRB.getInt8Ty(), + IRB.CreatePointerBitCastOrAddrSpaceCast(Base, Int8PtrTy), + Offset - Adjust), Int32PtrTy); LoadInst *NewLd = IRB.CreateAlignedLoad(IRB.getInt32Ty(), NewPtr, Align(4)); NewLd->copyMetadata(LI);