[PATCH] D124728: Allow pointer types for atomicrmw xchg
Takafumi Arakaki via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 04:40:20 PDT 2022
tkf added inline comments.
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:548
+ (AI->getValOperand()->getType()->isFloatingPointTy() ||
+ (Kind != TargetLoweringBase::AtomicExpansionKind::CmpXChg &&
+ AI->getValOperand()->getType()->isPointerTy()))) {
----------------
efriedma wrote:
> tkf wrote:
> > efriedma wrote:
> > > Do you also want to check for AtomicExpansionKind::None here?
> > I saw the failure from LegalizeDAG in an AArch64 test that does atomicrmw xchg on floating point. It occurs with `AtomicExpansionKind::None`. This is the failure in LegalizeDAG I mentioned above. Since presumably the legalization does not support xchg of floats, we need to convert it on xchg of ints here.
> >
> > I think making this part simple requires adding supports to the legalization. But I'm not familiar with that part of LLVM.
> >
> No, I meant if we have pointer, and the expansion kind is None. I wasn't suggesting you change what we do for floating-point ops.
Thanks for the clarification. I exclude the `AtomicExpansionKind::None` case when the value operand type is a pointer.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124728/new/
https://reviews.llvm.org/D124728
More information about the llvm-commits
mailing list