[llvm] 3ae5f74 - AMDGPU: Don't try to create pointer bitcasts in kernarg lowering
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 29 08:01:40 PDT 2023
Author: Matt Arsenault
Date: 2023-04-29T10:04:45-04:00
New Revision: 3ae5f74f5476afeae5c94480d0cac86bcb80ded6
URL: https://github.com/llvm/llvm-project/commit/3ae5f74f5476afeae5c94480d0cac86bcb80ded6
DIFF: https://github.com/llvm/llvm-project/commit/3ae5f74f5476afeae5c94480d0cac86bcb80ded6.diff
LOG: AMDGPU: Don't try to create pointer bitcasts in kernarg lowering
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
index f3ff9b753585..90aeb4a4d1da 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
@@ -86,7 +86,6 @@ bool AMDGPULowerKernelArguments::runOnFunction(Function &F) {
KernArgSegment->addRetAttr(
Attribute::getWithDereferenceableBytes(Ctx, TotalKernArgSize));
- unsigned AS = KernArgSegment->getType()->getPointerAddressSpace();
uint64_t ExplicitArgOffset = 0;
for (Argument &Arg : F.args()) {
@@ -170,8 +169,6 @@ bool AMDGPULowerKernelArguments::runOnFunction(Function &F) {
AdjustedArgTy = V4Ty;
}
- ArgPtr = Builder.CreateBitCast(ArgPtr, AdjustedArgTy->getPointerTo(AS),
- ArgPtr->getName() + ".cast");
LoadInst *Load =
Builder.CreateAlignedLoad(AdjustedArgTy, ArgPtr, AdjustedAlign);
Load->setMetadata(LLVMContext::MD_invariant_load, MDNode::get(Ctx, {}));
More information about the llvm-commits
mailing list