[llvm-commits] CVS: llvm/docs/LangRef.html

Reid Spencer reid at x10sys.com
Thu Jan 11 19:36:06 PST 2007



Changes in directory llvm/docs:

LangRef.html updated: 1.191 -> 1.192
---
Log message:

Update for changes in the assembly syntax. bool is replaced with i1.


---
Diffs of the changes:  (+34 -32)

 LangRef.html |   66 ++++++++++++++++++++++++++++++-----------------------------
 1 files changed, 34 insertions(+), 32 deletions(-)


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.191 llvm/docs/LangRef.html:1.192
--- llvm/docs/LangRef.html:1.191	Tue Jan  9 14:08:58 2007
+++ llvm/docs/LangRef.html	Thu Jan 11 21:35:51 2007
@@ -770,7 +770,7 @@
       <table>
         <tbody>
           <tr><th>Type</th><th>Description</th></tr>
-          <tr><td><tt>bool</tt></td><td>True or False value</td></tr>
+          <tr><td><tt>i1</tt></td><td>True or False value</td></tr>
           <tr><td><tt>i16</tt></td><td>Signless 16-bit value</td></tr>
           <tr><td><tt>i64</tt></td><td>Signless 64-bit value</td></tr>
          <tr><td><tt>double</tt></td><td>64-bit floating point value</td></tr>
@@ -797,7 +797,7 @@
     </tr>
     <tr>
       <td><a name="t_integral">integral</a></td>
-      <td><tt>bool, i8, i16, i32, i64</tt>
+      <td><tt>i1, i8, i16, i32, i64</tt>
       </td>
     </tr>
     <tr>
@@ -806,7 +806,7 @@
     </tr>
     <tr>
       <td><a name="t_firstclass">first class</a></td>
-      <td><tt>bool, i8, i16, i32, i64, float, double, <br/>
+      <td><tt>i1, i8, i16, i32, i64, float, double, <br/>
           <a href="#t_pointer">pointer</a>,<a href="#t_packed">packed</a></tt>
       </td>
     </tr>
@@ -1118,7 +1118,7 @@
   <dt><b>Boolean constants</b></dt>
 
   <dd>The two strings '<tt>true</tt>' and '<tt>false</tt>' are both valid
-  constants of the <tt><a href="#t_primitive">bool</a></tt> type.
+  constants of the <tt><a href="#t_primitive">i1</a></tt> type.
   </dd>
 
   <dt><b>Integer constants</b></dt>
@@ -1480,7 +1480,7 @@
 <div class="doc_subsubsection"> <a name="i_br">'<tt>br</tt>' Instruction</a> </div>
 <div class="doc_text">
 <h5>Syntax:</h5>
-<pre>  br bool <cond>, label <iftrue>, label <iffalse><br>  br label <dest>          <i>; Unconditional branch</i>
+<pre>  br i1 <cond>, label <iftrue>, label <iffalse><br>  br label <dest>          <i>; Unconditional branch</i>
 </pre>
 <h5>Overview:</h5>
 <p>The '<tt>br</tt>' instruction is used to cause control flow to
@@ -1489,16 +1489,16 @@
 and an unconditional branch.</p>
 <h5>Arguments:</h5>
 <p>The conditional branch form of the '<tt>br</tt>' instruction takes a
-single '<tt>bool</tt>' value and two '<tt>label</tt>' values.  The
+single '<tt>i1</tt>' value and two '<tt>label</tt>' values.  The
 unconditional form of the '<tt>br</tt>' instruction takes a single '<tt>label</tt>'
 value as a target.</p>
 <h5>Semantics:</h5>
-<p>Upon execution of a conditional '<tt>br</tt>' instruction, the '<tt>bool</tt>'
+<p>Upon execution of a conditional '<tt>br</tt>' instruction, the '<tt>i1</tt>'
 argument is evaluated.  If the value is <tt>true</tt>, control flows
 to the '<tt>iftrue</tt>' <tt>label</tt> argument.  If "cond" is <tt>false</tt>,
 control flows to the '<tt>iffalse</tt>' <tt>label</tt> argument.</p>
 <h5>Example:</h5>
-<pre>Test:<br>  %cond = <a href="#i_icmp">icmp</a> eq, i32 %a, %b<br>  br bool %cond, label %IfEqual, label %IfUnequal<br>IfEqual:<br>  <a
+<pre>Test:<br>  %cond = <a href="#i_icmp">icmp</a> eq, i32 %a, %b<br>  br i1 %cond, label %IfEqual, label %IfUnequal<br>IfEqual:<br>  <a
  href="#i_ret">ret</a> i32 1<br>IfUnequal:<br>  <a href="#i_ret">ret</a> i32 0<br></pre>
 </div>
 <!-- _______________________________________________________________________ -->
@@ -1547,7 +1547,7 @@
 
 <pre>
  <i>; Emulate a conditional br instruction</i>
- %Val = <a href="#i_zext">zext</a> bool %value to i32
+ %Val = <a href="#i_zext">zext</a> i1 %value to i32
  switch i32 %Val, label %truedest [i32 0, label %falsedest ]
 
  <i>; Emulate an unconditional br instruction</i>
@@ -2699,8 +2699,8 @@
 <h5>Example:</h5>
 <pre>
   %X = trunc i32 257 to i8              <i>; yields i8:1</i>
-  %Y = trunc i32 123 to bool               <i>; yields bool:true</i>
-  %Y = trunc i32 122 to bool               <i>; yields bool:false</i>
+  %Y = trunc i32 123 to i1              <i>; yields i1:true</i>
+  %Y = trunc i32 122 to i1              <i>; yields i1:false</i>
 </pre>
 </div>
 
