[PATCH] D124728: Allow pointer types for atomicrmw xchg
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 18 08:56:06 PDT 2022
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:548
+ (AI->getValOperand()->getType()->isFloatingPointTy() ||
+ (Kind != TargetLoweringBase::AtomicExpansionKind::CmpXChg &&
+ AI->getValOperand()->getType()->isPointerTy()))) {
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124728/new/
https://reviews.llvm.org/D124728
More information about the llvm-commits
mailing list