[PATCH] D124728: Allow pointer types for atomicrmw xchg
Takafumi Arakaki via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 18 05:53:34 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:
> 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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124728/new/
https://reviews.llvm.org/D124728
More information about the llvm-commits
mailing list