@@ -2734,12 +2734,12 @@
 cast is considered a <i>no-op cast</i> because no bits change (only the type 
 changes).</p>
 
-<p>When zero extending from bool, the result will alwasy be either 0 or 1.</p>
+<p>When zero extending from i1, the result will alwasy be either 0 or 1.</p>
 
 <h5>Example:</h5>
 <pre>
   %X = zext i32 257 to i64              <i>; yields i64:257</i>
-  %Y = zext bool true to i32              <i>; yields i32:1</i>
+  %Y = zext i1 true to i32              <i>; yields i32:1</i>
 </pre>
 </div>
 
@@ -2773,12 +2773,12 @@
 no bit filling is done and the cast is considered a <i>no-op cast</i> because 
 no bits change (only the type changes).</p>
 
-<p>When sign extending from bool, the extension always results in -1 or 0.</p>
+<p>When sign extending from i1, the extension always results in -1 or 0.</p>
 
 <h5>Example:</h5>
 <pre>
   %X = sext i8  -1 to i16              <i>; yields i16   :65535</i>
-  %Y = sext bool true to i32             <i>; yields i32:-1</i>
+  %Y = sext i1 true to i32             <i>; yields i32:-1</i>
 </pre>
 </div>
 
@@ -2882,14 +2882,14 @@
 towards zero) unsigned integer value. If the value cannot fit in <tt>ty2</tt>,
 the results are undefined.</p>
 
-<p>When converting to bool, the conversion is done as a comparison against 
-zero. If the <tt>value</tt> was zero, the bool result will be <tt>false</tt>. 
-If the <tt>value</tt> was non-zero, the bool result will be <tt>true</tt>.</p>
+<p>When converting to i1, the conversion is done as a comparison against 
+zero. If the <tt>value</tt> was zero, the i1 result will be <tt>false</tt>. 
+If the <tt>value</tt> was non-zero, the i1 result will be <tt>true</tt>.</p>
 
 <h5>Example:</h5>
 <pre>
-  %X = fp2uint double 123.0 to i32         <i>; yields i32:123</i>
-  %Y = fp2uint float 1.0E+300 to bool      <i>; yields bool:true</i>
+  %X = fp2uint double 123.0 to i32      <i>; yields i32:123</i>
+  %Y = fp2uint float 1.0E+300 to i1     <i>; yields i1:true</i>
   %X = fp2uint float 1.04E+17 to i8     <i>; yields undefined:1</i>
 </pre>
 </div>
@@ -2922,14 +2922,14 @@
 towards zero) signed integer value. If the value cannot fit in <tt>ty2</tt>,
 the results are undefined.</p>
 
-<p>When converting to bool, the conversion is done as a comparison against 
-zero. If the <tt>value</tt> was zero, the bool result will be <tt>false</tt>. 
-If the <tt>value</tt> was non-zero, the bool result will be <tt>true</tt>.</p>
+<p>When converting to i1, the conversion is done as a comparison against 
+zero. If the <tt>value</tt> was zero, the i1 result will be <tt>false</tt>. 
+If the <tt>value</tt> was non-zero, the i1 result will be <tt>true</tt>.</p>
 
 <h5>Example:</h5>
 <pre>
-  %X = fptosi double -123.0 to i32        <i>; yields i32:-123</i>
-  %Y = fptosi float 1.0E-247 to bool      <i>; yields bool:true</i>
+  %X = fptosi double -123.0 to i32      <i>; yields i32:-123</i>
+  %Y = fptosi float 1.0E-247 to i1      <i>; yields i1:true</i>
   %X = fptosi float 1.04E+17 to i8      <i>; yields undefined:1</i>
 </pre>
 </div>
@@ -3122,7 +3122,8 @@
 </div>
 <div class="doc_text">
 <h5>Syntax:</h5>
-<pre>  <result> = icmp <cond> <ty> <var1>, <var2>   <i>; yields {bool}:result</i>
+<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
@@ -3148,7 +3149,7 @@
 <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_bool">bool</a> result, as follows: 
+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.
@@ -3194,7 +3195,8 @@
 </div>
 <div class="doc_text">
 <h5>Syntax:</h5>
-<pre>  <result> = fcmp <cond> <ty> <var1>, <var2>   <i>; yields {bool}:result</i>
+<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
@@ -3231,7 +3233,7 @@
 <h5>Semantics:</h5>
 <p>The '<tt>fcmp</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_bool">bool</a> result, as follows: 
+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 
@@ -3311,7 +3313,7 @@
 <h5>Syntax:</h5>
 
 <pre>
-  <result> = select bool <cond>, <ty> <val1>, <ty> <val2>             <i>; yields ty</i>
+  <result> = select i1 <cond>, <ty> <val1>, <ty> <val2>             <i>; yields ty</i>
 </pre>
 
 <h5>Overview:</h5>
@@ -3338,7 +3340,7 @@
 <h5>Example:</h5>
 
 <pre>
-  %X = select bool true, i8 17, i8 42          <i>; yields i8:17</i>
+  %X = select i1 true, i8 17, i8 42          <i>; yields i8:17</i>
 </pre>
 </div>
 
@@ -4476,7 +4478,7 @@
 
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2007/01/09 20:08:58 $
+  Last modified: $Date: 2007/01/12 03:35:51 $
 </address>
 </body>
 </html>






More information about the llvm-commits mailing list