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

Robert L. Bocchino Jr. bocchino at persephone.cs.uiuc.edu
Fri Feb 17 13:18:40 PST 2006



Changes in directory llvm/docs:

LangRef.html updated: 1.134 -> 1.135
---
Log message:

Added documentation for vset and vselect.


---
Diffs of the changes:  (+159 -5)

 LangRef.html |  164 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 159 insertions(+), 5 deletions(-)


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.134 llvm/docs/LangRef.html:1.135
--- llvm/docs/LangRef.html:1.134	Wed Jan 25 17:47:57 2006
+++ llvm/docs/LangRef.html	Fri Feb 17 15:18:08 2006
@@ -29,7 +29,7 @@
   </li>
   <li><a href="#typesystem">Type System</a>
     <ol>
-      <li><a href="#t_primitive">Primitive Types</a> 	
+      <li><a href="#t_primitive">Primitive Types</a>    
         <ol>
           <li><a href="#t_classifications">Type Classifications</a></li>
         </ol>
@@ -96,9 +96,9 @@
           <li><a href="#i_malloc">'<tt>malloc</tt>'   Instruction</a></li>
           <li><a href="#i_free">'<tt>free</tt>'     Instruction</a></li>
           <li><a href="#i_alloca">'<tt>alloca</tt>'   Instruction</a></li>
-	 <li><a href="#i_load">'<tt>load</tt>'     Instruction</a></li>
-	 <li><a href="#i_store">'<tt>store</tt>'    Instruction</a></li>
-	 <li><a href="#i_getelementptr">'<tt>getelementptr</tt>' Instruction</a></li>
+         <li><a href="#i_load">'<tt>load</tt>'     Instruction</a></li>
+         <li><a href="#i_store">'<tt>store</tt>'    Instruction</a></li>
+         <li><a href="#i_getelementptr">'<tt>getelementptr</tt>' Instruction</a></li>
         </ol>
       </li>
       <li><a href="#otherops">Other Operations</a>
@@ -106,6 +106,8 @@
           <li><a href="#i_phi">'<tt>phi</tt>'   Instruction</a></li>
           <li><a href="#i_cast">'<tt>cast .. to</tt>' Instruction</a></li>
           <li><a href="#i_select">'<tt>select</tt>' Instruction</a></li>
+          <li><a href="#i_vset">'<tt>vset</tt>' Instruction</a></li>
+          <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_call">'<tt>call</tt>'  Instruction</a></li>
@@ -1619,6 +1621,7 @@
 <h5>Example:</h5>
 <pre>  <result> = rem int 4, %var          <i>; yields {int}:result = 4 % %var</i>
 </pre>
+
 </div>
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection"> <a name="i_setcc">'<tt>set<i>cc</i></tt>'
@@ -1664,6 +1667,7 @@
   <result> = setge sbyte 4, 5        <i>; yields {bool}:result = false</i>
 </pre>
 </div>
+
 <!-- ======================================================================= -->
 <div class="doc_subsection"> <a name="bitwiseops">Bitwise Binary
 Operations</a> </div>
