[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:13:18 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)
----------------
rampitec wrote:
> foad wrote:
> > You look through bitcasts, so "Ptr" does not necessarily have pointer type, so you really do need this check.
> A bitcast cannot convert pointer to a non-pointer, and I am not handling ptrtoint.
OK sorry, I missed that detail.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104796/new/
https://reviews.llvm.org/D104796
More information about the llvm-commits
mailing list