llvm::TargetLoweringBase::emitMaskedAtomicRMWIntrinsic

Expand a masked atomicrmw into a target-specific ll/sc intrinsic.

Synopsis

Declared in <llvm/CodeGen/TargetLowering.h>

virtual
Value*
emitMaskedAtomicRMWIntrinsic(
    IRBuilderBase& Builder,
    AtomicRMWInst* AI,
    Value* AlignedAddr,
    Value* Incr,
    Value* Mask,
    Value* ShiftAmt,
    AtomicOrdering Ord) const;

Description

Perform a masked atomicrmw using a target-specific intrinsic. This represents the core LL/SC loop which will be lowered at a late stage by the backend. The target-specific intrinsic returns the loaded value and is not responsible for masking and shifting the result.

Return Value

A pointer to the requested object, or null if unavailable.

Parameters

NameDescription
BuilderIR builder used to emit the intrinsic.
AIAtomic RMW instruction being expanded.
AlignedAddrAligned address of the atomic memory location.
IncrIncrement or operand value for the RMW operation.
MaskBitmask selecting the relevant bits of the atomic value.
ShiftAmtShift amount used to position the masked bits.
OrdAtomic ordering.