mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Split the 'vset' instruction into two instructions, 'vsetint' and
'vsetfp', to reflect the fact that the semantics are different for integer and fp values. llvm-svn: 26767
This commit is contained in:
parent
443f1658c9
commit
60b452c13b
@ -106,7 +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_vsetint">'<tt>vsetint</tt>' Instruction</a></li>
|
||||
<li><a href="#i_vsetfp">'<tt>vsetfp</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>
|
||||
@ -2331,56 +2332,50 @@ value argument; otherwise, it returns the second value argument.
|
||||
</div>
|
||||
|
||||
<!-- _______________________________________________________________________ -->
|
||||
<div class="doc_subsubsection"> <a name="i_vset">'<tt>vset</tt>'
|
||||
<div class="doc_subsubsection"> <a name="i_vsetint">'<tt>vsetint</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><result> = vsetint <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>
|
||||
<p>The '<tt>vsetint</tt>' instruction takes two integer vectors and
|
||||
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
|
||||
<p>The arguments to a '<tt>vsetint</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>
|
||||
href="#t_integral">integral</a> <a href="#t_packed">packed</a> type,
|
||||
and they must have identical types. The operation argument must be
|
||||
one of <tt>eq</tt>, <tt>ne</tt>, <tt>slt</tt>, <tt>sgt</tt>,
|
||||
<tt>sle</tt>, <tt>sge</tt>, <tt>ult</tt>, <tt>ugt</tt>, <tt>ule</tt>,
|
||||
<tt>uge</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>
|
||||
<p>The following table shows the semantics of '<tt>vsetint</tt>'. 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>vsetint
|
||||
slt <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>slt</tt></td><td>var1 < var2</td><td>signed</td></tr>
|
||||
<tr><td><tt>sgt</tt></td><td>var1 > var2</td><td>signed</td></tr>
|
||||
<tr><td><tt>sle</tt></td><td>var1 <= var2</td><td>signed</td></tr>
|
||||
<tr><td><tt>sge</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>
|
||||
@ -2390,7 +2385,47 @@ elementwise <i>signed</i> comparison of <tt>%x</tt> and
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>The following table shows the semantics of '<tt>vset</tt>' for
|
||||
<h5>Example:</h5>
|
||||
<pre> <result> = vsetint eq <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = false, false</i>
|
||||
<result> = vsetint ne <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = true, true</i>
|
||||
<result> = vsetint slt <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = true, false</i>
|
||||
<result> = vsetint sgt <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = false, true</i>
|
||||
<result> = vsetint sle <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = true, false</i>
|
||||
<result> = vsetint sge <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_vsetfp">'<tt>vsetfp</tt>'
|
||||
Instruction</a> </div>
|
||||
<div class="doc_text">
|
||||
<h5>Syntax:</h5>
|
||||
<pre><result> = vsetfp <op>, <n x <ty>> <var1>, <var2> <i>; yields <n x bool></i>
|
||||
</pre>
|
||||
|
||||
<h5>Overview:</h5>
|
||||
|
||||
<p>The '<tt>vsetfp</tt>' instruction takes two floating point vector
|
||||
arguments and 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>vsetfp</tt>' instruction are a comparison
|
||||
operation and two value arguments. The value arguments must be of <a
|
||||
href="t_floating">floating point</a> <a href="#t_packed">packed</a>
|
||||
type, and they must have identical types. 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>vsetfp</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
|
||||
@ -2426,12 +2461,12 @@ produced.</p>
|
||||
</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> <result> = vsetfp eq <2 x float> <float 0, float 1>, <float 1, float 0> <i>; yields {<2 x bool>}:result = false, false</i>
|
||||
<result> = vsetfp ne <2 x float> <float 0, float 1>, <float 1, float 0> <i>; yields {<2 x bool>}:result = true, true</i>
|
||||
<result> = vsetfp lt <2 x float> <float 0, float 1>, <float 1, float 0> <i>; yields {<2 x bool>}:result = true, false</i>
|
||||
<result> = vsetfp gt <2 x float> <float 0, float 1>, <float 1, float 0> <i>; yields {<2 x bool>}:result = false, true</i>
|
||||
<result> = vsetfp le <2 x float> <float 0, float 1>, <float 1, float 0> <i>; yields {<2 x bool>}:result = true, false</i>
|
||||
<result> = vsetfp ge <2 x float> <float 0, float 1>, <float 1, float 0> <i>; yields {<2 x bool>}:result = false, true</i>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user