[llvm-commits] CVS: llvm/docs/LangRef.html

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 7 17:13:54 PDT 2006



Changes in directory llvm/docs:

LangRef.html updated: 1.143 -> 1.144
---
Log message:

Description for the new shufflevector instruction I'm adding.


---
Diffs of the changes:  (+60 -1)

 LangRef.html |   61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 60 insertions(+), 1 deletion(-)


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.143 llvm/docs/LangRef.html:1.144
--- llvm/docs/LangRef.html:1.143	Fri Mar 24 01:16:10 2006
+++ llvm/docs/LangRef.html	Fri Apr  7 19:13:41 2006
@@ -111,6 +111,7 @@
           <li><a href="#i_vselect">'<tt>vselect</tt>' Instruction</a></li>
           <li><a href="#i_extractelement">'<tt>extractelement</tt>' Instruction</a></li>
           <li><a href="#i_insertelement">'<tt>insertelement</tt>' Instruction</a></li>
+          <li><a href="#i_shufflevector">'<tt>shufflevector</tt>' Instruction</a></li>
           <li><a href="#i_call">'<tt>call</tt>'  Instruction</a></li>
           <li><a href="#i_va_arg">'<tt>va_arg</tt>'  Instruction</a></li>
         </ol>
@@ -1135,6 +1136,12 @@
   <dd>Perform the <a href="#i_insertelement">insertelement
   operation</a> on constants.
 
+
+  <dt><b><tt>shufflevector ( VEC1, VEC2, IDXMASK )</tt></b></dt>
+
+  <dd>Perform the <a href="#i_shufflevector">shufflevector
+  operation</a> on constants.
+
   <dt><b><tt>OPCODE ( LHS, RHS )</tt></b></dt>
 
   <dd>Perform the specified operation of the LHS and RHS constants. OPCODE may 
@@ -2608,6 +2615,58 @@
 </pre>
 </div>
 
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+   <a name="i_shufflevector">'<tt>shufflevector</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+  <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <n x uint> <mask>    <i>; yields <n x <ty>></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.
+</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 'uint'.
+</p>
+
+<p>
+The shuffle mask operand is required to be a constant vector with either
+constant integer or undef values.
+</p>
+
+<h5>Semantics:</h5>
+
+<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
+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>
+
+<h5>Example:</h5>
+
+<pre>
+  %result = shufflevector <4 x int> %v1, <4 x int> %v2, <4 x uint> <uint 0, uint 4, uint 1, uint 5>    <i>; yields <4 x int></i>
+  %result = shufflevector <4 x int> %v1, <4 x int> undef, <4 x uint> <uint 0, uint 1, uint 2, uint 3>  <i>; yields <4 x int></i> - Identity shuffle.
+</pre>
+</div>
+
 
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection">
@@ -3733,7 +3792,7 @@
 
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2006/03/24 07:16:10 $
+  Last modified: $Date: 2006/04/08 00:13:41 $
 </address>
 </body>
 </html>






More information about the llvm-commits mailing list