Skip to content

Commit b577438

Browse files
authored
[SelectionDAG] Update documentation for VECTOR_[DE]INTERLEAVE nodes. NFC (#141644)
These can now support an arbitrary factor determined by the number of operands/results. Fixes #141565
1 parent 0184873 commit b577438

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

llvm/include/llvm/CodeGen/ISDOpcodes.h

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -599,17 +599,25 @@ enum NodeType {
599599
/// vector, but not the other way around.
600600
EXTRACT_SUBVECTOR,
601601

602-
/// VECTOR_DEINTERLEAVE(VEC1, VEC2) - Returns two vectors with all input and
603-
/// output vectors having the same type. The first output contains the even
604-
/// indices from CONCAT_VECTORS(VEC1, VEC2), with the second output
605-
/// containing the odd indices. The relative order of elements within an
606-
/// output match that of the concatenated input.
602+
/// VECTOR_DEINTERLEAVE(VEC1, VEC2, ...) - Returns N vectors from N input
603+
/// vectors, where N is the factor to deinterleave. All input and output
604+
/// vectors must have the same type.
605+
///
606+
/// Each output contains the deinterleaved indices for a specific field from
607+
/// CONCAT_VECTORS(VEC1, VEC2, ...):
608+
///
609+
/// Result[I][J] = CONCAT_VECTORS(...)[I + N * J]
607610
VECTOR_DEINTERLEAVE,
608611

609-
/// VECTOR_INTERLEAVE(VEC1, VEC2) - Returns two vectors with all input and
610-
/// output vectors having the same type. The first output contains the
611-
/// result of interleaving the low half of CONCAT_VECTORS(VEC1, VEC2), with
612-
/// the second output containing the result of interleaving the high half.
612+
/// VECTOR_INTERLEAVE(VEC1, VEC2, ...) - Returns N vectors from N input
613+
/// vectors, where N is the factor to interleave. All input and
614+
/// output vectors must have the same type.
615+
///
616+
/// All input vectors are interleaved into one wide vector, which is then
617+
/// chunked into equal sized parts:
618+
///
619+
/// Interleaved[I] = VEC(I % N)[I / N]
620+
/// Result[J] = EXTRACT_SUBVECTOR(Interleaved, J * getVectorMinNumElements())
613621
VECTOR_INTERLEAVE,
614622

615623
/// VECTOR_REVERSE(VECTOR) - Returns a vector, of the same type as VECTOR,

0 commit comments

Comments
 (0)