summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2008-11-10 04:46:22 +0000
committerMon P Wang <wangmp@apple.com>2008-11-10 04:46:22 +0000
commitaeb06d246254e4829a49164a11eacced9a43d9d4 (patch)
tree4b957844db686ae68329005faa6762317429037f /docs
parenta64f463fb90c66406033e3fd1dc912b648bad328 (diff)
downloadllvm-aeb06d246254e4829a49164a11eacced9a43d9d4.tar.gz
llvm-aeb06d246254e4829a49164a11eacced9a43d9d4.tar.bz2
llvm-aeb06d246254e4829a49164a11eacced9a43d9d4.tar.xz
Added support for the following definition of shufflevector
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58964 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.html20
1 files changed, 13 insertions, 7 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index f8ca2879c4..f1869c31d9 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -2932,23 +2932,25 @@ exceeds the length of <tt>val</tt>, the results are undefined.
<h5>Syntax:</h5>
<pre>
- &lt;result&gt; = shufflevector &lt;n x &lt;ty&gt;&gt; &lt;v1&gt;, &lt;n x &lt;ty&gt;&gt; &lt;v2&gt;, &lt;n x i32&gt; &lt;mask&gt; <i>; yields &lt;n x &lt;ty&gt;&gt;</i>
+ &lt;result&gt; = shufflevector &lt;n x &lt;ty&gt;&gt; &lt;v1&gt;, &lt;n x &lt;ty&gt;&gt; &lt;v2&gt;, &lt;m x i32&gt; &lt;mask&gt; <i>; yields &lt;m x &lt;ty&gt;&gt;</i>
</pre>
<h5>Overview:</h5>
<p>
The '<tt>shufflevector</tt>' instruction constructs a permutation of elements
-from two input vectors, returning a vector of the same type.
+from two input vectors, returning a vector with the same element type as
+the input and length that is the same as the shuffle mask.
</p>
<h5>Arguments:</h5>
<p>
-The first two operands of a '<tt>shufflevector</tt>' instruction are vectors
-with types that match each other and types that match the result of the
-instruction. The third argument is a shuffle mask, which has the same number
-of elements as the other vector type, but whose element type is always 'i32'.
+The first two operands of a '<tt>shufflevector</tt>' instruction are vectors
+with types that match each other. The third argument is a shuffle mask whose
+element type is always 'i32'. The result of the instruction is a vector whose
+length is the same as the shuffle mask and whose element type is the same as
+the element type of the first two operands.
</p>
<p>
@@ -2961,7 +2963,7 @@ constant integer or undef values.
<p>
The elements of the two input vectors are numbered from left to right across
both of the vectors. The shuffle mask operand specifies, for each element of
-the result vector, which element of the two input registers the result element
+the result vector, which element of the two input vectors the result element
gets. The element selector may be undef (meaning "don't care") and the second
operand may be undef if performing a shuffle from only one vector.
</p>
@@ -2973,6 +2975,10 @@ operand may be undef if performing a shuffle from only one vector.
&lt;4 x i32&gt; &lt;i32 0, i32 4, i32 1, i32 5&gt; <i>; yields &lt;4 x i32&gt;</i>
%result = shufflevector &lt;4 x i32&gt; %v1, &lt;4 x i32&gt; undef,
&lt;4 x i32&gt; &lt;i32 0, i32 1, i32 2, i32 3&gt; <i>; yields &lt;4 x i32&gt;</i> - Identity shuffle.
+ %result = shufflevector &lt;8 x i32&gt; %v1, &lt;8 x i32&gt; undef,
+ &lt;4 x i32&gt; &lt;i32 0, i32 1, i32 2, i32 3&gt; <i>; yields &lt;4 x i32&gt;</i>
+ %result = shufflevector &lt;4 x i32&gt; %v1, &lt;4 x i32&gt; %v2,
+ &lt;8 x i32&gt; &lt;i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7 &gt; <i>; yields &lt;8 x i32&gt;</i>
</pre>
</div>