[clang] [llvm] [AMDGPU] Apply alignment attr for make.buffer.rsrc (PR #166914)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 12 18:04:03 PST 2025
================
@@ -1657,6 +1769,10 @@ static bool runImpl(Module &M, AnalysisGetter &AG, TargetMachine &TM,
Ptr = RMW->getPointerOperand();
else if (auto *CmpX = dyn_cast<AtomicCmpXchgInst>(&I))
Ptr = CmpX->getPointerOperand();
+ else if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(&I))
+ if (II->getIntrinsicID() == Intrinsic::amdgcn_make_buffer_rsrc)
+ A.getOrCreateAAFor<AAAMDGPUMakeBufferRsrcAlign>(
----------------
shiltian wrote:
The creation of the AA is weird here as well. I'd expect that we want to know the alignment of a load/store instruction, and we see the pointer is a buffer pointer, then we do something. Here it looks like it is completely up side down.
https://github.com/llvm/llvm-project/pull/166914
More information about the llvm-commits
mailing list