@@ -2333,6 +2337,156 @@
 </pre>
 </div>
 
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_vset">'<tt>vset</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre><result> = vset <op>, <n x <ty>> <var1>, <var2>   <i>; yields <n x bool></i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>vset</tt>' instruction returns a vector of boolean
+values representing, at each position, the result of the comparison
+between the values at that position in the two operands.</p>
+
+<h5>Arguments:</h5>
+
+<p>The arguments to a '<tt>vset</tt>' instruction are a comparison
+operation and two value arguments.  The value arguments must be of <a
+href="#t_packed">packed</a> type, and they must have identical types.
+For value arguments of integral element type, the operation argument
+must be one of <tt>eq</tt>, <tt>ne</tt>, <tt>lt</tt>, <tt>gt</tt>,
+<tt>le</tt>, <tt>ge</tt>, <tt>ult</tt>, <tt>ugt</tt>, <tt>ule</tt>,
+<tt>uge</tt>, <tt>true</tt>, and <tt>false</tt>.  For value arguments
+of floating point element type, the operation argument must be one of
+<tt>eq</tt>, <tt>ne</tt>, <tt>lt</tt>, <tt>gt</tt>, <tt>le</tt>,
+<tt>ge</tt>, <tt>oeq</tt>, <tt>one</tt>, <tt>olt</tt>, <tt>ogt</tt>,
+<tt>ole</tt>, <tt>oge</tt>, <tt>ueq</tt>, <tt>une</tt>, <tt>ult</tt>,
+<tt>ugt</tt>, <tt>ule</tt>, <tt>uge</tt>, <tt>o</tt>, <tt>u</tt>,
+<tt>true</tt>, and <tt>false</tt>.  The result is a packed
+<tt>bool</tt> value with the same length as each operand.</p>
+
+<h5>Semantics:</h5>
+
+<p>The following table shows the semantics of '<tt>vset</tt>' for
+integral value arguments.  For each position of the result, the
+comparison is done on the corresponding positions of the two value
+arguments.  Note that the signedness of the comparison depends on the
+comparison opcode and <i>not</i> on the signedness of the value
+operands.  E.g., <tt>vset lt <4 x unsigned> %x, %y</tt> does an
+elementwise <i>signed</i> comparison of <tt>%x</tt> and
+<tt>%y</tt>.</p>
+
+<table  border="1" cellspacing="0" cellpadding="4">
+  <tbody>
+    <tr><th>Operation</th><th>Result is true iff</th><th>Comparison is</th></tr>
+    <tr><td><tt>eq</tt></td><td>var1 == var2</td><td>--</td></tr>
+    <tr><td><tt>ne</tt></td><td>var1 != var2</td><td>--</td></tr>
+    <tr><td><tt>lt</tt></td><td>var1 < var2</td><td>signed</td></tr>
+    <tr><td><tt>gt</tt></td><td>var1 > var2</td><td>signed</td></tr>
+    <tr><td><tt>le</tt></td><td>var1 <= var2</td><td>signed</td></tr>
+    <tr><td><tt>ge</tt></td><td>var1 >= var2</td><td>signed</td></tr>
+    <tr><td><tt>ult</tt></td><td>var1 < var2</td><td>unsigned</td></tr>
+    <tr><td><tt>ugt</tt></td><td>var1 > var2</td><td>unsigned</td></tr>
+    <tr><td><tt>ule</tt></td><td>var1 <= var2</td><td>unsigned</td></tr>
+    <tr><td><tt>uge</tt></td><td>var1 >= var2</td><td>unsigned</td></tr>
+    <tr><td><tt>true</tt></td><td>always</td><td>--</td></tr>
+    <tr><td><tt>false</tt></td><td>never</td><td>--</td></tr>
+  </tbody>
+</table>
+
+<p>The following table shows the semantics of '<tt>vset</tt>' for
+floating point types.  If either operand is a floating point Not a
+Number (NaN) value, the operation is unordered, and the value in the
+first column below is produced at that position.  Otherwise, the
+operation is ordered, and the value in the second column is
+produced.</p>
+
+<table  border="1" cellspacing="0" cellpadding="4">
+  <tbody>
+    <tr><th>Operation</th><th>If unordered<th>Otherwise true iff</th></tr>
+    <tr><td><tt>eq</tt></td><td>undefined</td><td>var1 == var2</td></tr>
+    <tr><td><tt>ne</tt></td><td>undefined</td><td>var1 != var2</td></tr>
+    <tr><td><tt>lt</tt></td><td>undefined</td><td>var1 < var2</td></tr>
+    <tr><td><tt>gt</tt></td><td>undefined</td><td>var1 > var2</td></tr>
+    <tr><td><tt>le</tt></td><td>undefined</td><td>var1 <= var2</td></tr>
+    <tr><td><tt>ge</tt></td><td>undefined</td><td>var1 >= var2</td></tr>
+    <tr><td><tt>oeq</tt></td><td>false</td><td>var1 == var2</td></tr>
+    <tr><td><tt>one</tt></td><td>false</td><td>var1 != var2</td></tr>
+    <tr><td><tt>olt</tt></td><td>false</td><td>var1 < var2</td></tr>
+    <tr><td><tt>ogt</tt></td><td>false</td><td>var1 > var2</td></tr>
+    <tr><td><tt>ole</tt></td><td>false</td><td>var1 <= var2</td></tr>
+    <tr><td><tt>oge</tt></td><td>false</td><td>var1 >= var2</td></tr>
+    <tr><td><tt>ueq</tt></td><td>true</td><td>var1 == var2</td></tr>
+    <tr><td><tt>une</tt></td><td>true</td><td>var1 != var2</td></tr>
+    <tr><td><tt>ult</tt></td><td>true</td><td>var1 < var2</td></tr>
+    <tr><td><tt>ugt</tt></td><td>true</td><td>var1 > var2</td></tr>
+    <tr><td><tt>ule</tt></td><td>true</td><td>var1 <= var2</td></tr>
+    <tr><td><tt>uge</tt></td><td>true</td><td>var1 >= var2</td></tr>
+    <tr><td><tt>o</tt></td><td>false</td><td>always</td></tr>
+    <tr><td><tt>u</tt></td><td>true</td><td>never</td></tr>
+    <tr><td><tt>true</tt></td><td>true</td><td>always</td></tr>
+    <tr><td><tt>false</tt></td><td>false</td><td>never</td></tr>
+  </tbody>
+</table>
+
+<h5>Example:</h5>
+<pre>  <result> = vset eq <2 x int> <int 0, int 1>, <int 1, int 0>      <i>; yields {<2 x bool>}:result = false, false</i>
+  <result> = vset ne <2 x int> <int 0, int 1>, <int 1, int 0>      <i>; yields {<2 x bool>}:result = true, true</i>
+  <result> = vset lt <2 x int> <int 0, int 1>, <int 1, int 0>      <i>; yields {<2 x bool>}:result = true, false</i>
+  <result> = vset gt <2 x int> <int 0, int 1>, <int 1, int 0>      <i>; yields {<2 x bool>}:result = false, true</i>
+  <result> = vset le <2 x int> <int 0, int 1>, <int 1, int 0>      <i>; yields {<2 x bool>}:result = true, false</i>
+  <result> = vset ge <2 x int> <int 0, int 1>, <int 1, int 0>      <i>; yields {<2 x bool>}:result = false, true</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+   <a name="i_vselect">'<tt>vselect</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+  <result> = vselect <n x bool> <cond>, <n x <ty>> <val1>, <n x <ty>> <val2> <i>; yields <n x <ty>></i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>vselect</tt>' instruction chooses one value at each position
+of a vector based on a condition.
+</p>
+
+
+<h5>Arguments:</h5>
+
+<p>
+The '<tt>vselect</tt>' instruction requires a <a
+href="#t_packed">packed</a> <tt>bool</tt> value indicating the
+condition at each vector position, and two values of the same packed
+type.  All three operands must have the same length.  The type of the
+result is the same as the type of the two value operands.</p>
+
+<h5>Semantics:</h5>
+
+<p>
+At each position where the <tt>bool</tt> vector is true, that position
+of the result gets its value from the first value argument; otherwise,
+it gets its value from the second value argument.
+</p>
+
+<h5>Example:</h5>
+
+<pre>
+  %X = vselect bool <2 x bool> <bool true, bool false>, <2 x ubyte> <ubyte 17, ubyte 17>, 
+    <2 x ubyte> <ubyte 42, ubyte 42>      <i>; yields <2 x ubyte>:17, 42</i>
+</pre>
+</div>
 
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection">
@@ -3734,7 +3888,7 @@
 
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2006/01/25 23:47:57 $
+  Last modified: $Date: 2006/02/17 21:18:08 $
 </address>
 </body>
 </html>






More information about the llvm-commits mailing list