summaryrefslogtreecommitdiffstats
path: root/docs/LangRef.html
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-05-03 18:01:48 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-05-03 18:01:48 +0000
commitec370fd3dce3c00cb0a5665cd3e65685325e7d09 (patch)
treec851ac37b2477623d4928a91d4118b4d33aa60b1 /docs/LangRef.html
parent691ef2ba066dda14ae4ac0ad645054fbc967785a (diff)
downloadexternal_llvm-ec370fd3dce3c00cb0a5665cd3e65685325e7d09.zip
external_llvm-ec370fd3dce3c00cb0a5665cd3e65685325e7d09.tar.gz
external_llvm-ec370fd3dce3c00cb0a5665cd3e65685325e7d09.tar.bz2
initial descriptions of count intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r--docs/LangRef.html117
1 files changed, 117 insertions, 0 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 1e6b3d7..f313aed 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -145,6 +145,13 @@
<li><a href="#i_isunordered">'<tt>llvm.isunordered</tt>' Intrinsic</a></li>
</ol>
</li>
+ <li><a href="#int_count">Bit counting Intrinsics</a>
+ <ol>
+ <li><a href="#int_ctpop">'<tt>llvm.ctpop</tt>' Intrinsic </a></li>
+ <li><a href="#int_cttz">'<tt>llvm.cttz</tt>' Intrinsic </a></li>
+ <li><a href="#int_ctlz">'<tt>llvm.ctlz</tt>' Intrinsic </a></li>
+ </ol>
+ </li>
<li><a href="#int_debugger">Debugger intrinsics</a></li>
</ol>
</li>
@@ -3029,6 +3036,116 @@ false.
</div>
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+ <a name="int_count">Bit Counting Intrinsics</a>
+</div>
+
+<div class="doc_text">
+<p>
+LLVM provides intrinsics for a few important bit counting operations.
+These allow efficient code generation for some algorithms.
+</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_ctpop">'<tt>llvm.ctpop</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ declare int %llvm.ctpop(int &lt;src&gt;)
+
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>llvm.ctpop</tt>' intrinsic counts the number of ones in a variable.
+</p>
+
+<h5>Arguments:</h5>
+
+<p>
+The only argument is the value to be counted.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The '<tt>llvm.ctpop</tt>' intrinsic counts the 1's in a variable.
+</p>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_cttz">'<tt>llvm.cttz</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ declare int %llvm.cttz(int &lt;src&gt;)
+
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>llvm.cttz</tt>' intrinsic counts the number of trailing zeros.
+</p>
+
+<h5>Arguments:</h5>
+
+<p>
+The only argument is the value to be counted.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The '<tt>llvm.cttz</tt>' intrinsic counts the trailing zeros in a variable. If the src == 0
+then the result is the size in bits of the type of src.
+</p>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="int_ctlz">'<tt>llvm.ctlz</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ declare int %llvm.ctlz(int &lt;src&gt;)
+
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>llvm.ctlz</tt>' intrinsic counts the number of leading zeros in a variable.
+</p>
+
+<h5>Arguments:</h5>
+
+<p>
+The only argument is the value to be counted.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The '<tt>llvm.ctlz</tt>' intrinsic counts the leading zeros in a variable. If the src == 0
+then the result is the size in bits of the type of src.
+</p>
+</div>
<!-- ======================================================================= -->