[llvm] [SelectionDAG] Update documentation for VECTOR_[DE]INTERLEAVE nodes. NFC (PR #141644)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 10:55:09 PDT 2025
https://github.com/lukel97 created https://github.com/llvm/llvm-project/pull/141644
These can now support an arbitrary factor determined by the number of operands/results. Fixes #141565
>From dfc78746cc58b60f7472435ed578994501d7b570 Mon Sep 17 00:00:00 2001
From: Luke Lau <luke at igalia.com>
Date: Tue, 27 May 2025 18:53:33 +0100
Subject: [PATCH] [SelectionDAG] Update documentation for VECTOR_[DE]INTERLEAVE
nodes. NFC
These can now support an arbitrary factor determined by the number of operands/results. Fixes #141565
---
llvm/include/llvm/CodeGen/ISDOpcodes.h | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/llvm/include/llvm/CodeGen/ISDOpcodes.h b/llvm/include/llvm/CodeGen/ISDOpcodes.h
index 9f66402e4c820..b5752e21048d7 100644
--- a/llvm/include/llvm/CodeGen/ISDOpcodes.h
+++ b/llvm/include/llvm/CodeGen/ISDOpcodes.h
@@ -599,17 +599,25 @@ enum NodeType {
/// vector, but not the other way around.
EXTRACT_SUBVECTOR,
- /// VECTOR_DEINTERLEAVE(VEC1, VEC2) - Returns two vectors with all input and
- /// output vectors having the same type. The first output contains the even
- /// indices from CONCAT_VECTORS(VEC1, VEC2), with the second output
- /// containing the odd indices. The relative order of elements within an
- /// output match that of the concatenated input.
+ /// VECTOR_DEINTERLEAVE(VEC1, VEC2, ...) - Returns N vectors from N input
+ /// vectors, where N is the factor to deinterleave. All input and output
+ /// vectors must have the same type.
+ ///
+ /// Each output contains the deinterleaved indices for a specific field from
+ /// CONCAT_VECTORS(VEC1, VEC2, ...):
+ ///
+ /// Result[I][J] = CONCAT_VECTORS(...)[I + N * J]
VECTOR_DEINTERLEAVE,
- /// VECTOR_INTERLEAVE(VEC1, VEC2) - Returns two vectors with all input and
- /// output vectors having the same type. The first output contains the
- /// result of interleaving the low half of CONCAT_VECTORS(VEC1, VEC2), with
- /// the second output containing the result of interleaving the high half.
+ /// VECTOR_INTERLEAVE(VEC1, VEC2, ...) - Returns N vectors from N input
+ /// vectors, where N is the factor to interleave. All input and
+ /// output vectors must have the same type.
+ ///
+ /// All input vectors are interleaved into one wide vector, which is then
+ /// chunked into equal sized parts:
+ ///
+ /// Interleaved[I] = VEC(I % N)[I / N]
+ /// Result[J] = EXTRACT_SUBVECTOR(Interleaved, J * getVectorMinNumElements())
VECTOR_INTERLEAVE,
/// VECTOR_REVERSE(VECTOR) - Returns a vector, of the same type as VECTOR,
More information about the llvm-commits
mailing list