llvm::createReplicatedMask

Create a mask with replicated elements.

Synopsis

Declared in <llvm/Analysis/VectorUtils.h>

llvm::SmallVector<int, 16>
createReplicatedMask(
    unsigned int ReplicationFactor,
    unsigned int VF);

Description

This function creates a shuffle mask for replicating each of the VF elements in a vector ReplicationFactor times. It can be used to transform a mask of VF elements into a mask of VF * ReplicationFactor elements used by a predicated interleaved-group of loads/stores whose Interleaved-factor == ReplicationFactor.

For example, the mask for ReplicationFactor=3 and VF=4 is:

<0,0,0,1,1,1,2,2,2,3,3,3>

Return Value

Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference sizeof(SmallVector<T, 0>).