llvm::ConstantFoldShuffleVectorInstruction

Attempt to constant fold a shufflevector instruction with the specified operands and mask.

Synopsis

Declared in <llvm/IR/ConstantFold.h>

Constant*
ConstantFoldShuffleVectorInstruction(
    Constant* V1,
    Constant* V2,
    ArrayRef<int> Mask);

Description

See class ShuffleVectorInst for a description of the mask representation. The constant result is returned if successful; if not, null is returned.

Return Value

The folded constant, or null if the shuffle cannot be folded.

Parameters

NameDescription
V1The first vector operand.
V2The second vector operand.
MaskThe shuffle mask.