Skip to content

Commit 5a073f1

Browse files
authored
[doc][IR] Add documentation for llvm.vector.(de)interleave3/5/7 (llvm#133519)
I put the documentation of all factors into the same (de)interleave entries because I really don't see a reason to separate them in an already long LangRef page.
1 parent 77913b5 commit 5a073f1

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

llvm/docs/LangRef.rst

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20080,7 +20080,7 @@ Arguments:
2008020080

2008120081
The argument to this intrinsic must be a vector.
2008220082

20083-
'``llvm.vector.deinterleave2``' Intrinsic
20083+
'``llvm.vector.deinterleave2/3/5/7``' Intrinsic
2008420084
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2008520085

2008620086
Syntax:
@@ -20091,31 +20091,37 @@ This is an overloaded intrinsic.
2009120091

2009220092
declare {<2 x double>, <2 x double>} @llvm.vector.deinterleave2.v4f64(<4 x double> %vec1)
2009320093
declare {<vscale x 4 x i32>, <vscale x 4 x i32>} @llvm.vector.deinterleave2.nxv8i32(<vscale x 8 x i32> %vec1)
20094+
declare {<vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i8>} @llvm.vector.deinterleave3.nxv6i8(<vscale x 6 x i8> %vec1)
20095+
declare {<2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>} @llvm.vector.deinterleave5.v10i32(<10 x i32> %vec1)
20096+
declare {<2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>} @llvm.vector.deinterleave7.v14i32(<14 x i32> %vec1)
2009420097

2009520098
Overview:
2009620099
"""""""""
2009720100

20098-
The '``llvm.vector.deinterleave2``' intrinsic constructs two
20099-
vectors by deinterleaving the even and odd lanes of the input vector.
20101+
The '``llvm.vector.deinterleave2/3/5/7``' intrinsics deinterleave adjacent lanes
20102+
into 2, 3, 5, and 7 separate vectors, respectively, and return them as the
20103+
result.
2010020104

2010120105
This intrinsic works for both fixed and scalable vectors. While this intrinsic
2010220106
supports all vector types the recommended way to express this operation for
20103-
fixed-width vectors is still to use a shufflevector, as that may allow for more
20104-
optimization opportunities.
20107+
factor of 2 on fixed-width vectors is still to use a shufflevector, as that
20108+
may allow for more optimization opportunities.
2010520109

2010620110
For example:
2010720111

2010820112
.. code-block:: text
2010920113

2011020114
{<2 x i64>, <2 x i64>} llvm.vector.deinterleave2.v4i64(<4 x i64> <i64 0, i64 1, i64 2, i64 3>); ==> {<2 x i64> <i64 0, i64 2>, <2 x i64> <i64 1, i64 3>}
20115+
{<2 x i32>, <2 x i32>, <2 x i32>} llvm.vector.deinterleave3.v6i32(<6 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5>)
20116+
; ==> {<2 x i32> <i32 0, i32 3>, <2 x i32> <i32 1, i32 4>, <2 x i32> <i32 2, i32 5>}
2011120117

2011220118
Arguments:
2011320119
""""""""""
2011420120

2011520121
The argument is a vector whose type corresponds to the logical concatenation of
20116-
the two result types.
20122+
the aggregated result types.
2011720123

20118-
'``llvm.vector.interleave2``' Intrinsic
20124+
'``llvm.vector.interleave2/3/5/7``' Intrinsic
2011920125
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2012020126

2012120127
Syntax:
@@ -20126,27 +20132,32 @@ This is an overloaded intrinsic.
2012620132

2012720133
declare <4 x double> @llvm.vector.interleave2.v4f64(<2 x double> %vec1, <2 x double> %vec2)
2012820134
declare <vscale x 8 x i32> @llvm.vector.interleave2.nxv8i32(<vscale x 4 x i32> %vec1, <vscale x 4 x i32> %vec2)
20135+
declare <vscale x 6 x i8> @llvm.vector.interleave3.nxv6i8(<vscale x 2 x i8> %vec0, <vscale x 2 x i8> %vec1, <vscale x 2 x i8> %vec2)
20136+
declare <10 x i32> @llvm.vector.interleave5.v10i32(<2 x i32> %vec0, <2 x i32> %vec1, <2 x i32> %vec2, <2 x i32> %vec3, <2 x i32> %vec4)
20137+
declare <14 x i32> @llvm.vector.interleave7.v14i32(<2 x i32> %vec0, <2 x i32> %vec1, <2 x i32> %vec2, <2 x i32> %vec3, <2 x i32> %vec4, <2 x i32> %vec5, <2 x i32> %vec6)
2012920138

2013020139
Overview:
2013120140
"""""""""
2013220141

20133-
The '``llvm.vector.interleave2``' intrinsic constructs a vector
20134-
by interleaving two input vectors.
20142+
The '``llvm.vector.interleave2/3/5/7``' intrinsic constructs a vector
20143+
by interleaving all the input vectors.
2013520144

2013620145
This intrinsic works for both fixed and scalable vectors. While this intrinsic
2013720146
supports all vector types the recommended way to express this operation for
20138-
fixed-width vectors is still to use a shufflevector, as that may allow for more
20139-
optimization opportunities.
20147+
factor of 2 on fixed-width vectors is still to use a shufflevector, as that
20148+
may allow for more optimization opportunities.
2014020149

2014120150
For example:
2014220151

2014320152
.. code-block:: text
2014420153

2014520154
<4 x i64> llvm.vector.interleave2.v4i64(<2 x i64> <i64 0, i64 2>, <2 x i64> <i64 1, i64 3>); ==> <4 x i64> <i64 0, i64 1, i64 2, i64 3>
20155+
<6 x i32> llvm.vector.interleave3.v6i32(<2 x i32> <i32 0, i32 3>, <2 x i32> <i32 1, i32 4>, <2 x i32> <i32 2, i32 5>)
20156+
; ==> <6 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5>
2014620157

2014720158
Arguments:
2014820159
""""""""""
20149-
Both arguments must be vectors of the same type whereby their logical
20160+
All arguments must be vectors of the same type whereby their logical
2015020161
concatenation matches the result type.
2015120162

2015220163
'``llvm.experimental.cttz.elts``' Intrinsic

0 commit comments

Comments
 (0)