[llvm] [SystemZ] Simplify handling of AtomicRMW instructions. (PR #74789)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 05:18:37 PST 2023


================
@@ -872,13 +872,21 @@ bool SystemZTargetLowering::hasInlineStackProbe(const MachineFunction &MF) const
 
 TargetLowering::AtomicExpansionKind
 SystemZTargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *RMW) const {
-  // TODO: expand them all here instead of in backend.
-  return (RMW->isFloatingPointOperation() ||
-          RMW->getOperation() == AtomicRMWInst::UIncWrap ||
-          RMW->getOperation() == AtomicRMWInst::UDecWrap ||
-          RMW->getType()->isIntegerTy(128))
-             ? AtomicExpansionKind::CmpXChg
-             : AtomicExpansionKind::None;
+  // Don't expand subword operations as they require special treatment.
----------------
uweigand wrote:

I understand the AtomicExpand pass *does* have support for subword operations - not sure if this is sufficient for what we need.  In any case, that could be looked at as a follow-on.

https://github.com/llvm/llvm-project/pull/74789


More information about the llvm-commits mailing list