+<h5>Example:</h5>
+<pre>
+ %X = fptosi double -123.0 to i32 <i>; yields i32:-123</i>
+ %Y = fptosi float 1.0E-247 to i1 <i>; yields undefined:1</i>
+ %X = fptosi float 1.04E+17 to i8 <i>; yields undefined:1</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_uitofp">'<tt>uitofp .. to</tt>' Instruction</a>
+</div>
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ <result> = uitofp <ty> <value> to <ty2> <i>; yields ty2</i>
+</pre>
+
+<h5>Overview:</h5>
+<p>The '<tt>uitofp</tt>' instruction regards <tt>value</tt> as an unsigned
+integer and converts that value to the <tt>ty2</tt> type.</p>
+
+<h5>Arguments:</h5>
+<p>The '<tt>uitofp</tt>' instruction takes a value to cast, which must be a
+scalar or vector <a href="#t_integer">integer</a> value, and a type to cast it
+to <tt>ty2</tt>, which must be an <a href="#t_floating">floating point</a>
+type. If <tt>ty</tt> is a vector integer type, <tt>ty2</tt> must be a vector
+floating point type with the same number of elements as <tt>ty</tt></p>
+
+<h5>Semantics:</h5>
+<p>The '<tt>uitofp</tt>' instruction interprets its operand as an unsigned
+integer quantity and converts it to the corresponding floating point value. If
+the value cannot fit in the floating point value, the results are undefined.</p>
+
+<h5>Example:</h5>
+<pre>
+ %X = uitofp i32 257 to float <i>; yields float:257.0</i>
+ %Y = uitofp i8 -1 to double <i>; yields double:255.0</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_sitofp">'<tt>sitofp .. to</tt>' Instruction</a>
+</div>
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ <result> = sitofp <ty> <value> to <ty2> <i>; yields ty2</i>
+</pre>
+
+<h5>Overview:</h5>
+<p>The '<tt>sitofp</tt>' instruction regards <tt>value</tt> as a signed
+integer and converts that value to the <tt>ty2</tt> type.</p>
+
+<h5>Arguments:</h5>
+<p>The '<tt>sitofp</tt>' instruction takes a value to cast, which must be a
+scalar or vector <a href="#t_integer">integer</a> value, and a type to cast it
+to <tt>ty2</tt>, which must be an <a href="#t_floating">floating point</a>
+type. If <tt>ty</tt> is a vector integer type, <tt>ty2</tt> must be a vector
+floating point type with the same number of elements as <tt>ty</tt></p>
+
+<h5>Semantics:</h5>
+<p>The '<tt>sitofp</tt>' instruction interprets its operand as a signed
+integer quantity and converts it to the corresponding floating point value. If
+the value cannot fit in the floating point value, the results are undefined.</p>
+
+<h5>Example:</h5>
+<pre>
+ %X = sitofp i32 257 to float <i>; yields float:257.0</i>
+ %Y = sitofp i8 -1 to double <i>; yields double:-1.0</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_ptrtoint">'<tt>ptrtoint .. to</tt>' Instruction</a>
+</div>
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ <result> = ptrtoint <ty> <value> to <ty2> <i>; yields ty2</i>
+</pre>
+
+<h5>Overview:</h5>
+<p>The '<tt>ptrtoint</tt>' instruction converts the pointer <tt>value</tt> to
+the integer type <tt>ty2</tt>.</p>
+
+<h5>Arguments:</h5>
+<p>The '<tt>ptrtoint</tt>' instruction takes a <tt>value</tt> to cast, which
+must be a <a href="#t_pointer">pointer</a> value, and a type to cast it to
+<tt>ty2</tt>, which must be an <a href="#t_integer">integer</a> type.
+
+<h5>Semantics:</h5>
+<p>The '<tt>ptrtoint</tt>' instruction converts <tt>value</tt> to integer type
+<tt>ty2</tt> by interpreting the pointer value as an integer and either
+truncating or zero extending that value to the size of the integer type. If
+<tt>value</tt> is smaller than <tt>ty2</tt> then a zero extension is done. If
+<tt>value</tt> is larger than <tt>ty2</tt> then a truncation is done. If they
+are the same size, then nothing is done (<i>no-op cast</i>) other than a type
+change.</p>
+
+<h5>Example:</h5>
+<pre>
+ %X = ptrtoint i32* %X to i8 <i>; yields truncation on 32-bit architecture</i>
+ %Y = ptrtoint i32* %x to i64 <i>; yields zero extension on 32-bit architecture</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_inttoptr">'<tt>inttoptr .. to</tt>' Instruction</a>
+</div>
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ <result> = inttoptr <ty> <value> to <ty2> <i>; yields ty2</i>
+</pre>
+
+<h5>Overview:</h5>
+<p>The '<tt>inttoptr</tt>' instruction converts an integer <tt>value</tt> to
+a pointer type, <tt>ty2</tt>.</p>
+
+<h5>Arguments:</h5>
+<p>The '<tt>inttoptr</tt>' instruction takes an <a href="#t_integer">integer</a>
+value to cast, and a type to cast it to, which must be a
+<a href="#t_pointer">pointer</a> type.
+
+<h5>Semantics:</h5>
+<p>The '<tt>inttoptr</tt>' instruction converts <tt>value</tt> to type
+<tt>ty2</tt> by applying either a zero extension or a truncation depending on
+the size of the integer <tt>value</tt>. If <tt>value</tt> is larger than the
+size of a pointer then a truncation is done. If <tt>value</tt> is smaller than
+the size of a pointer then a zero extension is done. If they are the same size,
+nothing is done (<i>no-op cast</i>).</p>
+
+<h5>Example:</h5>
+<pre>
+ %X = inttoptr i32 255 to i32* <i>; yields zero extension on 64-bit architecture</i>
+ %X = inttoptr i32 255 to i32* <i>; yields no-op on 32-bit architecture</i>
+ %Y = inttoptr i64 0 to i32* <i>; yields truncation on 32-bit architecture</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_bitcast">'<tt>bitcast .. to</tt>' Instruction</a>
+</div>
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ <result> = bitcast <ty> <value> to <ty2> <i>; yields ty2</i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>bitcast</tt>' instruction converts <tt>value</tt> to type
+<tt>ty2</tt> without changing any bits.</p>
+
+<h5>Arguments:</h5>
+
+<p>The '<tt>bitcast</tt>' instruction takes a value to cast, which must be
+a first class value, and a type to cast it to, which must also be a <a
+ href="#t_firstclass">first class</a> type. The bit sizes of <tt>value</tt>
+and the destination type, <tt>ty2</tt>, must be identical. If the source
+type is a pointer, the destination type must also be a pointer. This
+instruction supports bitwise conversion of vectors to integers and to vectors
+of other types (as long as they have the same size).</p>
+
+<h5>Semantics:</h5>
+<p>The '<tt>bitcast</tt>' instruction converts <tt>value</tt> to type
+<tt>ty2</tt>. It is always a <i>no-op cast</i> because no bits change with
+this conversion. The conversion is done as if the <tt>value</tt> had been
+stored to memory and read back as type <tt>ty2</tt>. Pointer types may only be
+converted to other pointer types with this instruction. To convert pointers to
+other types, use the <a href="#i_inttoptr">inttoptr</a> or
+<a href="#i_ptrtoint">ptrtoint</a> instructions first.</p>
+
+<h5>Example:</h5>
+<pre>
+ %X = bitcast i8 255 to i8 <i>; yields i8 :-1</i>
+ %Y = bitcast i32* %x to sint* <i>; yields sint*:%x</i>
+ %Z = bitcast <2xint> %V to i64; <i>; yields i64: %V</i>
+</pre>
+</div>
+
+<!-- ======================================================================= -->
+<div class="doc_subsection"> <a name="otherops">Other Operations</a> </div>
+<div class="doc_text">
+<p>The instructions in this category are the "miscellaneous"
+instructions, which defy better classification.</p>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"><a name="i_icmp">'<tt>icmp</tt>' Instruction</a>
+</div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = icmp <cond> <ty> <var1>, <var2> <i>; yields {i1}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>icmp</tt>' instruction returns a boolean value based on comparison
+of its two integer or pointer operands.</p>
+<h5>Arguments:</h5>
+<p>The '<tt>icmp</tt>' instruction takes three operands. The first operand is
+the condition code indicating the kind of comparison to perform. It is not
+a value, just a keyword. The possible condition code are:
+<ol>
+ <li><tt>eq</tt>: equal</li>
+ <li><tt>ne</tt>: not equal </li>
+ <li><tt>ugt</tt>: unsigned greater than</li>
+ <li><tt>uge</tt>: unsigned greater or equal</li>
+ <li><tt>ult</tt>: unsigned less than</li>
+ <li><tt>ule</tt>: unsigned less or equal</li>
+ <li><tt>sgt</tt>: signed greater than</li>
+ <li><tt>sge</tt>: signed greater or equal</li>
+ <li><tt>slt</tt>: signed less than</li>
+ <li><tt>sle</tt>: signed less or equal</li>
+</ol>
+<p>The remaining two arguments must be <a href="#t_integer">integer</a> or
+<a href="#t_pointer">pointer</a> typed. They must also be identical types.</p>
+<h5>Semantics:</h5>
+<p>The '<tt>icmp</tt>' compares <tt>var1</tt> and <tt>var2</tt> according to
+the condition code given as <tt>cond</tt>. The comparison performed always
+yields a <a href="#t_primitive">i1</a> result, as follows:
+<ol>
+ <li><tt>eq</tt>: yields <tt>true</tt> if the operands are equal,
+ <tt>false</tt> otherwise. No sign interpretation is necessary or performed.
+ </li>
+ <li><tt>ne</tt>: yields <tt>true</tt> if the operands are unequal,
+ <tt>false</tt> otherwise. No sign interpretation is necessary or performed.
+ <li><tt>ugt</tt>: interprets the operands as unsigned values and yields
+ <tt>true</tt> if <tt>var1</tt> is greater than <tt>var2</tt>.</li>
+ <li><tt>uge</tt>: interprets the operands as unsigned values and yields
+ <tt>true</tt> if <tt>var1</tt> is greater than or equal to <tt>var2</tt>.</li>
+ <li><tt>ult</tt>: interprets the operands as unsigned values and yields
+ <tt>true</tt> if <tt>var1</tt> is less than <tt>var2</tt>.</li>
+ <li><tt>ule</tt>: interprets the operands as unsigned values and yields
+ <tt>true</tt> if <tt>var1</tt> is less than or equal to <tt>var2</tt>.</li>
+ <li><tt>sgt</tt>: interprets the operands as signed values and yields
+ <tt>true</tt> if <tt>var1</tt> is greater than <tt>var2</tt>.</li>
+ <li><tt>sge</tt>: interprets the operands as signed values and yields
+ <tt>true</tt> if <tt>var1</tt> is greater than or equal to <tt>var2</tt>.</li>
+ <li><tt>slt</tt>: interprets the operands as signed values and yields
+ <tt>true</tt> if <tt>var1</tt> is less than <tt>var2</tt>.</li>
+ <li><tt>sle</tt>: interprets the operands as signed values and yields
+ <tt>true</tt> if <tt>var1</tt> is less than or equal to <tt>var2</tt>.</li>
+</ol>
+<p>If the operands are <a href="#t_pointer">pointer</a> typed, the pointer
+values are compared as if they were integers.</p>
+
+<h5>Example:</h5>
+<pre> <result> = icmp eq i32 4, 5 <i>; yields: result=false</i>
+ <result> = icmp ne float* %X, %X <i>; yields: result=false</i>
+ <result> = icmp ult i16 4, 5 <i>; yields: result=true</i>
+ <result> = icmp sgt i16 4, 5 <i>; yields: result=false</i>
+ <result> = icmp ule i16 -4, 5 <i>; yields: result=false</i>
+ <result> = icmp sge i16 4, 5 <i>; yields: result=false</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"><a name="i_fcmp">'<tt>fcmp</tt>' Instruction</a>
+</div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = fcmp <cond> <ty> <var1>, <var2> <i>; yields {i1}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>fcmp</tt>' instruction returns a boolean value based on comparison
+of its floating point operands.</p>
+<h5>Arguments:</h5>
+<p>The '<tt>fcmp</tt>' instruction takes three operands. The first operand is
+the condition code indicating the kind of comparison to perform. It is not
+a value, just a keyword. The possible condition code are:
+<ol>
+ <li><tt>false</tt>: no comparison, always returns false</li>
+ <li><tt>oeq</tt>: ordered and equal</li>
+ <li><tt>ogt</tt>: ordered and greater than </li>
+ <li><tt>oge</tt>: ordered and greater than or equal</li>
+ <li><tt>olt</tt>: ordered and less than </li>
+ <li><tt>ole</tt>: ordered and less than or equal</li>
+ <li><tt>one</tt>: ordered and not equal</li>
+ <li><tt>ord</tt>: ordered (no nans)</li>
+ <li><tt>ueq</tt>: unordered or equal</li>
+ <li><tt>ugt</tt>: unordered or greater than </li>
+ <li><tt>uge</tt>: unordered or greater than or equal</li>
+ <li><tt>ult</tt>: unordered or less than </li>
+ <li><tt>ule</tt>: unordered or less than or equal</li>
+ <li><tt>une</tt>: unordered or not equal</li>
+ <li><tt>uno</tt>: unordered (either nans)</li>
+ <li><tt>true</tt>: no comparison, always returns true</li>
+</ol>
+<p><i>Ordered</i> means that neither operand is a QNAN while
+<i>unordered</i> means that either operand may be a QNAN.</p>
+<p>The <tt>val1</tt> and <tt>val2</tt> arguments must be
+<a href="#t_floating">floating point</a> typed. They must have identical
+types.</p>
+<h5>Semantics:</h5>
+<p>The '<tt>fcmp</tt>' instruction compares <tt>var1</tt> and <tt>var2</tt>
+according to the condition code given as <tt>cond</tt>. The comparison performed
+always yields a <a href="#t_primitive">i1</a> result, as follows:
+<ol>
+ <li><tt>false</tt>: always yields <tt>false</tt>, regardless of operands.</li>
+ <li><tt>oeq</tt>: yields <tt>true</tt> if both operands are not a QNAN and
+ <tt>var1</tt> is equal to <tt>var2</tt>.</li>
+ <li><tt>ogt</tt>: yields <tt>true</tt> if both operands are not a QNAN and
+ <tt>var1</tt> is greather than <tt>var2</tt>.</li>
+ <li><tt>oge</tt>: yields <tt>true</tt> if both operands are not a QNAN and
+ <tt>var1</tt> is greater than or equal to <tt>var2</tt>.</li>
+ <li><tt>olt</tt>: yields <tt>true</tt> if both operands are not a QNAN and
+ <tt>var1</tt> is less than <tt>var2</tt>.</li>
+ <li><tt>ole</tt>: yields <tt>true</tt> if both operands are not a QNAN and
+ <tt>var1</tt> is less than or equal to <tt>var2</tt>.</li>
+ <li><tt>one</tt>: yields <tt>true</tt> if both operands are not a QNAN and
+ <tt>var1</tt> is not equal to <tt>var2</tt>.</li>
+ <li><tt>ord</tt>: yields <tt>true</tt> if both operands are not a QNAN.</li>
+ <li><tt>ueq</tt>: yields <tt>true</tt> if either operand is a QNAN or
+ <tt>var1</tt> is equal to <tt>var2</tt>.</li>
+ <li><tt>ugt</tt>: yields <tt>true</tt> if either operand is a QNAN or
+ <tt>var1</tt> is greater than <tt>var2</tt>.</li>
+ <li><tt>uge</tt>: yields <tt>true</tt> if either operand is a QNAN or
+ <tt>var1</tt> is greater than or equal to <tt>var2</tt>.</li>
+ <li><tt>ult</tt>: yields <tt>true</tt> if either operand is a QNAN or
+ <tt>var1</tt> is less than <tt>var2</tt>.</li>
+ <li><tt>ule</tt>: yields <tt>true</tt> if either operand is a QNAN or
+ <tt>var1</tt> is less than or equal to <tt>var2</tt>.</li>
+ <li><tt>une</tt>: yields <tt>true</tt> if either operand is a QNAN or
+ <tt>var1</tt> is not equal to <tt>var2</tt>.</li>
+ <li><tt>uno</tt>: yields <tt>true</tt> if either operand is a QNAN.</li>
+ <li><tt>true</tt>: always yields <tt>true</tt>, regardless of operands.</li>
+</ol>
+
+<h5>Example:</h5>
+<pre> <result> = fcmp oeq float 4.0, 5.0 <i>; yields: result=false</i>
+ <result> = icmp one float 4.0, 5.0 <i>; yields: result=true</i>
+ <result> = icmp olt float 4.0, 5.0 <i>; yields: result=true</i>
+ <result> = icmp ueq double 1.0, 2.0 <i>; yields: result=false</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_vicmp">'<tt>vicmp</tt>' Instruction</a>
+</div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = vicmp <cond> <ty> <var1>, <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>vicmp</tt>' instruction returns an integer vector value based on
+element-wise comparison of its two integer vector operands.</p>
+<h5>Arguments:</h5>
+<p>The '<tt>vicmp</tt>' instruction takes three operands. The first operand is
+the condition code indicating the kind of comparison to perform. It is not
+a value, just a keyword. The possible condition code are:
+<ol>
+ <li><tt>eq</tt>: equal</li>
+ <li><tt>ne</tt>: not equal </li>
+ <li><tt>ugt</tt>: unsigned greater than</li>
+ <li><tt>uge</tt>: unsigned greater or equal</li>
+ <li><tt>ult</tt>: unsigned less than</li>
+ <li><tt>ule</tt>: unsigned less or equal</li>
+ <li><tt>sgt</tt>: signed greater than</li>
+ <li><tt>sge</tt>: signed greater or equal</li>
+ <li><tt>slt</tt>: signed less than</li>
+ <li><tt>sle</tt>: signed less or equal</li>
+</ol>
+<p>The remaining two arguments must be <a href="#t_vector">vector</a> of
+<a href="#t_integer">integer</a> typed. They must also be identical types.</p>
+<h5>Semantics:</h5>
+<p>The '<tt>vicmp</tt>' instruction compares <tt>var1</tt> and <tt>var2</tt>
+according to the condition code given as <tt>cond</tt>. The comparison yields a
+<a href="#t_vector">vector</a> of <a href="#t_integer">integer</a> result, of
+identical type as the values being compared. The most significant bit in each
+element is 1 if the element-wise comparison evaluates to true, and is 0
+otherwise. All other bits of the result are undefined. The condition codes
+are evaluated identically to the <a href="#i_icmp">'<tt>icmp</tt>'
+instruction</a>.
+
+<h5>Example:</h5>
+<pre>
+ <result> = vicmp eq <2 x i32> < i32 4, i32 0>, < i32 5, i32 0> <i>; yields: result=<2 x i32> < i32 0, i32 -1 ></i>
+ <result> = vicmp ult <2 x i8 > < i8 1, i8 2>, < i8 2, i8 2 > <i>; yields: result=<2 x i8> < i8 -1, i8 0 ></i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_vfcmp">'<tt>vfcmp</tt>' Instruction</a>
+</div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = vfcmp <cond> <ty> <var1>, <var2></pre>
+<h5>Overview:</h5>
+<p>The '<tt>vfcmp</tt>' instruction returns an integer vector value based on
+element-wise comparison of its two floating point vector operands. The output
+elements have the same width as the input elements.</p>
+<h5>Arguments:</h5>
+<p>The '<tt>vfcmp</tt>' instruction takes three operands. The first operand is
+the condition code indicating the kind of comparison to perform. It is not
+a value, just a keyword. The possible condition code are:
+<ol>
+ <li><tt>false</tt>: no comparison, always returns false</li>
+ <li><tt>oeq</tt>: ordered and equal</li>
+ <li><tt>ogt</tt>: ordered and greater than </li>
+ <li><tt>oge</tt>: ordered and greater than or equal</li>
+ <li><tt>olt</tt>: ordered and less than </li>
+ <li><tt>ole</tt>: ordered and less than or equal</li>
+ <li><tt>one</tt>: ordered and not equal</li>
+ <li><tt>ord</tt>: ordered (no nans)</li>
+ <li><tt>ueq</tt>: unordered or equal</li>
+ <li><tt>ugt</tt>: unordered or greater than </li>
+ <li><tt>uge</tt>: unordered or greater than or equal</li>
+ <li><tt>ult</tt>: unordered or less than </li>
+ <li><tt>ule</tt>: unordered or less than or equal</li>
+ <li><tt>une</tt>: unordered or not equal</li>
+ <li><tt>uno</tt>: unordered (either nans)</li>
+ <li><tt>true</tt>: no comparison, always returns true</li>
+</ol>
+<p>The remaining two arguments must be <a href="#t_vector">vector</a> of
+<a href="#t_floating">floating point</a> typed. They must also be identical
+types.</p>
+<h5>Semantics:</h5>
+<p>The '<tt>vfcmp</tt>' instruction compares <tt>var1</tt> and <tt>var2</tt>
+according to the condition code given as <tt>cond</tt>. The comparison yields a
+<a href="#t_vector">vector</a> of <a href="#t_integer">integer</a> result, with
+an identical number of elements as the values being compared, and each element
+having identical with to the width of the floating point elements. The most
+significant bit in each element is 1 if the element-wise comparison evaluates to
+true, and is 0 otherwise. All other bits of the result are undefined. The
+condition codes are evaluated identically to the
+<a href="#i_fcmp">'<tt>fcmp</tt>' instruction</a>.
+
+<h5>Example:</h5>
+<pre>
+ <result> = vfcmp oeq <2 x float> < float 4, float 0 >, < float 5, float 0 > <i>; yields: result=<2 x i32> < i32 0, i32 -1 ></i>
+ <result> = vfcmp ult <2 x double> < double 1, double 2 >, < double 2, double 2> <i>; yields: result=<2 x i64> < i64 -1, i64 0 ></i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_phi">'<tt>phi</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre> <result> = phi <ty> [ <val0>, <label0>], ...<br></pre>
+<h5>Overview:</h5>
+<p>The '<tt>phi</tt>' instruction is used to implement the φ node in
+the SSA graph representing the function.</p>
+<h5>Arguments:</h5>
+
+<p>The type of the incoming values is specified with the first type
+field. After this, the '<tt>phi</tt>' instruction takes a list of pairs
+as arguments, with one pair for each predecessor basic block of the
+current block. Only values of <a href="#t_firstclass">first class</a>
+type may be used as the value arguments to the PHI node. Only labels
+may be used as the label arguments.</p>
+
+<p>There must be no non-phi instructions between the start of a basic
+block and the PHI instructions: i.e. PHI instructions must be first in
+a basic block.</p>
+
+<h5>Semantics:</h5>
+
+<p>At runtime, the '<tt>phi</tt>' instruction logically takes on the value
+specified by the pair corresponding to the predecessor basic block that executed
+just prior to the current block.</p>
+
+<h5>Example:</h5>
+<pre>
+Loop: ; Infinite loop that counts from 0 on up...
+ %indvar = phi i32 [ 0, %LoopHeader ], [ %nextindvar, %Loop ]
+ %nextindvar = add i32 %indvar, 1
+ br label %Loop
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_select">'<tt>select</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+ <result> = select i1 <cond>, <ty> <val1>, <ty> <val2> <i>; yields ty</i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>select</tt>' instruction is used to choose one value based on a
+condition, without branching.
+</p>
+
+
+<h5>Arguments:</h5>
+
+<p>
+The '<tt>select</tt>' instruction requires an 'i1' value indicating the
+condition, and two values of the same <a href="#t_firstclass">first class</a>
+type. If the val1/val2 are vectors, the entire vectors are selected, not
+individual elements.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+If the i1 condition evaluates is 1, the instruction returns the first
+value argument; otherwise, it returns the second value argument.
+</p>
+
+<h5>Example:</h5>
+
+<pre>
+ %X = select i1 true, i8 17, i8 42 <i>; yields i8:17</i>
+</pre>
+</div>
+
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_call">'<tt>call</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ <result> = [tail] call [<a href="#callingconv">cconv</a>] <ty> [<fnty>*] <fnptrval>(<param list>)
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>call</tt>' instruction represents a simple function call.</p>
+
+<h5>Arguments:</h5>
+
+<p>This instruction requires several arguments:</p>
+
+<ol>
+ <li>
+ <p>The optional "tail" marker indicates whether the callee function accesses
+ any allocas or varargs in the caller. If the "tail" marker is present, the
+ function call is eligible for tail call optimization. Note that calls may
+ be marked "tail" even if they do not occur before a <a
+ href="#i_ret"><tt>ret</tt></a> instruction.
+ </li>
+ <li>
+ <p>The optional "cconv" marker indicates which <a href="#callingconv">calling
+ convention</a> the call should use. If none is specified, the call defaults
+ to using C calling conventions.
+ </li>
+ <li>
+ <p>'<tt>ty</tt>': the type of the call instruction itself which is also
+ the type of the return value. Functions that return no value are marked
+ <tt><a href="#t_void">void</a></tt>.</p>
+ </li>
+ <li>
+ <p>'<tt>fnty</tt>': shall be the signature of the pointer to function
+ value being invoked. The argument types must match the types implied by
+ this signature. This type can be omitted if the function is not varargs
+ and if the function type does not return a pointer to a function.</p>
+ </li>
+ <li>
+ <p>'<tt>fnptrval</tt>': An LLVM value containing a pointer to a function to
+ be invoked. In most cases, this is a direct function invocation, but
+ indirect <tt>call</tt>s are just as possible, calling an arbitrary pointer
+ to function value.</p>
+ </li>
+ <li>
+ <p>'<tt>function args</tt>': argument list whose types match the
+ function signature argument types. All arguments must be of
+ <a href="#t_firstclass">first class</a> type. If the function signature
+ indicates the function accepts a variable number of arguments, the extra
+ arguments can be specified.</p>
+ </li>
+</ol>
+
+<h5>Semantics:</h5>
+
+<p>The '<tt>call</tt>' instruction is used to cause control flow to
+transfer to a specified function, with its incoming arguments bound to
+the specified values. Upon a '<tt><a href="#i_ret">ret</a></tt>'
+instruction in the called function, control flow continues with the
+instruction after the function call, and the return value of the
+function is bound to the result argument. If the callee returns multiple
+values then the return values of the function are only accessible through
+the '<tt><a href="#i_getresult">getresult</a></tt>' instruction.</p>
+
+<h5>Example:</h5>
+
+<pre>
+ %retval = call i32 @test(i32 %argc)
+ call i32 (i8 *, ...)* @printf(i8 * %msg, i32 12, i8 42) <i>; yields i32</i>
+ %X = tail call i32 @foo() <i>; yields i32</i>
+ %Y = tail call <a href="#callingconv">fastcc</a> i32 @foo() <i>; yields i32</i>
+ call void %foo(i8 97 signext)
+
+ %struct.A = type { i32, i8 }
+ %r = call %struct.A @foo() <i>; yields { 32, i8 }</i>
+ %gr = getresult %struct.A %r, 0 <i>; yields i32</i>
+ %gr1 = getresult %struct.A %r, 1 <i>; yields i8</i>
+</pre>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_va_arg">'<tt>va_arg</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+ <resultval> = va_arg <va_list*> <arglist>, <argty>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>va_arg</tt>' instruction is used to access arguments passed through
+the "variable argument" area of a function call. It is used to implement the
+<tt>va_arg</tt> macro in C.</p>
+
+<h5>Arguments:</h5>
+
+<p>This instruction takes a <tt>va_list*</tt> value and the type of
+the argument. It returns a value of the specified argument type and
+increments the <tt>va_list</tt> to point to the next argument. The
+actual type of <tt>va_list</tt> is target specific.</p>
+
+<h5>Semantics:</h5>
+
+<p>The '<tt>va_arg</tt>' instruction loads an argument of the specified
+type from the specified <tt>va_list</tt> and causes the
+<tt>va_list</tt> to point to the next argument. For more information,
+see the variable argument handling <a href="#int_varargs">Intrinsic
+Functions</a>.</p>
+
+<p>It is legal for this instruction to be called in a function which does not
+take a variable number of arguments, for example, the <tt>vfprintf</tt>
+function.</p>
+
+<p><tt>va_arg</tt> is an LLVM instruction instead of an <a
+href="#intrinsics">intrinsic function</a> because it takes a type as an
+argument.</p>
+
+<h5>Example:</h5>
+
+<p>See the <a href="#int_varargs">variable argument processing</a> section.</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_getresult">'<tt>getresult</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ <resultval> = getresult <type> <retval>, <index>
+</pre>
+
+<h5>Overview:</h5>
+
+<p> The '<tt>getresult</tt>' instruction is used to extract individual values
+from a '<tt><a href="#i_call">call</a></tt>'
+or '<tt><a href="#i_invoke">invoke</a></tt>' instruction that returns multiple
+results.</p>
+
+<h5>Arguments:</h5>
+
+<p>The '<tt>getresult</tt>' instruction takes a call or invoke value as its
+first argument, or an undef value. The value must have <a
+href="#t_struct">structure type</a>. The second argument is a constant
+unsigned index value which must be in range for the number of values returned
+by the call.</p>
+
+<h5>Semantics:</h5>
+
+<p>The '<tt>getresult</tt>' instruction extracts the element identified by
+'<tt>index</tt>' from the aggregate value.</p>
+
+<h5>Example:</h5>
+
+<pre>
+ %struct.A = type { i32, i8 }
+
+ %r = call %struct.A @foo()
+ %gr = getresult %struct.A %r, 0 <i>; yields i32:%gr</i>
+ %gr1 = getresult %struct.A %r, 1 <i>; yields i8:%gr1</i>
+ add i32 %gr, 42
+ add i8 %gr1, 41
+</pre>
+
+</div>
+
+<!-- *********************************************************************** -->
+<div class="doc_section"> <a name="intrinsics">Intrinsic Functions</a> </div>
+<!-- *********************************************************************** -->
+
+<div class="doc_text">
+
+<p>LLVM supports the notion of an "intrinsic function". These functions have
+well known names and semantics and are required to follow certain restrictions.
+Overall, these intrinsics represent an extension mechanism for the LLVM
+language that does not require changing all of the transformations in LLVM when
+adding to the language (or the bitcode reader/writer, the parser, etc...).</p>
+
+<p>Intrinsic function names must all start with an "<tt>llvm.</tt>" prefix. This
+prefix is reserved in LLVM for intrinsic names; thus, function names may not
+begin with this prefix. Intrinsic functions must always be external functions:
+you cannot define the body of intrinsic functions. Intrinsic functions may
+only be used in call or invoke instructions: it is illegal to take the address
+of an intrinsic function. Additionally, because intrinsic functions are part
+of the LLVM language, it is required if any are added that they be documented
+here.</p>
+
+<p>Some intrinsic functions can be overloaded, i.e., the intrinsic represents
+a family of functions that perform the same operation but on different data
+types. Because LLVM can represent over 8 million different integer types,
+overloading is used commonly to allow an intrinsic function to operate on any
+integer type. One or more of the argument types or the result type can be
+overloaded to accept any integer type. Argument types may also be defined as
+exactly matching a previous argument's type or the result type. This allows an
+intrinsic function which accepts multiple arguments, but needs all of them to
+be of the same type, to only be overloaded with respect to a single argument or
+the result.</p>
+
+<p>Overloaded intrinsics will have the names of its overloaded argument types
+encoded into its function name, each preceded by a period. Only those types
+which are overloaded result in a name suffix. Arguments whose type is matched
+against another type do not. For example, the <tt>llvm.ctpop</tt> function can
+take an integer of any width and returns an integer of exactly the same integer
+width. This leads to a family of functions such as
+<tt>i8 @llvm.ctpop.i8(i8 %val)</tt> and <tt>i29 @llvm.ctpop.i29(i29 %val)</tt>.
+Only one type, the return type, is overloaded, and only one type suffix is
+required. Because the argument's type is matched against the return type, it
+does not require its own name suffix.</p>
+
+<p>To learn how to add an intrinsic function, please see the
+<a href="ExtendingLLVM.html">Extending LLVM Guide</a>.
+</p>
+
+</div>
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+ <a name="int_varargs">Variable Argument Handling Intrinsics</a>
+</div>
+
+<div class="doc_text">
+
+<p>Variable argument support is defined in LLVM with the <a
+ href="#i_va_arg"><tt>va_arg</tt></a> instruction and these three
+intrinsic functions. These functions are related to the similarly
+named macros defined in the <tt><stdarg.h></tt> header file.</p>
+
+<p>All of these functions operate on arguments that use a
+target-specific value type "<tt>va_list</tt>". The LLVM assembly
+language reference manual does not define what this type is, so all
+transformations should be prepared to handle these functions regardless of
+the type used.</p>
+
+<p>This example shows how the <a href="#i_va_arg"><tt>va_arg</tt></a>
+instruction and the variable argument handling intrinsic functions are
+used.</p>
+
+<div class="doc_code">
+<pre>
+define i32 @test(i32 %X, ...) {
+ ; Initialize variable argument processing
+ %ap = alloca i8*
+ %ap2 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap2)
+
+ ; Read a single integer argument
+ %tmp = va_arg i8** %ap, i32
+
+ ; Demonstrate usage of llvm.va_copy and llvm.va_end
+ %aq = alloca i8*
+ %aq2 = bitcast i8** %aq to i8*
+ call void @llvm.va_copy(i8* %aq2, i8* %ap2)
+ call void @llvm.va_end(i8* %aq2)
+
+ ; Stop processing of arguments.
+ call void @llvm.va_end(i8* %ap2)
+ ret i32 %tmp
+}
+
+declare void @llvm.va_start(i8*)
+declare void @llvm.va_copy(i8*, i8*)
+declare void @llvm.va_end(i8*)
+</pre>
+</div>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_va_start">'<tt>llvm.va_start</tt>' Intrinsic</a>
+</div>
+
+
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> declare void %llvm.va_start(i8* <arglist>)<br></pre>
+<h5>Overview:</h5>
+<P>The '<tt>llvm.va_start</tt>' intrinsic initializes
+<tt>*<arglist></tt> for subsequent use by <tt><a
+href="#i_va_arg">va_arg</a></tt>.</p>
+
+<h5>Arguments:</h5>
+
+<P>The argument is a pointer to a <tt>va_list</tt> element to initialize.</p>
+
+<h5>Semantics:</h5>
+
+<P>The '<tt>llvm.va_start</tt>' intrinsic works just like the <tt>va_start</tt>
+macro available in C. In a target-dependent way, it initializes the
+<tt>va_list</tt> element to which the argument points, so that the next call to
+<tt>va_arg</tt> will produce the first variable argument passed to the function.
+Unlike the C <tt>va_start</tt> macro, this intrinsic does not need to know the
+last argument of the function as the compiler can figure that out.</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_va_end">'<tt>llvm.va_end</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> declare void @llvm.va_end(i8* <arglist>)<br></pre>
+<h5>Overview:</h5>
+
+<p>The '<tt>llvm.va_end</tt>' intrinsic destroys <tt>*<arglist></tt>,
+which has been initialized previously with <tt><a href="#int_va_start">llvm.va_start</a></tt>
+or <tt><a href="#i_va_copy">llvm.va_copy</a></tt>.</p>
+
+<h5>Arguments:</h5>
+
+<p>The argument is a pointer to a <tt>va_list</tt> to destroy.</p>
+
+<h5>Semantics:</h5>
+
+<p>The '<tt>llvm.va_end</tt>' intrinsic works just like the <tt>va_end</tt>
+macro available in C. In a target-dependent way, it destroys the
+<tt>va_list</tt> element to which the argument points. Calls to <a
+href="#int_va_start"><tt>llvm.va_start</tt></a> and <a href="#int_va_copy">
+<tt>llvm.va_copy</tt></a> must be matched exactly with calls to
+<tt>llvm.va_end</tt>.</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_va_copy">'<tt>llvm.va_copy</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+ declare void @llvm.va_copy(i8* <destarglist>, i8* <srcarglist>)
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>llvm.va_copy</tt>' intrinsic copies the current argument position
+from the source argument list to the destination argument list.</p>
+
+<h5>Arguments:</h5>
+
+<p>The first argument is a pointer to a <tt>va_list</tt> element to initialize.
+The second argument is a pointer to a <tt>va_list</tt> element to copy from.</p>
+
+
+<h5>Semantics:</h5>
+
+<p>The '<tt>llvm.va_copy</tt>' intrinsic works just like the <tt>va_copy</tt>
+macro available in C. In a target-dependent way, it copies the source
+<tt>va_list</tt> element into the destination <tt>va_list</tt> element. This
+intrinsic is necessary because the <tt><a href="#int_va_start">
+llvm.va_start</a></tt> intrinsic may be arbitrarily complex and require, for
+example, memory allocation.</p>
+
+</div>
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+ <a name="int_gc">Accurate Garbage Collection Intrinsics</a>
+</div>
+
+<div class="doc_text">
+
+<p>
+LLVM support for <a href="GarbageCollection.html">Accurate Garbage
+Collection</a> requires the implementation and generation of these intrinsics.
+These intrinsics allow identification of <a href="#int_gcroot">GC roots on the
+stack</a>, as well as garbage collector implementations that require <a
+href="#int_gcread">read</a> and <a href="#int_gcwrite">write</a> barriers.
+Front-ends for type-safe garbage collected languages should generate these
+intrinsics to make use of the LLVM garbage collectors. For more details, see <a
+href="GarbageCollection.html">Accurate Garbage Collection with LLVM</a>.
+</p>
+
+<p>The garbage collection intrinsics only operate on objects in the generic
+ address space (address space zero).</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_gcroot">'<tt>llvm.gcroot</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+ declare void @llvm.gcroot(i8** %ptrloc, i8* %metadata)
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>llvm.gcroot</tt>' intrinsic declares the existence of a GC root to
+the code generator, and allows some metadata to be associated with it.</p>
+
+<h5>Arguments:</h5>
+
+<p>The first argument specifies the address of a stack object that contains the
+root pointer. The second pointer (which must be either a constant or a global
+value address) contains the meta-data to be associated with the root.</p>
+
+<h5>Semantics:</h5>
+
+<p>At runtime, a call to this intrinsic stores a null pointer into the "ptrloc"
+location. At compile-time, the code generator generates information to allow
+the runtime to find the pointer at GC safe points. The '<tt>llvm.gcroot</tt>'
+intrinsic may only be used in a function which <a href="#gc">specifies a GC
+algorithm</a>.</p>
+
+</div>
+
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_gcread">'<tt>llvm.gcread</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+ declare i8* @llvm.gcread(i8* %ObjPtr, i8** %Ptr)
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>llvm.gcread</tt>' intrinsic identifies reads of references from heap
+locations, allowing garbage collector implementations that require read
+barriers.</p>
+
+<h5>Arguments:</h5>
+
+<p>The second argument is the address to read from, which should be an address
+allocated from the garbage collector. The first object is a pointer to the
+start of the referenced object, if needed by the language runtime (otherwise
+null).</p>
+
+<h5>Semantics:</h5>
+
+<p>The '<tt>llvm.gcread</tt>' intrinsic has the same semantics as a load
+instruction, but may be replaced with substantially more complex code by the
+garbage collector runtime, as needed. The '<tt>llvm.gcread</tt>' intrinsic
+may only be used in a function which <a href="#gc">specifies a GC
+algorithm</a>.</p>
+
+</div>
+
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_gcwrite">'<tt>llvm.gcwrite</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+ declare void @llvm.gcwrite(i8* %P1, i8* %Obj, i8** %P2)
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>llvm.gcwrite</tt>' intrinsic identifies writes of references to heap
+locations, allowing garbage collector implementations that require write
+barriers (such as generational or reference counting collectors).</p>
+
+<h5>Arguments:</h5>
+
+<p>The first argument is the reference to store, the second is the start of the
+object to store it to, and the third is the address of the field of Obj to
+store to. If the runtime does not require a pointer to the object, Obj may be
+null.</p>
+
+<h5>Semantics:</h5>
+
+<p>The '<tt>llvm.gcwrite</tt>' intrinsic has the same semantics as a store
+instruction, but may be replaced with substantially more complex code by the
+garbage collector runtime, as needed. The '<tt>llvm.gcwrite</tt>' intrinsic
+may only be used in a function which <a href="#gc">specifies a GC
+algorithm</a>.</p>
+
+</div>
+
+
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+ <a name="int_codegen">Code Generator Intrinsics</a>
+</div>
+
+<div class="doc_text">
+<p>
+These intrinsics are provided by LLVM to expose special features that may only
+be implemented with code generator support.
+</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_returnaddress">'<tt>llvm.returnaddress</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ declare i8 *@llvm.returnaddress(i32 <level>)
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>llvm.returnaddress</tt>' intrinsic attempts to compute a
+target-specific value indicating the return address of the current function
+or one of its callers.
+</p>
+
+<h5>Arguments:</h5>
+
+<p>
+The argument to this intrinsic indicates which function to return the address
+for. Zero indicates the calling function, one indicates its caller, etc. The
+argument is <b>required</b> to be a constant integer value.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The '<tt>llvm.returnaddress</tt>' intrinsic either returns a pointer indicating
+the return address of the specified call frame, or zero if it cannot be
+identified. The value returned by this intrinsic is likely to be incorrect or 0
+for arguments other than zero, so it should only be used for debugging purposes.
+</p>
+
+<p>
+Note that calling this intrinsic does not prevent function inlining or other
+aggressive transformations, so the value returned may not be that of the obvious
+source-language caller.
+</p>
+</div>
+
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_frameaddress">'<tt>llvm.frameaddress</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ declare i8 *@llvm.frameaddress(i32 <level>)
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>llvm.frameaddress</tt>' intrinsic attempts to return the
+target-specific frame pointer value for the specified stack frame.
+</p>
+
+<h5>Arguments:</h5>
+
+<p>
+The argument to this intrinsic indicates which function to return the frame
+pointer for. Zero indicates the calling function, one indicates its caller,
+etc. The argument is <b>required</b> to be a constant integer value.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The '<tt>llvm.frameaddress</tt>' intrinsic either returns a pointer indicating
+the frame address of the specified call frame, or zero if it cannot be
+identified. The value returned by this intrinsic is likely to be incorrect or 0
+for arguments other than zero, so it should only be used for debugging purposes.
+</p>
+
+<p>
+Note that calling this intrinsic does not prevent function inlining or other
+aggressive transformations, so the value returned may not be that of the obvious
+source-language caller.
+</p>