class ShuffleVectorInst
Declaration
class ShuffleVectorInst : public Instruction { /* full declaration omitted */ };
Description
This instruction constructs a fixed permutation of two input vectors. For each element of the result vector, the shuffle mask selects an element from one of the input vectors to copy to the result. Non-negative elements in the mask represent an index into the concatenated pair of input vectors. UndefMaskElem (-1) specifies that the result element is undefined. For scalable vectors, all the elements of the mask must be 0 or -1. This requirement may be relaxed in the future.
Declared at: llvm/include/llvm/IR/Instructions.h:2008
Inherits from: Instruction
Member Variables
- private SmallVector<int, 4> ShuffleMask
- private llvm::Constant* ShuffleMaskForBitcode
Inherited from Value:
- protected SubclassOptionalData
- protected NumUserOperands
- protected IsUsedByMD
- protected HasName
- protected HasMetadata
- protected HasHungOffUses
- protected HasDescriptor
- public static MaxAlignmentExponent = 32
- public static MaximumAlignment = 1ULL << MaxAlignmentExponent
Method Overview
- public ShuffleVectorInst(llvm::Value * V1, llvm::Value * Mask, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefore = nullptr)
- public ShuffleVectorInst(llvm::Value * V1, llvm::Value * Mask, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
- public ShuffleVectorInst(llvm::Value * V1, ArrayRef<int> Mask, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefore = nullptr)
- public ShuffleVectorInst(llvm::Value * V1, ArrayRef<int> Mask, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
- public ShuffleVectorInst(llvm::Value * V1, llvm::Value * V2, llvm::Value * Mask, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefor = nullptr)
- public ShuffleVectorInst(llvm::Value * V1, llvm::Value * V2, llvm::Value * Mask, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
- public ShuffleVectorInst(llvm::Value * V1, llvm::Value * V2, ArrayRef<int> Mask, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefor = nullptr)
- public ShuffleVectorInst(llvm::Value * V1, llvm::Value * V2, ArrayRef<int> Mask, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
- public bool changesLength() const
- public static bool classof(const llvm::Value * V)
- public static bool classof(const llvm::Instruction * I)
- protected llvm::ShuffleVectorInst * cloneImpl() const
- public void commute()
- public static void commuteShuffleMask(MutableArrayRef<int> Mask, unsigned int InVecNumElts)
- public static llvm::Constant * convertShuffleMaskForBitcode(ArrayRef<int> Mask, llvm::Type * ResultTy)
- public int getMaskValue(unsigned int Elt) const
- public static void getShuffleMask(const llvm::Constant * Mask, SmallVectorImpl<int> & Result)
- public void getShuffleMask(SmallVectorImpl<int> & Result) const
- public ArrayRef<int> getShuffleMask() const
- public llvm::Constant * getShuffleMaskForBitcode() const
- public llvm::VectorType * getType() const
- public bool increasesLength() const
- public bool isConcat() const
- public static bool isExtractSubvectorMask(ArrayRef<int> Mask, int NumSrcElts, int & Index)
- public static bool isExtractSubvectorMask(const llvm::Constant * Mask, int NumSrcElts, int & Index)
- public bool isExtractSubvectorMask(int & Index) const
- public bool isIdentity() const
- public static bool isIdentityMask(ArrayRef<int> Mask)
- public static bool isIdentityMask(const llvm::Constant * Mask)
- public bool isIdentityWithExtract() const
- public bool isIdentityWithPadding() const
- public static bool isInsertSubvectorMask(const llvm::Constant * Mask, int NumSrcElts, int & NumSubElts, int & Index)
- public static bool isInsertSubvectorMask(ArrayRef<int> Mask, int NumSrcElts, int & NumSubElts, int & Index)
- public bool isInsertSubvectorMask(int & NumSubElts, int & Index) const
- public static bool isReplicationMask(ArrayRef<int> Mask, int & ReplicationFactor, int & VF)
- public bool isReplicationMask(int & ReplicationFactor, int & VF) const
- public static bool isReplicationMask(const llvm::Constant * Mask, int & ReplicationFactor, int & VF)
- public bool isReverse() const
- public static bool isReverseMask(const llvm::Constant * Mask)
- public static bool isReverseMask(ArrayRef<int> Mask)
- public bool isSelect() const
- public static bool isSelectMask(const llvm::Constant * Mask)
- public static bool isSelectMask(ArrayRef<int> Mask)
- public bool isSingleSource() const
- public static bool isSingleSourceMask(const llvm::Constant * Mask)
- public static bool isSingleSourceMask(ArrayRef<int> Mask)
- public bool isTranspose() const
- public static bool isTransposeMask(ArrayRef<int> Mask)
- public static bool isTransposeMask(const llvm::Constant * Mask)
- public static bool isValidOperands(const llvm::Value * V1, const llvm::Value * V2, const llvm::Value * Mask)
- public static bool isValidOperands(const llvm::Value * V1, const llvm::Value * V2, ArrayRef<int> Mask)
- public bool isZeroEltSplat() const
- public static bool isZeroEltSplatMask(const llvm::Constant * Mask)
- public static bool isZeroEltSplatMask(ArrayRef<int> Mask)
- public void setShuffleMask(ArrayRef<int> Mask)
Inherited from Instruction:
- public addAnnotationMetadata
- public andIRFlags
- public applyMergedLocation
- public classof
- public clone
- public comesBefore
- public copyFastMathFlags
- public copyFastMathFlags
- public copyIRFlags
- public copyMetadata
- public dropLocation
- public dropPoisonGeneratingFlags
- public dropUndefImplyingAttrsAndUnknownMetadata
- public dropUnknownNonDebugMetadata
- public dropUnknownNonDebugMetadata
- public dropUnknownNonDebugMetadata
- public dropUnknownNonDebugMetadata
- public eraseFromParent
- public extractProfMetadata
- public extractProfTotalWeight
- public getAAMetadata
- public getAllMetadata
- public getAllMetadataOtherThanDebugLoc
- public getDebugLoc
- public getFastMathFlags
- public getFunction
- public getFunction
- public getMetadata
- public getMetadata
- public getModule
- public getModule
- public getNextNonDebugInstruction
- public getNextNonDebugInstruction
- public getNumSuccessors
- public getOpcode
- public getOpcodeName
- public getOpcodeName
- public getParent
- public getParent
- public getPrevNonDebugInstruction
- public getPrevNonDebugInstruction
- protected getSubclassData
- public getSuccessor
- public hasAllowContract
- public hasAllowReassoc
- public hasAllowReciprocal
- public hasApproxFunc
- public hasAtomicLoad
- public hasAtomicStore
- public hasMetadata
- public hasMetadata
- public hasMetadata
- public hasMetadataOtherThanDebugLoc
- public hasNoInfs
- public hasNoNaNs
- public hasNoSignedWrap
- public hasNoSignedZeros
- public hasNoUnsignedWrap
- public hasPoisonGeneratingFlags
- public insertAfter
- public insertBefore
- public isArithmeticShift
- public isAssociative
- public isAssociative
- public isAtomic
- public isBinaryOp
- public isBinaryOp
- public isBitwiseLogicOp
- public isBitwiseLogicOp
- public isCast
- public isCast
- public isCommutative
- public isCommutative
- public isDebugOrPseudoInst
- public isEHPad
- public isExact
- public isExceptionalTerminator
- public isExceptionalTerminator
- public isFast
- public isFenceLike
- public isFuncletPad
- public isFuncletPad
- public isIdempotent
- public isIdempotent
- public isIdenticalTo
- public isIdenticalToWhenDefined
- public isIntDivRem
- public isIntDivRem
- public isLaunderOrStripInvariantGroup
- public isLifetimeStartOrEnd
- public isLogicalShift
- public isNilpotent
- public isNilpotent
- public isOnlyUserOfAnyOperand
- public isSafeToRemove
- public isSameOperationAs
- public isShift
- public isShift
- public isTerminator
- public isTerminator
- public isUnaryOp
- public isUnaryOp
- public isUsedOutsideOfBlock
- public isVolatile
- public mayHaveSideEffects
- public mayReadFromMemory
- public mayReadOrWriteMemory
- public mayThrow
- public mayWriteToMemory
- public moveAfter
- public moveBefore
- public moveBefore
- public removeFromParent
- public replaceSuccessorWith
- public setAAMetadata
- public setDebugLoc
- public setFast
- public setFastMathFlags
- public setHasAllowContract
- public setHasAllowReassoc
- public setHasAllowReciprocal
- public setHasApproxFunc
- public setHasNoInfs
- public setHasNoNaNs
- public setHasNoSignedWrap
- public setHasNoSignedZeros
- public setHasNoUnsignedWrap
- public setIsExact
- public setMetadata
- public setMetadata
- protected setSubclassData
- public setSuccessor
- public swapProfMetadata
- public updateLocationAfterHoist
- public user_back
- public user_back
- public willReturn
Inherited from User:
- protected Op
- protected Op
- protected OpFrom
- protected allocHungoffUses
- public classof
- public dropAllReferences
- public getDescriptor
- public getDescriptor
- public getNumOperands
- public getOperand
- public getOperandList
- public getOperandList
- public getOperandUse
- public getOperandUse
- protected growHungoffUses
- public isDroppable
- public op_begin
- public op_begin
- public op_end
- public op_end
- public operand_values
- public operand_values
- public operands
- public operands
- public replaceUsesOfWith
- public setGlobalVariableNumOperands
- public setNumHungOffUseOperands
- public setOperand
- public value_op_begin
- public value_op_begin
- public value_op_end
- public value_op_end
Inherited from Value:
- public DoPHITranslation
- public DoPHITranslation
- protected addMetadata
- protected addMetadata
- public addUse
- public assertModuleIsMaterialized
- public assertModuleIsMaterializedImpl
- public canBeFreed
- protected clearMetadata
- public clearSubclassOptionalData
- public deleteValue
- public dropDroppableUse
- public dropDroppableUses
- public dropDroppableUsesIn
- public dump
- protected eraseMetadata
- protected getAllMetadata
- public getContext
- protected getMetadata
- protected getMetadata
- protected getMetadata
- protected getMetadata
- public getName
- public getNameOrAsOperand
- public getNumUses
- public getPointerAlignment
- public getPointerDereferenceableBytes
- public getRawSubclassOptionalData
- public getSingleUndroppableUse
- public getSingleUndroppableUse
- protected getSubclassDataFromValue
- public getType
- public getUniqueUndroppableUser
- public getUniqueUndroppableUser
- public getValueID
- public getValueName
- protected hasMetadata
- protected hasMetadata
- protected hasMetadata
- public hasNUndroppableUses
- public hasNUndroppableUsesOrMore
- public hasNUses
- public hasNUsesOrMore
- public hasName
- public hasOneUse
- public hasOneUser
- public hasSameSubclassOptionalData
- public hasValueHandle
- public isSwiftError
- public isTransitiveUsedByMetadataOnly
- public isUsedByMetadata
- public isUsedInBasicBlock
- public materialized_use_begin
- public materialized_use_begin
- public materialized_use_empty
- public materialized_user_begin
- public materialized_user_begin
- public materialized_users
- public materialized_users
- public materialized_uses
- public materialized_uses
- public mutateType
- public print
- public print
- public printAsOperand
- public printAsOperand
- public replaceAllUsesWith
- public replaceNonMetadataUsesWith
- public replaceUsesOutsideBlock
- public replaceUsesWithIf
- public reverseUseList
- protected setMetadata
- protected setMetadata
- public setName
- public setValueName
- protected setValueSubclassData
- public sortUseList
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsOffsets
- public stripInBoundsOffsets
- public stripPointerCasts
- public stripPointerCasts
- public stripPointerCastsAndAliases
- public stripPointerCastsAndAliases
- public stripPointerCastsForAliasAnalysis
- public stripPointerCastsForAliasAnalysis
- public stripPointerCastsSameRepresentation
- public stripPointerCastsSameRepresentation
- public takeName
- public use_begin
- public use_begin
- public use_empty
- public use_end
- public use_end
- public user_back
- public user_back
- public user_begin
- public user_begin
- public user_empty
- public user_end
- public user_end
- public users
- public users
- public uses
- public uses
Methods
¶ShuffleVectorInst(
llvm::Value* V1,
llvm::Value* Mask,
const llvm::Twine& NameStr = "",
llvm::Instruction* InsertBefore = nullptr)
ShuffleVectorInst(
llvm::Value* V1,
llvm::Value* Mask,
const llvm::Twine& NameStr = "",
llvm::Instruction* InsertBefore = nullptr)
Declared at: llvm/include/llvm/IR/Instructions.h:2019
Parameters
- llvm::Value* V1
- llvm::Value* Mask
- const llvm::Twine& NameStr = ""
- llvm::Instruction* InsertBefore = nullptr
¶ShuffleVectorInst(llvm::Value* V1,
llvm::Value* Mask,
const llvm::Twine& NameStr,
llvm::BasicBlock* InsertAtEnd)
ShuffleVectorInst(llvm::Value* V1,
llvm::Value* Mask,
const llvm::Twine& NameStr,
llvm::BasicBlock* InsertAtEnd)
Declared at: llvm/include/llvm/IR/Instructions.h:2021
Parameters
- llvm::Value* V1
- llvm::Value* Mask
- const llvm::Twine& NameStr
- llvm::BasicBlock* InsertAtEnd
¶ShuffleVectorInst(
llvm::Value* V1,
ArrayRef<int> Mask,
const llvm::Twine& NameStr = "",
llvm::Instruction* InsertBefore = nullptr)
ShuffleVectorInst(
llvm::Value* V1,
ArrayRef<int> Mask,
const llvm::Twine& NameStr = "",
llvm::Instruction* InsertBefore = nullptr)
Declared at: llvm/include/llvm/IR/Instructions.h:2023
Parameters
- llvm::Value* V1
- ArrayRef<int> Mask
- const llvm::Twine& NameStr = ""
- llvm::Instruction* InsertBefore = nullptr
¶ShuffleVectorInst(llvm::Value* V1,
ArrayRef<int> Mask,
const llvm::Twine& NameStr,
llvm::BasicBlock* InsertAtEnd)
ShuffleVectorInst(llvm::Value* V1,
ArrayRef<int> Mask,
const llvm::Twine& NameStr,
llvm::BasicBlock* InsertAtEnd)
Declared at: llvm/include/llvm/IR/Instructions.h:2025
Parameters
- llvm::Value* V1
- ArrayRef<int> Mask
- const llvm::Twine& NameStr
- llvm::BasicBlock* InsertAtEnd
¶ShuffleVectorInst(
llvm::Value* V1,
llvm::Value* V2,
llvm::Value* Mask,
const llvm::Twine& NameStr = "",
llvm::Instruction* InsertBefor = nullptr)
ShuffleVectorInst(
llvm::Value* V1,
llvm::Value* V2,
llvm::Value* Mask,
const llvm::Twine& NameStr = "",
llvm::Instruction* InsertBefor = nullptr)
Declared at: llvm/include/llvm/IR/Instructions.h:2027
Parameters
- llvm::Value* V1
- llvm::Value* V2
- llvm::Value* Mask
- const llvm::Twine& NameStr = ""
- llvm::Instruction* InsertBefor = nullptr
¶ShuffleVectorInst(llvm::Value* V1,
llvm::Value* V2,
llvm::Value* Mask,
const llvm::Twine& NameStr,
llvm::BasicBlock* InsertAtEnd)
ShuffleVectorInst(llvm::Value* V1,
llvm::Value* V2,
llvm::Value* Mask,
const llvm::Twine& NameStr,
llvm::BasicBlock* InsertAtEnd)
Declared at: llvm/include/llvm/IR/Instructions.h:2030
Parameters
- llvm::Value* V1
- llvm::Value* V2
- llvm::Value* Mask
- const llvm::Twine& NameStr
- llvm::BasicBlock* InsertAtEnd
¶ShuffleVectorInst(
llvm::Value* V1,
llvm::Value* V2,
ArrayRef<int> Mask,
const llvm::Twine& NameStr = "",
llvm::Instruction* InsertBefor = nullptr)
ShuffleVectorInst(
llvm::Value* V1,
llvm::Value* V2,
ArrayRef<int> Mask,
const llvm::Twine& NameStr = "",
llvm::Instruction* InsertBefor = nullptr)
Declared at: llvm/include/llvm/IR/Instructions.h:2032
Parameters
- llvm::Value* V1
- llvm::Value* V2
- ArrayRef<int> Mask
- const llvm::Twine& NameStr = ""
- llvm::Instruction* InsertBefor = nullptr
¶ShuffleVectorInst(llvm::Value* V1,
llvm::Value* V2,
ArrayRef<int> Mask,
const llvm::Twine& NameStr,
llvm::BasicBlock* InsertAtEnd)
ShuffleVectorInst(llvm::Value* V1,
llvm::Value* V2,
ArrayRef<int> Mask,
const llvm::Twine& NameStr,
llvm::BasicBlock* InsertAtEnd)
Declared at: llvm/include/llvm/IR/Instructions.h:2035
Parameters
- llvm::Value* V1
- llvm::Value* V2
- ArrayRef<int> Mask
- const llvm::Twine& NameStr
- llvm::BasicBlock* InsertAtEnd
¶bool changesLength() const
bool changesLength() const
Description
Return true if this shuffle returns a vector with a different number of elements than its source vectors. Examples: shufflevector < 4 x n> A, < 4 x n> B, < 1,2,3> shufflevector < 4 x n> A, < 4 x n> B, < 1,2,3,4,5>
Declared at: llvm/include/llvm/IR/Instructions.h:2093
¶static bool classof(const llvm::Value* V)
static bool classof(const llvm::Value* V)
Declared at: llvm/include/llvm/IR/Instructions.h:2393
Parameters
- const llvm::Value* V
¶static bool classof(const llvm::Instruction* I)
static bool classof(const llvm::Instruction* I)
Declared at: llvm/include/llvm/IR/Instructions.h:2390
Parameters
- const llvm::Instruction* I
¶llvm::ShuffleVectorInst* cloneImpl() const
llvm::ShuffleVectorInst* cloneImpl() const
Declared at: llvm/include/llvm/IR/Instructions.h:2016
¶void commute()
void commute()
Description
Swap the operands and adjust the mask to preserve the semantics of the instruction.
Declared at: llvm/include/llvm/IR/Instructions.h:2043
¶static void commuteShuffleMask(
MutableArrayRef<int> Mask,
unsigned int InVecNumElts)
static void commuteShuffleMask(
MutableArrayRef<int> Mask,
unsigned int InVecNumElts)
Description
Change values in a shuffle permute mask assuming the two vector operands of length InVecNumElts have swapped position.
Declared at: llvm/include/llvm/IR/Instructions.h:2378
Parameters
- MutableArrayRef<int> Mask
- unsigned int InVecNumElts
¶static llvm::Constant*
convertShuffleMaskForBitcode(ArrayRef<int> Mask,
llvm::Type* ResultTy)
static llvm::Constant*
convertShuffleMaskForBitcode(ArrayRef<int> Mask,
llvm::Type* ResultTy)
Declared at: llvm/include/llvm/IR/Instructions.h:2082
Parameters
- ArrayRef<int> Mask
- llvm::Type* ResultTy
¶int getMaskValue(unsigned int Elt) const
int getMaskValue(unsigned int Elt) const
Description
Return the shuffle mask value of this instruction for the given element index. Return UndefMaskElem if the element is undef.
Declared at: llvm/include/llvm/IR/Instructions.h:2063
Parameters
- unsigned int Elt
¶static void getShuffleMask(
const llvm::Constant* Mask,
SmallVectorImpl<int>& Result)
static void getShuffleMask(
const llvm::Constant* Mask,
SmallVectorImpl<int>& Result)
Description
Convert the input shuffle mask operand to a vector of integers. Undefined elements of the mask are returned as UndefMaskElem.
Declared at: llvm/include/llvm/IR/Instructions.h:2067
Parameters
- const llvm::Constant* Mask
- SmallVectorImpl<int>& Result
¶void getShuffleMask(
SmallVectorImpl<int>& Result) const
void getShuffleMask(
SmallVectorImpl<int>& Result) const
Description
Return the mask for this instruction as a vector of integers. Undefined elements of the mask are returned as UndefMaskElem.
Declared at: llvm/include/llvm/IR/Instructions.h:2072
Parameters
- SmallVectorImpl<int>& Result
¶ArrayRef<int> getShuffleMask() const
ArrayRef<int> getShuffleMask() const
Declared at: llvm/include/llvm/IR/Instructions.h:2087
¶llvm::Constant* getShuffleMaskForBitcode() const
llvm::Constant* getShuffleMaskForBitcode() const
Description
Return the mask for this instruction, for use in bitcode. TODO: This is temporary until we decide a new bitcode encoding for shufflevector.
Declared at: llvm/include/llvm/IR/Instructions.h:2080
¶llvm::VectorType* getType() const
llvm::VectorType* getType() const
Description
Overload to return most specific vector type.
Declared at: llvm/include/llvm/IR/Instructions.h:2054
¶bool increasesLength() const
bool increasesLength() const
Description
Return true if this shuffle returns a vector with a greater number of elements than its source vectors. Example: shufflevector < 2 x n> A, < 2 x n> B, < 1,2,3>
Declared at: llvm/include/llvm/IR/Instructions.h:2104
¶bool isConcat() const
bool isConcat() const
Description
Return true if this shuffle concatenates its 2 source vectors. This returns false if either input is undefined. In that case, the shuffle is is better classified as an identity with padding operation.
Declared at: llvm/include/llvm/IR/Instructions.h:2175
¶static bool isExtractSubvectorMask(
ArrayRef<int> Mask,
int NumSrcElts,
int& Index)
static bool isExtractSubvectorMask(
ArrayRef<int> Mask,
int NumSrcElts,
int& Index)
Description
Return true if this shuffle mask is an extract subvector mask. A valid extract subvector mask returns a smaller vector from a single source operand. The base extraction index is returned as well.
Declared at: llvm/include/llvm/IR/Instructions.h:2299
Parameters
- ArrayRef<int> Mask
- int NumSrcElts
- int& Index
¶static bool isExtractSubvectorMask(
const llvm::Constant* Mask,
int NumSrcElts,
int& Index)
static bool isExtractSubvectorMask(
const llvm::Constant* Mask,
int NumSrcElts,
int& Index)
Declared at: llvm/include/llvm/IR/Instructions.h:2301
Parameters
- const llvm::Constant* Mask
- int NumSrcElts
- int& Index
¶bool isExtractSubvectorMask(int& Index) const
bool isExtractSubvectorMask(int& Index) const
Description
Return true if this shuffle mask is an extract subvector mask.
Declared at: llvm/include/llvm/IR/Instructions.h:2314
Parameters
- int& Index
¶bool isIdentity() const
bool isIdentity() const
Description
Return true if this shuffle chooses elements from exactly one source vector without lane crossings and does not change the number of elements from its input vectors. Example: shufflevector < 4 x n> A, < 4 x n> B, < 4,undef,6,undef>
Declared at: llvm/include/llvm/IR/Instructions.h:2155
¶static bool isIdentityMask(ArrayRef<int> Mask)
static bool isIdentityMask(ArrayRef<int> Mask)
Description
Return true if this shuffle mask chooses elements from exactly one source vector without lane crossings. A shuffle using this mask is not necessarily a no-op because it may change the number of elements from its input vectors or it may provide demanded bits knowledge via undef lanes. Example: <undef ,undef,2,3>
Declared at: llvm/include/llvm/IR/Instructions.h:2137
Parameters
- ArrayRef<int> Mask
¶static bool isIdentityMask(
const llvm::Constant* Mask)
static bool isIdentityMask(
const llvm::Constant* Mask)
Declared at: llvm/include/llvm/IR/Instructions.h:2138
Parameters
- const llvm::Constant* Mask
¶bool isIdentityWithExtract() const
bool isIdentityWithExtract() const
Description
Return true if this shuffle extracts the first N elements of exactly one source vector.
Declared at: llvm/include/llvm/IR/Instructions.h:2170
¶bool isIdentityWithPadding() const
bool isIdentityWithPadding() const
Description
Return true if this shuffle lengthens exactly one source vector with undefs in the high elements.
Declared at: llvm/include/llvm/IR/Instructions.h:2166
¶static bool isInsertSubvectorMask(
const llvm::Constant* Mask,
int NumSrcElts,
int& NumSubElts,
int& Index)
static bool isInsertSubvectorMask(
const llvm::Constant* Mask,
int NumSrcElts,
int& NumSubElts,
int& Index)
Declared at: llvm/include/llvm/IR/Instructions.h:2331
Parameters
- const llvm::Constant* Mask
- int NumSrcElts
- int& NumSubElts
- int& Index
¶static bool isInsertSubvectorMask(
ArrayRef<int> Mask,
int NumSrcElts,
int& NumSubElts,
int& Index)
static bool isInsertSubvectorMask(
ArrayRef<int> Mask,
int NumSrcElts,
int& NumSubElts,
int& Index)
Description
Return true if this shuffle mask is an insert subvector mask. A valid insert subvector mask inserts the lowest elements of a second source operand into an in-place first source operand operand. Both the sub vector width and the insertion index is returned.
Declared at: llvm/include/llvm/IR/Instructions.h:2329
Parameters
- ArrayRef<int> Mask
- int NumSrcElts
- int& NumSubElts
- int& Index
¶bool isInsertSubvectorMask(int& NumSubElts,
int& Index) const
bool isInsertSubvectorMask(int& NumSubElts,
int& Index) const
Description
Return true if this shuffle mask is an insert subvector mask.
Declared at: llvm/include/llvm/IR/Instructions.h:2344
Parameters
- int& NumSubElts
- int& Index
¶static bool isReplicationMask(
ArrayRef<int> Mask,
int& ReplicationFactor,
int& VF)
static bool isReplicationMask(
ArrayRef<int> Mask,
int& ReplicationFactor,
int& VF)
Description
Return true if this shuffle mask replicates each of the \p VF elements in a vector \p ReplicationFactor times. For example, the mask for \p ReplicationFactor=3 and \p VF=4 is: < 0,0,0,1,1,1,2,2,2,3,3,3>
Declared at: llvm/include/llvm/IR/Instructions.h:2359
Parameters
- ArrayRef<int> Mask
- int& ReplicationFactor
- int& VF
¶bool isReplicationMask(int& ReplicationFactor,
int& VF) const
bool isReplicationMask(int& ReplicationFactor,
int& VF) const
Description
Return true if this shuffle mask is a replication mask.
Declared at: llvm/include/llvm/IR/Instructions.h:2374
Parameters
- int& ReplicationFactor
- int& VF
¶static bool isReplicationMask(
const llvm::Constant* Mask,
int& ReplicationFactor,
int& VF)
static bool isReplicationMask(
const llvm::Constant* Mask,
int& ReplicationFactor,
int& VF)
Declared at: llvm/include/llvm/IR/Instructions.h:2361
Parameters
- const llvm::Constant* Mask
- int& ReplicationFactor
- int& VF
¶bool isReverse() const
bool isReverse() const
Description
Return true if this shuffle swaps the order of elements from exactly one source vector. Example: shufflevector < 4 x n> A, < 4 x n> B, < 3,undef,1,undef> TODO: Optionally allow length-changing shuffles.
Declared at: llvm/include/llvm/IR/Instructions.h:2221
¶static bool isReverseMask(
const llvm::Constant* Mask)
static bool isReverseMask(
const llvm::Constant* Mask)
Declared at: llvm/include/llvm/IR/Instructions.h:2210
Parameters
- const llvm::Constant* Mask
¶static bool isReverseMask(ArrayRef<int> Mask)
static bool isReverseMask(ArrayRef<int> Mask)
Description
Return true if this shuffle mask swaps the order of elements from exactly one source vector. Example: < 7,6,undef,4> This assumes that vector operands are the same length as the mask.
Declared at: llvm/include/llvm/IR/Instructions.h:2209
Parameters
- ArrayRef<int> Mask
¶bool isSelect() const
bool isSelect() const
Description
Return true if this shuffle chooses elements from its source vectors without lane crossings and all operands have the same number of elements. In other words, this shuffle is equivalent to a vector select with a constant condition operand. Example: shufflevector < 4 x n> A, < 4 x n> B, <undef ,1,6,3> This returns false if the mask does not choose from both input vectors. In that case, the shuffle is better classified as an identity shuffle. TODO: Optionally allow length-changing shuffles.
Declared at: llvm/include/llvm/IR/Instructions.h:2201
¶static bool isSelectMask(
const llvm::Constant* Mask)
static bool isSelectMask(
const llvm::Constant* Mask)
Declared at: llvm/include/llvm/IR/Instructions.h:2186
Parameters
- const llvm::Constant* Mask
¶static bool isSelectMask(ArrayRef<int> Mask)
static bool isSelectMask(ArrayRef<int> Mask)
Description
Return true if this shuffle mask chooses elements from its source vectors without lane crossings. A shuffle using this mask would be equivalent to a vector select with a constant condition operand. Example: < 4,1,6,undef> This returns false if the mask does not choose from both input vectors. In that case, the shuffle is better classified as an identity shuffle. This assumes that vector operands are the same length as the mask (a length-changing shuffle can never be equivalent to a vector select).
Declared at: llvm/include/llvm/IR/Instructions.h:2185
Parameters
- ArrayRef<int> Mask
¶bool isSingleSource() const
bool isSingleSource() const
Description
Return true if this shuffle chooses elements from exactly one source vector without changing the length of that vector. Example: shufflevector < 4 x n> A, < 4 x n> B, < 3,0,undef,3> TODO: Optionally allow length-changing shuffles.
Declared at: llvm/include/llvm/IR/Instructions.h:2128
¶static bool isSingleSourceMask(
const llvm::Constant* Mask)
static bool isSingleSourceMask(
const llvm::Constant* Mask)
Declared at: llvm/include/llvm/IR/Instructions.h:2117
Parameters
- const llvm::Constant* Mask
¶static bool isSingleSourceMask(ArrayRef<int> Mask)
static bool isSingleSourceMask(ArrayRef<int> Mask)
Description
Return true if this shuffle mask chooses elements from exactly one source vector. Example: < 7,5,undef,7> This assumes that vector operands are the same length as the mask.
Declared at: llvm/include/llvm/IR/Instructions.h:2116
Parameters
- ArrayRef<int> Mask
¶bool isTranspose() const
bool isTranspose() const
Description
Return true if this shuffle transposes the elements of its inputs without changing the length of the vectors. This operation may also be known as a merge or interleave. See the description for isTransposeMask() for the exact specification. Example: shufflevector < 4 x n> A, < 4 x n> B, < 0,4,2,6>
Declared at: llvm/include/llvm/IR/Instructions.h:2292
¶static bool isTransposeMask(ArrayRef<int> Mask)
static bool isTransposeMask(ArrayRef<int> Mask)
Description
Return true if this shuffle mask is a transpose mask. Transpose vector masks transpose a 2xn matrix. They read corresponding even- or odd-numbered vector elements from two n-dimensional source vectors and write each result into consecutive elements of an n-dimensional destination vector. Two shuffles are necessary to complete the transpose, one for the even elements and another for the odd elements. This description closely follows how the TRN1 and TRN2 AArch64 instructions operate. For example, a simple 2x2 matrix can be transposed with: ; Original matrix m0 = < a, b > m1 = < c, d > ; Transposed matrix t0 = < a, c > = shufflevector m0, m1, < 0, 2 > t1 = < b, d > = shufflevector m0, m1, < 1, 3 > For matrices having greater than n columns, the resulting nx2 transposed matrix is stored in two result vectors such that one vector contains interleaved elements from all the even-numbered rows and the other vector contains interleaved elements from all the odd-numbered rows. For example, a 2x4 matrix can be transposed with: ; Original matrix m0 = < a, b, c, d > m1 = < e, f, g, h > ; Transposed matrix t0 = < a, e, c, g > = shufflevector m0, m1 < 0, 4, 2, 6 > t1 = < b, f, d, h > = shufflevector m0, m1 < 1, 5, 3, 7 >
Declared at: llvm/include/llvm/IR/Instructions.h:2279
Parameters
- ArrayRef<int> Mask
¶static bool isTransposeMask(
const llvm::Constant* Mask)
static bool isTransposeMask(
const llvm::Constant* Mask)
Declared at: llvm/include/llvm/IR/Instructions.h:2280
Parameters
- const llvm::Constant* Mask
¶static bool isValidOperands(
const llvm::Value* V1,
const llvm::Value* V2,
const llvm::Value* Mask)
static bool isValidOperands(
const llvm::Value* V1,
const llvm::Value* V2,
const llvm::Value* Mask)
Description
Return true if a shufflevector instruction can be formed with the specified operands.
Declared at: llvm/include/llvm/IR/Instructions.h:2047
Parameters
- const llvm::Value* V1
- const llvm::Value* V2
- const llvm::Value* Mask
¶static bool isValidOperands(const llvm::Value* V1,
const llvm::Value* V2,
ArrayRef<int> Mask)
static bool isValidOperands(const llvm::Value* V1,
const llvm::Value* V2,
ArrayRef<int> Mask)
Declared at: llvm/include/llvm/IR/Instructions.h:2049
Parameters
- const llvm::Value* V1
- const llvm::Value* V2
- ArrayRef<int> Mask
¶bool isZeroEltSplat() const
bool isZeroEltSplat() const
Description
Return true if all elements of this shuffle are the same value as the first element of exactly one source vector without changing the length of that vector. Example: shufflevector < 4 x n> A, < 4 x n> B, <undef ,0,undef,0> TODO: Optionally allow length-changing shuffles. TODO: Optionally allow splats from other elements.
Declared at: llvm/include/llvm/IR/Instructions.h:2243
¶static bool isZeroEltSplatMask(
const llvm::Constant* Mask)
static bool isZeroEltSplatMask(
const llvm::Constant* Mask)
Declared at: llvm/include/llvm/IR/Instructions.h:2230
Parameters
- const llvm::Constant* Mask
¶static bool isZeroEltSplatMask(ArrayRef<int> Mask)
static bool isZeroEltSplatMask(ArrayRef<int> Mask)
Description
Return true if this shuffle mask chooses all elements with the same value as the first element of exactly one source vector. Example: < 4,undef,undef,4> This assumes that vector operands are the same length as the mask.
Declared at: llvm/include/llvm/IR/Instructions.h:2229
Parameters
- ArrayRef<int> Mask
¶void setShuffleMask(ArrayRef<int> Mask)
void setShuffleMask(ArrayRef<int> Mask)
Declared at: llvm/include/llvm/IR/Instructions.h:2085
Parameters
- ArrayRef<int> Mask