diff options
author | Robert Bocchino <bocchino@illinois.edu> | 2006-01-15 20:48:27 +0000 |
---|---|---|
committer | Robert Bocchino <bocchino@illinois.edu> | 2006-01-15 20:48:27 +0000 |
commit | 05ccd7039610c72b7fceb85a0c4b644aef2e64eb (patch) | |
tree | c74c6654ce58521808a1f4183fb1b1d02c624e6b /docs/LangRef.html | |
parent | 14c02b752a7642749efa157f57536ad9c837907a (diff) | |
download | external_llvm-05ccd7039610c72b7fceb85a0c4b644aef2e64eb.zip external_llvm-05ccd7039610c72b7fceb85a0c4b644aef2e64eb.tar.gz external_llvm-05ccd7039610c72b7fceb85a0c4b644aef2e64eb.tar.bz2 |
Added spec for insertelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25342 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r-- | docs/LangRef.html | 55 |
1 files changed, 54 insertions, 1 deletions
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 @@ following is the syntax for constant expressions:</p> <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 @@ value argument; otherwise, it returns the second value argument. <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 @@ results are undefined. <!-- _______________________________________________________________________ --> <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> |