[PATCH] D104796: [AMDGPU] Check for pointer operand while refining LDS align
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 23 11:05:29 PDT 2021
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:352-353
if (auto *AI = dyn_cast<AtomicRMWInst>(U)) {
- AI->setAlignment(std::max(A, AI->getAlign()));
+ // None of atomicrmw operations can work on pointers, but let's
+ // check it anyway in case it will or we will process ConstantExpr.
+ if (AI->getPointerOperand() == Ptr)
----------------
You look through bitcasts, so "Ptr" does not necessarily have pointer type, so you really do need this check.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104796/new/
https://reviews.llvm.org/D104796
More information about the llvm-commits
mailing list