[PATCH] D104316: [AMDGPU] Propagate LDS align into to instructions
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 23 01:31:45 PDT 2021
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:340
+ return;
+
+ for (User *U : Ptr->users()) {
----------------
Could early-out here if Align==1 to save a lot of unnecessary work.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:346
+ }
+ if (auto *SI = dyn_cast<StoreInst>(U)) {
+ SI->setAlignment(std::max(A, SI->getAlign()));
----------------
foad wrote:
> For StoreInst, AtomicRMWInst, AtomicCmpXchgInst and GetElementPtrInst you need to check that the use is actually the "address" operand of the instruction.
Oh, I see you are already checking it for GetElementPtrInst.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104316/new/
https://reviews.llvm.org/D104316
More information about the llvm-commits
mailing list