Return the cost of a shuffle producing DstTy from SrcTy.

Synopsis

Declared in <llvm/CodeGen/BasicTTIImpl.h>

virtual
InstructionCost
getShuffleCost(
    TTI::ShuffleKind Kind,
    VectorType* DstTy,
    VectorType* SrcTy,
    TTI::TargetCostKind CostKind,
    ArrayRef<int> Mask,
    int Index,
    VectorType* SubTp,
    ArrayRef<Value const*> Args = {},
    Instruction const* CxtI = nullptr) const override;

Description

Mask may be empty when the exact mask is unknown. Index and SubTp are used by subvector insert/extract shuffle kinds. Args can improve estimates such as broadcast loads.

Return Value

The cost of a shuffle producing DstTy from SrcTy.

Parameters

Name

Description

Kind

Kind of shuffle being costed.

DstTy

Result vector type.

SrcTy

Source vector type.

CostKind

Kind of cost to compute.

Mask

Shuffle mask, or empty if unknown.

Index

Insert/extract index for subvector shuffles.

SubTp

Subvector type for insert/extract shuffles.

Args

Optional shuffle operands.

CxtI

Optional context instruction.

Created with MrDocs