Added spec for insertelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25342 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/LangRef.html b/docs/LangRef.html
index f3f82d9..c92e7ea 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -101,6 +101,7 @@
<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_insertelement">'<tt>insertelement</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>
@@ -1099,6 +1100,11 @@
<dd>Perform the <a href="#i_extractelement">extractelement
operation</a> on constants.
+ <dt><b><tt>insertelement ( VAL, ELT, IDX )</tt></b></dt>
+
+ <dd>Perform the <a href="#i_insertelement">insertelement
+ 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
@@ -2261,7 +2267,7 @@
<p>
The '<tt>extractelement</tt>' instruction extracts a single scalar
-element from a vector at a specified index.
+element from a packed vector at a specified index.
</p>
@@ -2292,6 +2298,53 @@
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
+ <a name="i_insertelement">'<tt>insertelement</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+ <result> = insertelement <n x <ty>> <val>, <ty> <elt>, uint <idx> <i>; yields <n x <ty>></i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>insertelement</tt>' instruction inserts a scalar
+element into a packed vector at a specified index.
+</p>
+
+
+<h5>Arguments:</h5>
+
+<p>
+The first operand of an '<tt>insertelement</tt>' instruction is a
+value of <a href="#t_packed">packed</a> type. The second operand is a
+scalar value whose type must equal the element type of the first
+operand. The third operand is an index indicating the position at
+which to insert the value. The index may be a variable.</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The result is a packed vector of the same type as <tt>val</tt>. Its
+element values are those of <tt>val</tt> except at position
+<tt>idx</tt>, where it gets the value <tt>elt</tt>. If <tt>idx</tt>
+exceeds the length of <tt>val</tt>, the results are undefined.
+</p>
+
+<h5>Example:</h5>
+
+<pre>
+ %result = insertelement <4 x int> %vec, int 1, uint 0 <i>; yields <4 x int></i>
+</pre>
+</div>
+
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
<a name="i_call">'<tt>call</tt>' Instruction</a>
</div>