[PATCH] D97392: [amdgpu] Atomic should be source of divergence.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 05:50:32 PST 2021
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:11854
cast<ConstantSDNode>(N->getOperand(1))->getZExtValue());
+ case ISD::ATOMIC_CMP_SWAP:
+ case ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS:
----------------
foad wrote:
> foad wrote:
> > arsenm wrote:
> > > foad wrote:
> > > > Would it make sense to handle these generic nodes in a new TargetLowering::isSDNodeSourceOfDivergence so that we don't have to maintain this list in every target that cares about divergence?
> > > We don't really have a generic definition of divergence. For CPU targets the answer would still be no
> > I was hoping CPU targets wouldn't care what we put in TargetLowering::isSDNodeSourceOfDivergence because they never consume the computed divergence information.
> Another idea to avoid maintaining this list of opcodes: could you return true for any MemSDNode that isAtomic() ?
That should work
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97392/new/
https://reviews.llvm.org/D97392
More information about the llvm-commits
mailing list