Return the cost of an extended reduction pattern.

Synopsis

Declared in <llvm/Analysis/TargetTransformInfo.h>

InstructionCost
getExtendedReductionCost(
    unsigned int Opcode,
    bool IsUnsigned,
    Type* ResTy,
    VectorType* Ty,
    std::optional<FastMathFlags> FMF,
    TTI::TargetCostKind CostKind) const;

Description

Similar to getArithmeticReductionCost of a reduction with an extension. This is the cost of as: ResTy vecreduce.opcode(ext(Ty A)).

Return Value

The cost of an extended reduction pattern.

Parameters

Name

Description

Opcode

Reduction opcode.

IsUnsigned

True if the extension is unsigned.

ResTy

Result type of the reduction.

Ty

Vector type being extended and reduced.

FMF

Fast‐math flags for the reduction.

CostKind

Kind of cost model to apply.

Created with MrDocs