From c1d50e71375bf4b2a02ede53766996ad37be4256 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 31 Dec 2006 07:07:53 +0000 Subject: [PATCH] For PR950: Update for signless integer types: 1. Replace [us]byte with i8 2. Replace [u]short with i16 3. Replace [u]int with i32 4. Replace [u]long with i64 5. Document the "define" keyword and use it in all examples. 6. Document parameter attributes and how they affect function types. llvm-svn: 32791 --- docs/LangRef.html | 582 ++++++++++++++++++++++++---------------------- 1 file changed, 306 insertions(+), 276 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index 3af8b68a228..f87af54978d 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -24,6 +24,7 @@
  • Calling Conventions
  • Global Variables
  • Functions
  • +
  • Parameter Attributes
  • Module-Level Inline Assembly
  • @@ -248,7 +249,7 @@ accepts and what is considered 'well formed'. For example, the following instruction is syntactically okay, but not well formed:

    -  %x = add int 1, %x
    +  %x = add i32 1, %x
     

    ...because the definition of %x does not dominate all of @@ -296,7 +297,7 @@ languages. There are keywords for different opcodes ('add', 'bitcast', 'ret', etc...), for primitive type names ('void', 'uint', etc...), +href="#t_void">void', 'i32', etc...), and others. These reserved words cannot conflict with variable names, because none of them start with a '%' character.

    @@ -306,21 +307,21 @@ none of them start with a '%' character.

    The easy way:

    -  %result = mul uint %X, 8
    +  %result = mul i32 %X, 8
     

    After strength reduction:

    -  %result = shl uint %X, ubyte 3
    +  %result = shl i32 %X, i8 3
     

    And the hard way:

    -  add uint %X, %X           ; yields {uint}:%0
    -  add uint %0, %0           ; yields {uint}:%1
    -  %result = add uint %1, %1
    +  add i32 %X, %X           ; yields {i32}:%0
    +  add i32 %0, %0           ; yields {i32}:%1
    +  %result = add i32 %1, %1
     

    This last way of multiplying %X by 8 illustrates several @@ -364,25 +365,25 @@ symbol table entries. Here is an example of the "hello world" module:

    ; Declare the string constant as a global constant...
     %.LC0 = internal constant [13 x sbyte] c"hello world\0A\00"          ; [13 x sbyte]*
    + href="#globalvars">constant [13 x i8 ] c"hello world\0A\00"          ; [13 x i8 ]*
     
     ; External declaration of the puts function
    -declare int %puts(sbyte*)                                            ; int(sbyte*)* 
    +declare i32 %puts(i8 *)                                            ; i32(i8 *)* 
     
     ; Global variable / Function body section separator
     implementation
     
     ; Definition of main function
    -int %main() {                                                        ; int()* 
    -        ; Convert [13x sbyte]* to sbyte *...
    +define i32 %main() {                                                 ; i32()* 
    +        ; Convert [13x i8 ]* to i8  *...
             %cast210 = getelementptr [13 x sbyte]* %.LC0, long 0, long 0 ; sbyte*
    + href="#i_getelementptr">getelementptr [13 x i8 ]* %.LC0, i64 0, i64 0 ; i8 *
     
             ; Call puts function to write out the string to stdout...
             call int %puts(sbyte* %cast210)                              ; int
    + href="#i_call">call i32 %puts(i8 * %cast210)                              ; i32
             ret int 0
    }
    + href="#i_ret">ret i32 0
    }

    This example is made up of a global variable named ".LC0", an external declaration of the "puts" @@ -440,7 +441,7 @@ All Global Variables and Functions have one of the following types of linkage:

    "weak" linkage is exactly the same as linkonce linkage, except that unreferenced weak globals may not be discarded. This is - used to implement constructs in C such as "int X;" at global scope. + used to implement constructs in C such as "i32 X;" at global scope.
    appending:
    @@ -646,14 +647,18 @@ a power of 2.

    -

    LLVM function definitions consist of an optional linkage -type, an optional calling convention, a return -type, a function name, a (possibly empty) argument list, an optional section, -an optional alignment, an opening curly brace, -a list of basic blocks, and a closing curly brace. LLVM function declarations -are defined with the "declare" keyword, an optional calling convention, a return type, a function name, -a possibly empty list of arguments, and an optional alignment.

    +

    LLVM function definitions consist of the "define" keyord, +an optional linkage type, an optional +calling convention, a return type, an optional +parameter attribute for the return type, a function +name, a (possibly empty) argument list (each with optional +parameter attributes, an optional section, an optional +alignment, an opening curly brace, a list of basic blocks, and a closing curly +brace. LLVM function declarations +are consist of the "declare" keyword, an optional calling convention, a return type, an optional +parameter attribute for the return type, a function +name, a possibly empty list of arguments, and an optional alignment.

    A function definition contains a list of basic blocks, forming the CFG for the function. Each basic block may optionally start with a label (giving the @@ -683,6 +688,42 @@ a power of 2.

    + +
    Parameter Attributes
    +
    +

    The return type and each parameter of a function type may have a set of + parameter attributes associated with them. Parameter attributes are + used to communicate additional information about the result or parameters of + a function. Parameter attributes are considered to be part of the function + type so two functions types that differ only by the parameter attributes + are different function types.

    + +

    Parameter attributes consist of a at sign (@) followed by either a single + keyword or a comma separate list of keywords enclosed in parentheses. For + example:

    +    %someFunc = i16 @zext (i8 @(sext) %someParam)
    +    %someFunc = i16 @zext (i8 @zext %someParam)
    +  
    Note that the two function types above are unique because the parameter + has a different attribute (@sext in the first one, @zext in the second).

    + +

    Currently, only the following parameter attributes are defined: +

    +
    @zext
    +
    This indicates that the parameter should be zero extended just before + a call to this function.
    +
    @sext
    +
    This indicates that the parameter should be sign extended just before + a call to this function.
    +

    + +

    The current motivation for parameter attributes is to enable the sign and + zero extend information necessary for the C calling convention to be passed + from the front end to LLVM. The @zext and @sext attributes + are used by the code generator to perform the required extension. However, + parameter attributes are an orthogonal feature to calling conventions and + may be used for other purposes in the future.

    +
    +
    Module-Level Inline Assembly @@ -742,10 +783,8 @@ system. The current set of primitive types is as follows:

    TypeDescription voidNo value - ubyteUnsigned 8-bit value - ushortUnsigned 16-bit value - uintUnsigned 32-bit value - ulongUnsigned 64-bit value + i8Signless 8-bit value + i32Signless 32-bit value float32-bit floating point value labelBranch destination @@ -756,11 +795,9 @@ system. The current set of primitive types is as follows:

    TypeDescription boolTrue or False value - sbyteSigned 8-bit value - shortSigned 16-bit value - intSigned 32-bit value - longSigned 64-bit value - double64-bit floating point value + i16Signless 16-bit value + i64Signless 64-bit value + double64-bit floating point value @@ -778,21 +815,13 @@ classifications:

    - - - - - - - - - + - @@ -801,9 +830,9 @@ classifications:

    - +
    ClassificationTypes
    signedsbyte, short, int, long, float, double
    unsignedubyte, ushort, uint, ulong
    integerubyte, sbyte, ushort, short, uint, int, ulong, longi8, i16, i32, i64
    integralbool, ubyte, sbyte, ushort, short, uint, int, ulong, long + bool, i8, i16, i32, i64
    first classbool, ubyte, sbyte, ushort, short, uint, int, ulong, long,
    - float, double, pointer, - packed
    bool, i8, i16, i32, i64, float, double,
    + pointer,packed
    +
    @@ -851,9 +880,9 @@ be any type with a size.

    - [40 x int ]
    - [41 x int ]
    - [40 x uint]
    + [40 x i32 ]
    + [41 x i32 ]
    + [40 x i32]
    Array of 40 integer values.
    @@ -866,9 +895,9 @@ be any type with a size.

    @@ -945,14 +975,14 @@ instruction.

    - [3 x [4 x int]]
    + [3 x [4 x i32]]
    [12 x [10 x float]]
    - [2 x [3 x [4 x uint]]]
    + [2 x [3 x [4 x i32]]]
    3x4 array of integer values.
    @@ -883,7 +912,7 @@ length array. Normally, accesses past the end of an array are undefined in LLVM (e.g. it is illegal to access the 5th element of a 3 element array). As a special case, however, zero length arrays are recognized to be variable length. This allows implementation of 'pascal style arrays' with the LLVM -type "{ int, [0 x float]}", for example.

    +type "{ i32, [0 x float]}", for example.

    @@ -910,17 +939,18 @@ Variable argument functions can access their arguments with the
    - int (int)
    - float (int, int *) *
    - int (sbyte *, ...)
    + i32 (i32)
    + float (i16 @sext, i32 *) *
    + i32 (i8*, ...)
    - function taking an int, returning an int
    + function taking an i32, returning an i32
    Pointer to a function that takes an - int and a pointer to int, - returning float.
    - A vararg function that takes at least one pointer - to sbyte (signed char in C), which returns an integer. This is + i16 that should be sign extended and a + pointer to i32, returning + float.
    + A vararg function that takes at least one pointer + to i8 (signed char in C), which returns an integer. This is the signature for printf in LLVM.
    - { int, int, int }
    - { float, int (int) * }
    + { i32, i32, i32 }
    + { float, i32 (i32) * }
    - a triple of three int values
    + a triple of three i32 values
    A pair, where the first element is a float and the second element is a pointer to a function - that takes an int, returning an int.
    + that takes an i32, returning an i32.
    @@ -977,14 +1007,14 @@ instruction.

    - < { int, int, int } >
    - < { float, int (int) * } >
    + < { i32, i32, i32 } >
    + < { float, i32 (i32) * } >
    - a triple of three int values
    + a triple of three i32 values
    A pair, where the first element is a float and the second element is a pointer to a function - that takes an int, returning an int.
    + that takes an i32, returning an i32.
    @@ -1002,15 +1032,15 @@ reference to another object, which must live in memory.

    - [4x int]*
    - int (int *) *
    + [4x i32]*
    + i32 (i32 *) *
    A pointer to array of - four int values
    + four i32 values
    A pointer to a function that takes an int*, returning an - int.
    + href="#t_function">function that takes an i32*, returning an + i32.
    @@ -1044,9 +1074,9 @@ be any integral or floating point type.

    - <4 x int>
    + <4 x i32>
    <8 x float>
    - <2 x uint>
    + <2 x i32>
    Packed vector of 4 integer values.
    @@ -1158,8 +1188,8 @@ and smaller aggregate constants.

    Structure constants are represented with notation similar to structure type definitions (a comma separated list of elements, surrounded by braces - ({})). For example: "{ int 4, float 17.0, int* %G }", - where "%G" is declared as "%G = external global int". Structure constants + ({})). For example: "{ i32 4, float 17.0, i32* %G }", + where "%G" is declared as "%G = external global i32". Structure constants must have structure type, and the number and types of elements must match those specified by the type.
    @@ -1168,7 +1198,7 @@ and smaller aggregate constants.

    Array constants are represented with notation similar to array type definitions (a comma separated list of elements, surrounded by square brackets - ([])). For example: "[ int 42, int 11, int 74 ]". Array + ([])). For example: "[ i32 42, i32 11, i32 74 ]". Array constants must have array type, and the number and types of elements must match those specified by the type.
    @@ -1177,8 +1207,8 @@ and smaller aggregate constants.

    Packed constants are represented with notation similar to packed type definitions (a comma separated list of elements, surrounded by - less-than/greater-than's (<>)). For example: "< int 42, - int 11, int 74, int 100 >". Packed constants must have <>)). For example: "< i32 42, + i32 11, i32 74, i32 100 >". Packed constants must have packed type, and the number and types of elements must match those specified by the type.
    @@ -1210,9 +1240,9 @@ href="#t_pointer">pointer type. For example, the following is a legal LLVM file:

    -  %X = global int 17
    -  %Y = global int 42
    -  %Z = global [2 x int*] [ int* %X, int* %Y ]
    +  %X = global i32 17
    +  %Y = global i32 42
    +  %Z = global [2 x i32*] [ i32* %X, i32* %Y ]
     
    @@ -1368,7 +1398,7 @@ inline assembler expression is:

    -  int(int) asm "bswap $0", "=r,r"
    +  i32 (i32) asm "bswap $0", "=r,r"
     

    @@ -1377,7 +1407,7 @@ a call instruction. Thus, typically we have:

    -  %X = call int asm "bswap $0", "=r,r"(int %Y)
    +  %X = call i32 asm "bswap $0", "=r,r"(i32 %Y)
     

    @@ -1463,7 +1493,7 @@ at the beginning of the "normal" destination block. If the instruction returns a value, that value shall set the call or invoke instruction's return value.

    Example:
    -
      ret int 5                       ; Return an integer value of 5
    +
      ret i32 5                       ; Return an integer value of 5
       ret void                        ; Return from a void function
     
    @@ -1489,8 +1519,8 @@ argument is evaluated. If the value is true, control flows to the 'iftrue' label argument. If "cond" is false, control flows to the 'iffalse' label argument.

    Example:
    -
    Test:
    %cond = icmp eq, int %a, %b
    br bool %cond, label %IfEqual, label %IfUnequal
    IfEqual:
    ret int 1
    IfUnequal:
    ret int 0
    +
    Test:
    %cond = icmp eq, i32 %a, %b
    br bool %cond, label %IfEqual, label %IfUnequal
    IfEqual:
    ret i32 1
    IfUnequal:
    ret i32 0
    @@ -1538,16 +1568,16 @@ branches or with a lookup table.

      ; Emulate a conditional br instruction
    - %Val = zext bool %value to int
    - switch int %Val, label %truedest [int 0, label %falsedest ]
    + %Val = zext bool %value to i32
    + switch i32 %Val, label %truedest [i32 0, label %falsedest ]
     
      ; Emulate an unconditional br instruction
    - switch uint 0, label %dest [ ]
    + switch i32 0, label %dest [ ]
     
      ; Implement a jump table:
    - switch uint %val, label %otherwise [ uint 0, label %onzero 
    -                                      uint 1, label %onone 
    -                                      uint 2, label %ontwo ]
    + switch i32 %val, label %otherwise [ i32 0, label %onzero 
    +                                      i32 1, label %onone 
    +                                      i32 2, label %ontwo ]
     
    @@ -1622,10 +1652,10 @@ exception. Additionally, this is important for implementation of
    Example:
    -  %retval = invoke int %Test(int 15)             to label %Continue
    -              unwind label %TestCleanup     ; {int}:retval set
    -  %retval = invoke coldcc int %Test(int 15)             to label %Continue
    -              unwind label %TestCleanup     ; {int}:retval set
    +  %retval = invoke i32 %Test(i32 15)             to label %Continue
    +              unwind label %TestCleanup     ; {i32}:retval set
    +  %retval = invoke coldcc i32 %Test(i32 15)             to label %Continue
    +              unwind label %TestCleanup     ; {i32}:retval set
     
    @@ -1714,7 +1744,7 @@ Both arguments must have identical types.

    The value produced is the integer or floating point sum of the two operands.

    Example:
    -
      <result> = add int 4, %var          ; yields {int}:result = 4 + %var
    +
      <result> = add i32 4, %var          ; yields {i32}:result = 4 + %var
     
    @@ -1739,8 +1769,8 @@ Both arguments must have identical types.

    The value produced is the integer or floating point difference of the two operands.

    Example:
    -
      <result> = sub int 4, %var          ; yields {int}:result = 4 - %var
    -  <result> = sub int 0, %val          ; yields {int}:result = -%var
    +
      <result> = sub i32 4, %var          ; yields {i32}:result = 4 - %var
    +  <result> = sub i32 0, %val          ; yields {i32}:result = -%var
     
    @@ -1765,7 +1795,7 @@ two operands.

    There is no signed vs unsigned multiplication. The appropriate action is taken based on the type of the operand.

    Example:
    -
      <result> = mul int 4, %var          ; yields {int}:result = 4 * %var
    +
      <result> = mul i32 4, %var          ; yields {i32}:result = 4 * %var
     
    @@ -1788,7 +1818,7 @@ of the values in which case the elements must be integers.

    instruction always performs an unsigned division operation, regardless of whether the arguments are unsigned or not.

    Example:
    -
      <result> = udiv uint 4, %var          ; yields {uint}:result = 4 / %var
    +
      <result> = udiv i32 4, %var          ; yields {i32}:result = 4 / %var
     
    @@ -1811,7 +1841,7 @@ of the values in which case the elements must be integers.

    instruction always performs a signed division operation, regardless of whether the arguments are signed or not.

    Example:
    -
      <result> = sdiv int 4, %var          ; yields {int}:result = 4 / %var
    +
      <result> = sdiv i32 4, %var          ; yields {i32}:result = 4 / %var
     
    @@ -1854,7 +1884,7 @@ types.

    This instruction always performs an unsigned division to get the remainder, regardless of whether the arguments are unsigned or not.

    Example:
    -
      <result> = urem uint 4, %var          ; yields {uint}:result = 4 % %var
    +
      <result> = urem i32 4, %var          ; yields {i32}:result = 4 % %var
     
    @@ -1880,7 +1910,7 @@ information about the difference, see The Math Forum.

    Example:
    -
      <result> = srem int 4, %var          ; yields {int}:result = 4 % %var
    +
      <result> = srem i32 4, %var          ; yields {i32}:result = 4 % %var
     
    @@ -1965,9 +1995,9 @@ identical types.

    Example:
    -
      <result> = and int 4, %var         ; yields {int}:result = 4 & %var
    -  <result> = and int 15, 40          ; yields {int}:result = 8
    -  <result> = and int 4, 8            ; yields {int}:result = 0
    +
      <result> = and i32 4, %var         ; yields {i32}:result = 4 & %var
    +  <result> = and i32 15, 40          ; yields {i32}:result = 8
    +  <result> = and i32 4, 8            ; yields {i32}:result = 0
     
    @@ -2018,9 +2048,9 @@ identical types.

    Example:
    -
      <result> = or int 4, %var         ; yields {int}:result = 4 | %var
    -  <result> = or int 15, 40          ; yields {int}:result = 47
    -  <result> = or int 4, 8            ; yields {int}:result = 12
    +
      <result> = or i32 4, %var         ; yields {i32}:result = 4 | %var
    +  <result> = or i32 15, 40          ; yields {i32}:result = 47
    +  <result> = or i32 4, 8            ; yields {i32}:result = 12
     
    @@ -2074,10 +2104,10 @@ identical types.

    Example:
    -
      <result> = xor int 4, %var         ; yields {int}:result = 4 ^ %var
    -  <result> = xor int 15, 40          ; yields {int}:result = 39
    -  <result> = xor int 4, 8            ; yields {int}:result = 12
    -  <result> = xor int %V, -1          ; yields {int}:result = ~%V
    +
      <result> = xor i32 4, %var         ; yields {i32}:result = 4 ^ %var
    +  <result> = xor i32 15, 40          ; yields {i32}:result = 39
    +  <result> = xor i32 4, 8            ; yields {i32}:result = 12
    +  <result> = xor i32 %V, -1          ; yields {i32}:result = ~%V
     
    @@ -2085,21 +2115,21 @@ identical types.

    Instruction
    Syntax:
    -
      <result> = shl <ty> <var1>, ubyte <var2>   ; yields {ty}:result
    +
      <result> = shl <ty> <var1>, i8 <var2>   ; yields {ty}:result
     
    Overview:

    The 'shl' instruction returns the first operand shifted to the left a specified number of bits.

    Arguments:

    The first argument to the 'shl' instruction must be an integer type. The second argument must be an 'ubyte' + href="#t_integer">integer type. The second argument must be an 'i8' type.

    Semantics:

    The value produced is var1 * 2var2.

    Example:
    -
      <result> = shl int 4, ubyte %var   ; yields {int}:result = 4 << %var
    -  <result> = shl int 4, ubyte 2      ; yields {int}:result = 16
    -  <result> = shl int 1, ubyte 10     ; yields {int}:result = 1024
    +
      <result> = shl i32 4, i8 %var   ; yields {i32}:result = 4 << %var
    +  <result> = shl i32 4, i8 2      ; yields {i32}:result = 16
    +  <result> = shl i32 1, i8 10     ; yields {i32}:result = 1024
     
    @@ -2107,7 +2137,7 @@ type.

    Instruction
    Syntax:
    -
      <result> = lshr <ty> <var1>, ubyte <var2>   ; yields {ty}:result
    +
      <result> = lshr <ty> <var1>, i8 <var2>   ; yields {ty}:result
     
    Overview:
    @@ -2116,7 +2146,7 @@ operand shifted to the right a specified number of bits.

    Arguments:

    The first argument to the 'lshr' instruction must be an integer type. The second argument must be an 'ubyte' type.

    + href="#t_integer">integer type. The second argument must be an 'i8' type.

    Semantics:

    This instruction always performs a logical shift right operation, regardless @@ -2125,10 +2155,10 @@ bits will be filled with zero bits after the shift.

    Example:
    -  <result> = lshr uint 4, ubyte 1   ; yields {uint}:result = 2
    -  <result> = lshr int 4, ubyte 2    ; yields {uint}:result = 1
    -  <result> = lshr sbyte 4, ubyte 3  ; yields {sbyte}:result = 0
    -  <result> = lshr sbyte -2, ubyte 1 ; yields {sbyte}:result = 0x7FFFFFFF 
    +  <result> = lshr i32 4, i8 1   ; yields {i32}:result = 2
    +  <result> = lshr i32 4, i8 2    ; yields {i32}:result = 1
    +  <result> = lshr i8  4, i8 3  ; yields {i8 }:result = 0
    +  <result> = lshr i8  -2, i8 1 ; yields {i8 }:result = 0x7FFFFFFF 
     
    @@ -2138,7 +2168,7 @@ Instruction
    Syntax:
    -
      <result> = ashr <ty> <var1>, ubyte <var2>   ; yields {ty}:result
    +
      <result> = ashr <ty> <var1>, i8 <var2>   ; yields {ty}:result
     
    Overview:
    @@ -2148,7 +2178,7 @@ operand shifted to the right a specified number of bits.

    Arguments:

    The first argument to the 'ashr' instruction must be an integer type. The second argument must be an -'ubyte' type.

    +'i8' type.

    Semantics:

    This instruction always performs an arithmetic shift right operation, @@ -2157,10 +2187,10 @@ significant bits will be filled with the sign bit of var1.

    Example:
    -  <result> = ashr uint 4, ubyte 1    ; yields {uint}:result = 2
    -  <result> = ashr int 4, ubyte 2      ; yields {int}:result = 1
    -  <result> = ashr ubyte 4, ubyte 3    ; yields {ubyte}:result = 0
    -  <result> = ashr sbyte -2, ubyte 1   ; yields {sbyte}:result = -1
    +  <result> = ashr i32 4, i8 1    ; yields {i32}:result = 2
    +  <result> = ashr i32 4, i8 2      ; yields {i32}:result = 1
    +  <result> = ashr i8 4, i8 3    ; yields {i8}:result = 0
    +  <result> = ashr i8  -2, i8 1   ; yields {i8 }:result = -1
     
    @@ -2190,7 +2220,7 @@ target.

    Syntax:
    -  <result> = extractelement <n x <ty>> <val>, uint <idx>    ; yields <ty>
    +  <result> = extractelement <n x <ty>> <val>, i32 <idx>    ; yields <ty>
     
    Overview:
    @@ -2221,7 +2251,7 @@ results are undefined.
    Example:
    -  %result = extractelement <4 x int> %vec, uint 0    ; yields int
    +  %result = extractelement <4 x i32> %vec, i32 0    ; yields i32
     
    @@ -2236,7 +2266,7 @@ results are undefined.
    Syntax:
    -  <result> = insertelement <n x <ty>> <val>, <ty> <elt>, uint <idx>    ; yields <n x <ty>>
    +  <result> = insertelement <n x <ty>> <val>, <ty> <elt>, i32 <idx>    ; yields <n x <ty>>
     
    Overview:
    @@ -2268,7 +2298,7 @@ exceeds the length of val, the results are undefined.
    Example:
    -  %result = insertelement <4 x int> %vec, int 1, uint 0    ; yields <4 x int>
    +  %result = insertelement <4 x i32> %vec, i32 1, i32 0    ; yields <4 x i32>
     
    @@ -2282,7 +2312,7 @@ exceeds the length of val, the results are undefined.
    Syntax:
    -  <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <n x uint> <mask>    ; yields <n x <ty>>
    +  <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <n x i32> <mask>    ; yields <n x <ty>>
     
    Overview:
    @@ -2298,7 +2328,7 @@ from two input vectors, returning a vector of the same type. The first two operands of a 'shufflevector' instruction are vectors with types that match each other and types that match the result of the instruction. The third argument is a shuffle mask, which has the same number -of elements as the other vector type, but whose element type is always 'uint'. +of elements as the other vector type, but whose element type is always 'i32'.

    @@ -2319,10 +2349,10 @@ operand may be undef if performing a shuffle from only one vector.

    Example:
    -  %result = shufflevector <4 x int> %v1, <4 x int> %v2, 
    -                          <4 x uint> <uint 0, uint 4, uint 1, uint 5>    ; yields <4 x int>
    -  %result = shufflevector <4 x int> %v1, <4 x int> undef, 
    -                          <4 x uint> <uint 0, uint 1, uint 2, uint 3>  ; yields <4 x int> - Identity shuffle.
    +  %result = shufflevector <4 x i32> %v1, <4 x i32> %v2, 
    +                          <4 x i32> <i32 0, i32 4, i32 1, i32 5>    ; yields <4 x i32>
    +  %result = shufflevector <4 x i32> %v1, <4 x i32> undef, 
    +                          <4 x i32> <i32 0, i32 1, i32 2, i32 3>  ; yields <4 x i32> - Identity shuffle.
     
    @@ -2351,7 +2381,7 @@ allocate, and free memory in LLVM.

    Syntax:
    -  <result> = malloc <type>[, uint <NumElements>][, align <alignment>]     ; yields {type*}:result
    +  <result> = malloc <type>[, i32 <NumElements>][, align <alignment>]     ; yields {type*}:result
     
    Overview:
    @@ -2380,13 +2410,13 @@ a pointer is returned.

    Example:
    -  %array  = malloc [4 x ubyte ]                    ; yields {[%4 x ubyte]*}:array
    +  %array  = malloc [4 x i8 ]                    ; yields {[%4 x i8]*}:array
     
    -  %size   = add uint 2, 2                          ; yields {uint}:size = uint 4
    -  %array1 = malloc ubyte, uint 4                   ; yields {ubyte*}:array1
    -  %array2 = malloc [12 x ubyte], uint %size        ; yields {[12 x ubyte]*}:array2
    -  %array3 = malloc int, uint 4, align 1024         ; yields {int*}:array3
    -  %array4 = malloc int, align 1024                 ; yields {int*}:array4
    +  %size   = add i32 2, 2                          ; yields {i32}:size = i32 4
    +  %array1 = malloc i8, i32 4                   ; yields {i8*}:array1
    +  %array2 = malloc [12 x i8], i32 %size        ; yields {[12 x i8]*}:array2
    +  %array3 = malloc i32, i32 4, align 1024         ; yields {i32*}:array3
    +  %array4 = malloc i32, align 1024                 ; yields {i32*}:array4
     
    @@ -2422,8 +2452,8 @@ after this instruction executes.

    Example:
    -  %array  = malloc [4 x ubyte]                    ; yields {[4 x ubyte]*}:array
    -            free   [4 x ubyte]* %array
    +  %array  = malloc [4 x i8]                    ; yields {[4 x i8]*}:array
    +            free   [4 x i8]* %array
     
    @@ -2437,7 +2467,7 @@ after this instruction executes.

    Syntax:
    -  <result> = alloca <type>[, uint <NumElements>][, align <alignment>]     ; yields {type*}:result
    +  <result> = alloca <type>[, i32 <NumElements>][, align <alignment>]     ; yields {type*}:result
     
    Overview:
    @@ -2470,10 +2500,10 @@ instructions), the memory is reclaimed.

    Example:
    -  %ptr = alloca int                              ; yields {int*}:ptr
    -  %ptr = alloca int, uint 4                      ; yields {int*}:ptr
    -  %ptr = alloca int, uint 4, align 1024          ; yields {int*}:ptr
    -  %ptr = alloca int, align 1024                  ; yields {int*}:ptr
    +  %ptr = alloca i32                              ; yields {i32*}:ptr
    +  %ptr = alloca i32, i32 4                      ; yields {i32*}:ptr
    +  %ptr = alloca i32, i32 4, align 1024          ; yields {i32*}:ptr
    +  %ptr = alloca i32, align 1024                  ; yields {i32*}:ptr
     
    @@ -2496,10 +2526,10 @@ instructions.

    Semantics:

    The location of memory pointed to is loaded.

    Examples:
    -
      %ptr = alloca int                               ; yields {int*}:ptr
    +
      %ptr = alloca i32                               ; yields {i32*}:ptr
       store int 3, int* %ptr                          ; yields {void}
    -  %val = load int* %ptr                           ; yields {int}:val = int 3
    + href="#i_store">store i32 3, i32* %ptr                          ; yields {void}
    +  %val = load i32* %ptr                           ; yields {i32}:val = i32 3
     
    @@ -2524,10 +2554,10 @@ this store with other volatile load and The contents of memory are updated to contain '<value>' at the location specified by the '<pointer>' operand.

    Example:
    -
      %ptr = alloca int                               ; yields {int*}:ptr
    +
      %ptr = alloca i32                               ; yields {i32*}:ptr
       store int 3, int* %ptr                          ; yields {void}
    -  %val = load int* %ptr                           ; yields {int}:val = int 3
    + href="#i_store">store i32 3, i32* %ptr                          ; yields {void}
    +  %val = load i32* %ptr                           ; yields {i32}:val = i32 3
     
    @@ -2555,7 +2585,7 @@ elements of the aggregate object to index to. The actual types of the arguments provided depend on the type of the first pointer argument. The 'getelementptr' instruction is used to index down through the type levels of a structure or to a specific index in an array. When indexing into a -structure, only uint integer constants are allowed. When indexing +structure, only i32 integer constants are allowed. When indexing into an array or pointer, only integers of 32 or 64 bits are allowed, and will be sign extended to 64-bit values.

    @@ -2565,16 +2595,16 @@ compiled to LLVM:

       struct RT {
         char A;
    -    int B[10][20];
    +    i32 B[10][20];
         char C;
       };
       struct ST {
    -    int X;
    +    i32 X;
         double Y;
         struct RT Z;
       };
     
    -  int *foo(struct ST *s) {
    +  define i32 *foo(struct ST *s) {
         return &s[1].Z.B[5][13];
       }
     
    @@ -2582,15 +2612,15 @@ compiled to LLVM:

    The LLVM code generated by the GCC frontend is:

    -  %RT = type { sbyte, [10 x [20 x int]], sbyte }
    -  %ST = type { int, double, %RT }
    +  %RT = type { i8 , [10 x [20 x i32]], i8  }
    +  %ST = type { i32, double, %RT }
     
       implementation
     
    -  int* %foo(%ST* %s) {
    +  define i32* %foo(%ST* %s) {
       entry:
    -    %reg = getelementptr %ST* %s, int 1, uint 2, uint 1, int 5, int 13
    -    ret int* %reg
    +    %reg = getelementptr %ST* %s, i32 1, i32 2, i32 1, i32 5, i32 13
    +    ret i32* %reg
       }
     
    @@ -2600,31 +2630,31 @@ compiled to LLVM:

    on the pointer type that is being indexed into. Pointer and array types can use a 32-bit or 64-bit integer type but the value will always be sign extended -to 64-bits. Structure types, require uint +to 64-bits. Structure types, require i32 constants.

    In the example above, the first index is indexing into the '%ST*' -type, which is a pointer, yielding a '%ST' = '{ int, double, %RT +type, which is a pointer, yielding a '%ST' = '{ i32, double, %RT }' type, a structure. The second index indexes into the third element of -the structure, yielding a '%RT' = '{ sbyte, [10 x [20 x int]], -sbyte }' type, another structure. The third index indexes into the second -element of the structure, yielding a '[10 x [20 x int]]' type, an +the structure, yielding a '%RT' = '{ i8 , [10 x [20 x i32]], +i8 }' type, another structure. The third index indexes into the second +element of the structure, yielding a '[10 x [20 x i32]]' type, an array. The two dimensions of the array are subscripted into, yielding an -'int' type. The 'getelementptr' instruction returns a pointer -to this element, thus computing a value of 'int*' type.

    +'i32' type. The 'getelementptr' instruction returns a pointer +to this element, thus computing a value of 'i32*' type.

    Note that it is perfectly legal to index partially through a structure, returning a pointer to an inner element. Because of this, the LLVM code for the given testcase is equivalent to:

    -  int* %foo(%ST* %s) {
    -    %t1 = getelementptr %ST* %s, int 1                        ; yields %ST*:%t1
    -    %t2 = getelementptr %ST* %t1, int 0, uint 2               ; yields %RT*:%t2
    -    %t3 = getelementptr %RT* %t2, int 0, uint 1               ; yields [10 x [20 x int]]*:%t3
    -    %t4 = getelementptr [10 x [20 x int]]* %t3, int 0, int 5  ; yields [20 x int]*:%t4
    -    %t5 = getelementptr [20 x int]* %t4, int 0, int 13        ; yields int*:%t5
    -    ret int* %t5
    +  define i32* %foo(%ST* %s) {
    +    %t1 = getelementptr %ST* %s, i32 1                        ; yields %ST*:%t1
    +    %t2 = getelementptr %ST* %t1, i32 0, i32 2               ; yields %RT*:%t2
    +    %t3 = getelementptr %RT* %t2, i32 0, i32 1               ; yields [10 x [20 x i32]]*:%t3
    +    %t4 = getelementptr [10 x [20 x i32]]* %t3, i32 0, i32 5  ; yields [20 x i32]*:%t4
    +    %t5 = getelementptr [20 x i32]* %t4, i32 0, i32 13        ; yields i32*:%t5
    +    ret i32* %t5
       }
     
    @@ -2641,8 +2671,8 @@ FAQ.

    Example:
    -    ; yields [12 x ubyte]*:aptr
    -    %aptr = getelementptr {int, [12 x ubyte]}* %sptr, long 0, uint 1
    +    ; yields [12 x i8]*:aptr
    +    %aptr = getelementptr {i32, [12 x i8]}* %sptr, i64 0, i32 1
     
    @@ -2688,8 +2718,8 @@ It will always truncate bits.

    Example:
    -  %X = trunc int 257 to ubyte              ; yields ubyte:1
    -  %Y = trunc int 123 to bool               ; yields bool:true
    +  %X = trunc i32 257 to i8              ; yields i8:1
    +  %Y = trunc i32 123 to bool               ; yields bool:true
     
    @@ -2727,8 +2757,8 @@ changes).

    Example:
    -  %X = zext int 257 to ulong              ; yields ulong:257
    -  %Y = zext bool true to int              ; yields int:1
    +  %X = zext i32 257 to i64              ; yields i64:257
    +  %Y = zext bool true to i32              ; yields i32:1
     
    @@ -2766,8 +2796,8 @@ no bits change (only the type changes).

    Example:
    -  %X = sext sbyte -1 to ushort           ; yields ushort:65535
    -  %Y = sext bool true to int             ; yields int:-1
    +  %X = sext i8  -1 to i16              ; yields i16   :65535
    +  %Y = sext bool true to i32             ; yields i32:-1
     
    @@ -2877,9 +2907,9 @@ If the value was non-zero, the bool result will be true.

    Example:
    -  %X = fp2uint double 123.0 to int         ; yields int:123
    +  %X = fp2uint double 123.0 to i32         ; yields i32:123
       %Y = fp2uint float 1.0E+300 to bool      ; yields bool:true
    -  %X = fp2uint float 1.04E+17 to ubyte     ; yields undefined:1
    +  %X = fp2uint float 1.04E+17 to i8     ; yields undefined:1
     
    @@ -2917,9 +2947,9 @@ If the value was non-zero, the bool result will be true.

    Example:
    -  %X = fptosi double -123.0 to int        ; yields int:-123
    +  %X = fptosi double -123.0 to i32        ; yields i32:-123
       %Y = fptosi float 1.0E-247 to bool      ; yields bool:true
    -  %X = fptosi float 1.04E+17 to sbyte     ; yields undefined:1
    +  %X = fptosi float 1.04E+17 to i8      ; yields undefined:1
     
    @@ -2952,8 +2982,8 @@ the value cannot fit in the floating point value, the results are undefined.

    Example:
    -  %X = uitofp int 257 to float         ; yields float:257.0
    -  %Y = uitofp sbyte -1 to double       ; yields double:255.0
    +  %X = uitofp i32 257 to float         ; yields float:257.0
    +  %Y = uitofp i8  -1 to double       ; yields double:255.0
     
    @@ -2984,8 +3014,8 @@ the value cannot fit in the floating point value, the results are undefined.

    Example:
    -  %X = sitofp int 257 to float         ; yields float:257.0
    -  %Y = sitofp sbyte -1 to double       ; yields double:-1.0
    +  %X = sitofp i32 257 to float         ; yields float:257.0
    +  %Y = sitofp i8  -1 to double       ; yields double:-1.0
     
    @@ -3019,8 +3049,8 @@ are the same size, then nothing is done (no-op cast).

    Example:
    -  %X = ptrtoint int* %X to sbyte          ; yields truncation on 32-bit
    -  %Y = ptrtoint int* %x to ulong          ; yields zero extend on 32-bit
    +  %X = ptrtoint i32* %X to i8           ; yields truncation on 32-bit
    +  %Y = ptrtoint i32* %x to i64          ; yields zero extend on 32-bit
     
    @@ -3054,9 +3084,9 @@ nothing is done (no-op cast).

    Example:
    -  %X = inttoptr int 255 to int*            ; yields zero extend on 64-bit
    -  %X = inttoptr int 255 to int*            ; yields no-op on 32-bit 
    -  %Y = inttoptr short 0 to int*            ; yields zero extend on 32-bit
    +  %X = inttoptr i32 255 to i32*            ; yields zero extend on 64-bit
    +  %X = inttoptr i32 255 to i32*            ; yields no-op on 32-bit 
    +  %Y = inttoptr i16 0 to i32*            ; yields zero extend on 32-bit
     
    @@ -3092,9 +3122,9 @@ other types, use the inttoptr or
    Example:
    -  %X = bitcast ubyte 255 to sbyte         ; yields sbyte:-1
    -  %Y = bitcast uint* %x to sint*          ; yields sint*:%x
    -  %Z = bitcast <2xint> %V to long;        ; yields long: %V   
    +  %X = bitcast i8 255 to i8          ; yields i8 :-1
    +  %Y = bitcast i32* %x to sint*          ; yields sint*:%x
    +  %Z = bitcast <2xint> %V to i64;        ; yields i64: %V   
     
    @@ -3169,12 +3199,12 @@ the vector are compared in turn and the predicate must hold for all elements.

    Example:
    -
      <result> = icmp eq int 4, 5           ; yields: result=false
    -  <result> = icmp ne float* %X, %X      ; yields: result=false
    -  <result> = icmp ult short 4, 5        ; yields: result=true
    -  <result> = icmp sgt sbyte 4, 5        ; yields: result=false
    -  <result> = icmp ule sbyte -4, 5       ; yields: result=false
    -  <result> = icmp sge sbyte 4, 5        ; yields: result=false
    +
      <result> = icmp eq i32 4, 5          ; yields: result=false
    +  <result> = icmp ne float* %X, %X     ; yields: result=false
    +  <result> = icmp ult i16  4, 5        ; yields: result=true
    +  <result> = icmp sgt i16  4, 5        ; yields: result=false
    +  <result> = icmp ule i16 -4, 5        ; yields: result=false
    +  <result> = icmp sge i16  4, 5        ; yields: result=false
     
    @@ -3287,7 +3317,7 @@ a basic block.

    value specified by the parameter, depending on which basic block we came from in the last terminator instruction.

    Example:
    -
    Loop:       ; Infinite loop that counts from 0 on up...
    %indvar = phi uint [ 0, %LoopHeader ], [ %nextindvar, %Loop ]
    %nextindvar = add uint %indvar, 1
    br label %Loop
    +
    Loop:       ; Infinite loop that counts from 0 on up...
    %indvar = phi i32 [ 0, %LoopHeader ], [ %nextindvar, %Loop ]
    %nextindvar = add i32 %indvar, 1
    br label %Loop
    @@ -3327,7 +3357,7 @@ value argument; otherwise, it returns the second value argument.
    Example:
    -  %X = select bool true, ubyte 17, ubyte 42          ; yields ubyte:17
    +  %X = select bool true, i8 17, i8 42          ; yields i8:17
     
    @@ -3399,10 +3429,10 @@ the invoke instruction.

    Example:
    -  %retval = call int %test(int %argc)
    -  call int(sbyte*, ...) *%printf(sbyte* %msg, int 12, sbyte 42);
    -  %X = tail call int %foo()
    -  %Y = tail call fastcc int %foo()
    +  %retval = call i32 %test(i32 %argc)
    +  call i32(i8 *, ...) *%printf(i8 * %msg, i32 12, i8  42);
    +  %X = tail call i32 %foo()
    +  %Y = tail call fastcc i32 %foo()
     
    @@ -3506,22 +3536,22 @@ instruction and the variable argument handling intrinsic functions are used.

    -int %test(int %X, ...) {
    +define i32 %test(i32 %X, ...) {
       ; Initialize variable argument processing
    -  %ap = alloca sbyte*
    -  call void %llvm.va_start(sbyte** %ap)
    +  %ap = alloca i8 *
    +  call void %llvm.va_start(i8 ** %ap)
     
       ; Read a single integer argument
    -  %tmp = va_arg sbyte** %ap, int
    +  %tmp = va_arg i8 ** %ap, i32
     
       ; Demonstrate usage of llvm.va_copy and llvm.va_end
    -  %aq = alloca sbyte*
    -  call void %llvm.va_copy(sbyte** %aq, sbyte** %ap)
    -  call void %llvm.va_end(sbyte** %aq)
    +  %aq = alloca i8 *
    +  call void %llvm.va_copy(i8 ** %aq, i8 ** %ap)
    +  call void %llvm.va_end(i8 ** %aq)
     
       ; Stop processing of arguments.
    -  call void %llvm.va_end(sbyte** %ap)
    -  ret int %tmp
    +  call void %llvm.va_end(i8 ** %ap)
    +  ret i32 %tmp
     }
     
    @@ -3675,7 +3705,7 @@ the runtime to find the pointer at GC safe points.
    Syntax:
    -  declare sbyte* %llvm.gcread(sbyte* %ObjPtr, sbyte** %Ptr)
    +  declare i8 * %llvm.gcread(i8 * %ObjPtr, i8 ** %Ptr)
     
    Overview:
    @@ -3710,7 +3740,7 @@ garbage collector runtime, as needed.

    Syntax:
    -  declare void %llvm.gcwrite(sbyte* %P1, sbyte* %Obj, sbyte** %P2)
    +  declare void %llvm.gcwrite(i8 * %P1, i8 * %Obj, i8 ** %P2)
     
    Overview:
    @@ -3758,7 +3788,7 @@ be implemented with code generator support.
    Syntax:
    -  declare sbyte *%llvm.returnaddress(uint <level>)
    +  declare i8  *%llvm.returnaddress(i32 <level>)
     
    Overview:
    @@ -3803,7 +3833,7 @@ source-language caller.
    Syntax:
    -  declare sbyte *%llvm.frameaddress(uint <level>)
    +  declare i8  *%llvm.frameaddress(i32 <level>)
     
    Overview:
    @@ -3846,7 +3876,7 @@ source-language caller.
    Syntax:
    -  declare sbyte *%llvm.stacksave()
    +  declare i8  *%llvm.stacksave()
     
    Overview:
    @@ -3881,7 +3911,7 @@ that were allocated after the llvm.stacksave was executed.
    Syntax:
    -  declare void %llvm.stackrestore(sbyte* %ptr)
    +  declare void %llvm.stackrestore(i8 * %ptr)
     
    Overview:
    @@ -3912,8 +3942,8 @@ See the description for llvm.stacksave.
    Syntax:
    -  declare void %llvm.prefetch(sbyte * <address>,
    -                                uint <rw>, uint <locality>)
    +  declare void %llvm.prefetch(i8  * <address>,
    +                                i32 <rw>, i32 <locality>)
     
    Overview:
    @@ -3957,7 +3987,7 @@ performance.
    Syntax:
    -  declare void %llvm.pcmarker( uint <id> )
    +  declare void %llvm.pcmarker( i32 <id> )
     
    Overview:
    @@ -3998,7 +4028,7 @@ support this intrinisic may ignore it.
    Syntax:
    -  declare ulong %llvm.readcyclecounter( )
    +  declare i64 %llvm.readcyclecounter( )
     
    Overview:
    @@ -4046,10 +4076,10 @@ for more efficient code generation.
    Syntax:
    -  declare void %llvm.memcpy.i32(sbyte* <dest>, sbyte* <src>,
    -                                uint <len>, uint <align>)
    -  declare void %llvm.memcpy.i64(sbyte* <dest>, sbyte* <src>,
    -                                ulong <len>, uint <align>)
    +  declare void %llvm.memcpy.i32(i8 * <dest>, i8 * <src>,
    +                                i32 <len>, i32 <align>)
    +  declare void %llvm.memcpy.i64(i8 * <dest>, i8 * <src>,
    +                                i64 <len>, i32 <align>)
     
    Overview:
    @@ -4100,10 +4130,10 @@ be set to 0 or 1.
    Syntax:
    -  declare void %llvm.memmove.i32(sbyte* <dest>, sbyte* <src>,
    -                                 uint <len>, uint <align>)
    -  declare void %llvm.memmove.i64(sbyte* <dest>, sbyte* <src>,
    -                                 ulong <len>, uint <align>)
    +  declare void %llvm.memmove.i32(i8 * <dest>, i8 * <src>,
    +                                 i32 <len>, i32 <align>)
    +  declare void %llvm.memmove.i64(i8 * <dest>, i8 * <src>,
    +                                 i64 <len>, i32 <align>)
     
    Overview:
    @@ -4155,10 +4185,10 @@ be set to 0 or 1.
    Syntax:
    -  declare void %llvm.memset.i32(sbyte* <dest>, ubyte <val>,
    -                                uint <len>, uint <align>)
    -  declare void %llvm.memset.i64(sbyte* <dest>, ubyte <val>,
    -                                ulong <len>, uint <align>)
    +  declare void %llvm.memset.i32(i8 * <dest>, i8 <val>,
    +                                i32 <len>, i32 <align>)
    +  declare void %llvm.memset.i64(i8 * <dest>, i8 <val>,
    +                                i64 <len>, i32 <align>)
     
    Overview:
    @@ -4279,8 +4309,8 @@ floating point number.
    Syntax:
    -  declare float  %llvm.powi.f32(float  %Val, int %power)
    -  declare double %llvm.powi.f64(double %Val, int %power)
    +  declare float  %llvm.powi.f32(float  %Val, i32 %power)
    +  declare double %llvm.powi.f64(double %Val, i32 %power)
     
    Overview:
    @@ -4328,9 +4358,9 @@ These allow efficient code generation for some algorithms.
    Syntax:
    -  declare ushort %llvm.bswap.i16(ushort <id>)
    -  declare uint   %llvm.bswap.i32(uint <id>)
    -  declare ulong  %llvm.bswap.i64(ulong <id>)
    +  declare i16 %llvm.bswap.i16(i16 <id>)
    +  declare i32 %llvm.bswap.i32(i32 <id>)
    +  declare i64 %llvm.bswap.i64(i64 <id>)
     
    Overview:
    @@ -4344,12 +4374,12 @@ in the target's native byte order.
    Semantics:

    -The llvm.bswap.16 intrinsic returns a ushort value that has the high and low -byte of the input ushort swapped. Similarly, the llvm.bswap.i32 intrinsic -returns a uint value that has the four bytes of the input uint swapped, so that -if the input bytes are numbered 0, 1, 2, 3 then the returned uint will have its -bytes in 3, 2, 1, 0 order. The llvm.bswap.i64 intrinsic extends this concept -to 64 bits. +The llvm.bswap.16 intrinsic returns an i16 value that has the high +and low byte of the input i16 swapped. Similarly, the llvm.bswap.i32 +intrinsic returns an i32 value that has the four bytes of the input i32 +swapped, so that if the input bytes are numbered 0, 1, 2, 3 then the returned +i32 will have its bytes in 3, 2, 1, 0 order. The llvm.bswap.i64 +intrinsic extends this concept to 64 bits.

    @@ -4363,10 +4393,10 @@ to 64 bits.
    Syntax:
    -  declare ubyte  %llvm.ctpop.i8 (ubyte <src>)
    -  declare ushort %llvm.ctpop.i16(ushort <src>)
    -  declare uint   %llvm.ctpop.i32(uint <src>)
    -  declare ulong  %llvm.ctpop.i64(ulong <src>)
    +  declare i8  %llvm.ctpop.i8 (i8  <src>)
    +  declare i16 %llvm.ctpop.i16(i16 <src>)
    +  declare i32 %llvm.ctpop.i32(i32 <src>)
    +  declare i64 %llvm.ctpop.i64(i64 <src>)
     
    Overview:
    @@ -4399,10 +4429,10 @@ The 'llvm.ctpop' intrinsic counts the 1's in a variable.
    Syntax:
    -  declare ubyte  %llvm.ctlz.i8 (ubyte <src>)
    -  declare ushort %llvm.ctlz.i16(ushort <src>)
    -  declare uint   %llvm.ctlz.i32(uint <src>)
    -  declare ulong  %llvm.ctlz.i64(ulong <src>)
    +  declare i8  %llvm.ctlz.i8 (i8  <src>)
    +  declare i16 %llvm.ctlz.i16(i16 <src>)
    +  declare i32 %llvm.ctlz.i32(i32 <src>)
    +  declare i64 %llvm.ctlz.i64(i64 <src>)
     
    Overview:
    @@ -4424,7 +4454,7 @@ unsigned integer type. The return type must match the argument type.

    The 'llvm.ctlz' intrinsic counts the leading (most significant) zeros in a variable. If the src == 0 then the result is the size in bits of the type -of src. For example, llvm.ctlz(int 2) = 30. +of src. For example, llvm.ctlz(i32 2) = 30.

    @@ -4439,10 +4469,10 @@ of src. For example, llvm.ctlz(int 2) = 30.
    Syntax:
    -  declare ubyte  %llvm.cttz.i8 (ubyte <src>)
    -  declare ushort %llvm.cttz.i16(ushort <src>)
    -  declare uint   %llvm.cttz.i32(uint <src>)
    -  declare ulong  %llvm.cttz.i64(ulong <src>)
    +  declare i8  %llvm.cttz.i8 (i8  <src>)
    +  declare i16 %llvm.cttz.i16(i16 <src>)
    +  declare i32 %llvm.cttz.i32(i32 <src>)
    +  declare i64 %llvm.cttz.i64(i64 <src>)
     
    Overview: