mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +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_phi">'<tt>phi</tt>' Instruction</a></li>
|
||||||
<li><a href="#i_cast">'<tt>cast .. to</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_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_vselect">'<tt>vselect</tt>' Instruction</a></li>
|
||||||
<li><a href="#i_extractelement">'<tt>extractelement</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_insertelement">'<tt>insertelement</tt>' Instruction</a></li>
|
||||||
@ -2331,56 +2332,50 @@ value argument; otherwise, it returns the second value argument.
|
|||||||
</div>
|
</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>
|
Instruction</a> </div>
|
||||||
<div class="doc_text">
|
<div class="doc_text">
|
||||||
<h5>Syntax:</h5>
|
<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>
|
</pre>
|
||||||
|
|
||||||
<h5>Overview:</h5>
|
<h5>Overview:</h5>
|
||||||
|
|
||||||
<p>The '<tt>vset</tt>' instruction returns a vector of boolean
|
<p>The '<tt>vsetint</tt>' instruction takes two integer vectors and
|
||||||
values representing, at each position, the result of the comparison
|
returns a vector of boolean values representing, at each position, the
|
||||||
between the values at that position in the two operands.</p>
|
result of the comparison between the values at that position in the
|
||||||
|
two operands.</p>
|
||||||
|
|
||||||
<h5>Arguments:</h5>
|
<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
|
operation and two value arguments. The value arguments must be of <a
|
||||||
href="#t_packed">packed</a> type, and they must have identical types.
|
href="#t_integral">integral</a> <a href="#t_packed">packed</a> type,
|
||||||
For value arguments of integral element type, the operation argument
|
and they must have identical types. The operation argument must be
|
||||||
must be one of <tt>eq</tt>, <tt>ne</tt>, <tt>lt</tt>, <tt>gt</tt>,
|
one of <tt>eq</tt>, <tt>ne</tt>, <tt>slt</tt>, <tt>sgt</tt>,
|
||||||
<tt>le</tt>, <tt>ge</tt>, <tt>ult</tt>, <tt>ugt</tt>, <tt>ule</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>. For value arguments
|
<tt>uge</tt>, <tt>true</tt>, and <tt>false</tt>. The result is a
|
||||||
of floating point element type, the operation argument must be one of
|
packed <tt>bool</tt> value with the same length as each operand.</p>
|
||||||
<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>
|
<h5>Semantics:</h5>
|
||||||
|
|
||||||
<p>The following table shows the semantics of '<tt>vset</tt>' for
|
<p>The following table shows the semantics of '<tt>vsetint</tt>'. For
|
||||||
integral value arguments. For each position of the result, the
|
each position of the result, the comparison is done on the
|
||||||
comparison is done on the corresponding positions of the two value
|
corresponding positions of the two value arguments. Note that the
|
||||||
arguments. Note that the signedness of the comparison depends on the
|
signedness of the comparison depends on the comparison opcode and
|
||||||
comparison opcode and <i>not</i> on the signedness of the value
|
<i>not</i> on the signedness of the value operands. E.g., <tt>vsetint
|
||||||
operands. E.g., <tt>vset lt <4 x unsigned> %x, %y</tt> does an
|
slt <4 x unsigned> %x, %y</tt> does an elementwise <i>signed</i>
|
||||||
elementwise <i>signed</i> comparison of <tt>%x</tt> and
|
comparison of <tt>%x</tt> and <tt>%y</tt>.</p>
|
||||||
<tt>%y</tt>.</p>
|
|
||||||
|
|
||||||
<table border="1" cellspacing="0" cellpadding="4">
|
<table border="1" cellspacing="0" cellpadding="4">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><th>Operation</th><th>Result is true iff</th><th>Comparison is</th></tr>
|
<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>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>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>slt</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>sgt</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>sle</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>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>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>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>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>
|
</tbody>
|
||||||
</table>
|
</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
|
floating point types. If either operand is a floating point Not a
|
||||||
Number (NaN) value, the operation is unordered, and the value in the
|
Number (NaN) value, the operation is unordered, and the value in the
|
||||||
first column below is produced at that position. Otherwise, the
|
first column below is produced at that position. Otherwise, the
|
||||||
@ -2426,12 +2461,12 @@ produced.</p>
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h5>Example:</h5>
|
<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>
|
<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> = vset ne <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = true, true</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> = vset lt <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = true, false</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> = vset gt <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = false, true</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> = vset le <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = true, false</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> = vset ge <2 x int> <int 0, int 1>, <int 1, int 0> <i>; yields {<2 x bool>}:result = false, true</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>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user