From: Andrew Lenharth Date: Tue, 3 May 2005 18:01:48 +0000 (+0000) Subject: initial descriptions of count intrinsics X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ec370fd3dce3c00cb0a5665cd3e65685325e7d09;p=oota-llvm.git initial descriptions of count intrinsics git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21677 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/LangRef.html b/docs/LangRef.html index 1e6b3d7c2ac..f313aed782b 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -145,6 +145,13 @@
  • 'llvm.isunordered' Intrinsic
  • +
  • Bit counting Intrinsics +
      +
    1. 'llvm.ctpop' Intrinsic
    2. +
    3. 'llvm.cttz' Intrinsic
    4. +
    5. 'llvm.ctlz' Intrinsic
    6. +
    +
  • Debugger intrinsics
  • @@ -3029,6 +3036,116 @@ false. + +
    + Bit Counting Intrinsics +
    + +
    +

    +LLVM provides intrinsics for a few important bit counting operations. +These allow efficient code generation for some algorithms. +

    + +
    + + +
    + 'llvm.ctpop' Intrinsic +
    + +
    + +
    Syntax:
    +
    +  declare int %llvm.ctpop(int <src>)
    +
    +
    + +
    Overview:
    + +

    +The 'llvm.ctpop' intrinsic counts the number of ones in a variable. +

    + +
    Arguments:
    + +

    +The only argument is the value to be counted. +

    + +
    Semantics:
    + +

    +The 'llvm.ctpop' intrinsic counts the 1's in a variable. +

    +
    + + +
    + 'llvm.cttz' Intrinsic +
    + +
    + +
    Syntax:
    +
    +  declare int %llvm.cttz(int <src>)
    +
    +
    + +
    Overview:
    + +

    +The 'llvm.cttz' intrinsic counts the number of trailing zeros. +

    + +
    Arguments:
    + +

    +The only argument is the value to be counted. +

    + +
    Semantics:
    + +

    +The 'llvm.cttz' 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. +

    +
    + + +
    + 'llvm.ctlz' Intrinsic +
    + +
    + +
    Syntax:
    +
    +  declare int %llvm.ctlz(int <src>)
    +
    +
    + +
    Overview:
    + +

    +The 'llvm.ctlz' intrinsic counts the number of leading zeros in a variable. +

    + +
    Arguments:
    + +

    +The only argument is the value to be counted. +

    + +
    Semantics:
    + +

    +The 'llvm.ctlz' 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. +

    +