summaryrefslogtreecommitdiff
path: root/docs/LangRef.html
diff options
context:
space:
mode:
authorRobert Bocchino <bocchino@illinois.edu>2006-01-05 17:37:02 +0000
committerRobert Bocchino <bocchino@illinois.edu>2006-01-05 17:37:02 +0000
commit3a55866622cc48e7e7cd1aefa8caf9ce8cf376b0 (patch)
treebaa33778724f0e7c685995d3d0b03c0fcaa37651 /docs/LangRef.html
parent2f690c84fa1682a2009423539af16d5f530006f9 (diff)
downloadllvm-3a55866622cc48e7e7cd1aefa8caf9ce8cf376b0.tar.gz
llvm-3a55866622cc48e7e7cd1aefa8caf9ce8cf376b0.tar.bz2
llvm-3a55866622cc48e7e7cd1aefa8caf9ce8cf376b0.tar.xz
Added the spec for the new "extractelement" instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r--docs/LangRef.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index dde18bd711..2a1d3a1bda 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -100,6 +100,7 @@
<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_extractelement">'<tt>extractelement</tt>' Instruction</a></li>
<li><a href="#i_call">'<tt>call</tt>' Instruction</a></li>
<li><a href="#i_vaarg">'<tt>vaarg</tt>' Instruction</a></li>
</ol>
@@ -2230,8 +2231,51 @@ value argument; otherwise, it returns the second value argument.
</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_extractelement">'<tt>extractelement</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+ &lt;result&gt; = extractelement &lt;n x &lt;ty&gt;&gt; &lt;val&gt;, uint &lt;idx&gt; <i>; yields &lt;ty&gt;</i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>extractelement</tt>' instruction extracts a single scalar
+element from a vector at a specified index.
+</p>
+<h5>Arguments:</h5>
+
+<p>
+The first operand of an '<tt>extractelement</tt>' instruction is a
+value of <a href="#t_packed">packed</a> type. The second operand is
+an index indicating the position from which to extract the element.
+The index may be a variable.</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The result is a scalar of the same type as the element type of
+<tt>val</tt>. Its value is the value at position <tt>idx</tt> of
+<tt>val</tt>. If <tt>idx</tt> exceeds the length of <tt>val</tt>, the
+results are undefined.
+</p>
+
+<h5>Example:</h5>
+
+<pre>
+ %result = extractelement &lt;4 x int&gt; %vec, uint 0 <i>; yields int</i>
+</pre>
+</div>
+
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">