llvm::getShuffleReduction

Generates a vector reduction using shufflevectors to reduce the value. Fast-math-flags are propagated using the IRBuilder's setting.

Synopsis

Declared in <llvm/Transforms/Utils/LoopUtils.h>

Value*
getShuffleReduction(
    IRBuilderBase& Builder,
    Value* Src,
    unsigned int Op,
    TargetTransformInfo::ReductionShuffle RS,
    RecurKind MinMaxKind = RecurKind::None);

Return Value

The shuffle reduction result.

Parameters

NameDescription
BuilderIR builder used to create the shuffle reduction.
SrcVector value being reduced.
OpArithmetic opcode applied during the reduction.
RSShuffle reduction strategy from TTI.
MinMaxKindOptional min/max recurrence kind when Op is a compare.