diff --git a/docs/LangRef.html b/docs/LangRef.html index e578a0d8402..27bcb920025 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -24,7 +24,7 @@
  • Calling Conventions
  • Global Variables
  • Functions
  • -
  • Aliases +
  • Aliases
  • Parameter Attributes
  • Function Attributes
  • Garbage Collector Names
  • @@ -58,16 +58,16 @@
  • Constants
      -
    1. Simple Constants -
    2. Aggregate Constants -
    3. Global Variable and Function Addresses -
    4. Undefined Values -
    5. Constant Expressions +
    6. Simple Constants
    7. +
    8. Aggregate Constants
    9. +
    10. Global Variable and Function Addresses
    11. +
    12. Undefined Values
    13. +
    14. Constant Expressions
  • Other Values
      -
    1. Inline Assembler Expressions +
    2. Inline Assembler Expressions
  • Instruction Reference @@ -143,6 +143,7 @@
  • 'inttoptr .. to' Instruction
  • 'bitcast .. to' Instruction
  • +
  • Other Operations
    1. 'icmp' Instruction
    2. @@ -327,7 +328,7 @@ the parser.

      LLVM identifiers come in two basic types: global and local. Global identifiers (functions, global variables) begin with the @ character. Local identifiers (register names, types) begin with the % character. Additionally, - there are three different formats for identifiers, for different purposes: + there are three different formats for identifiers, for different purposes:

      1. Named values are represented as a string of characters with their prefix. @@ -571,7 +572,7 @@ outside of the current module.

        to have any linkage type other than "externally visible", dllimport, or extern_weak.

        Aliases can have only external, internal and weak -linkages. +linkages.

        @@ -1077,7 +1078,7 @@ are given in this list:

      2. a0:0:1 - aggregates are 8-bit aligned
      3. When LLVM is determining the alignment for a given type, it uses the -following rules: +following rules:

        1. If the type sought is an exact match for one of the specifications, that specification is used.
        2. @@ -1089,8 +1090,8 @@ following rules: i65 and i256 will use the alignment of i64 (largest specified).
        3. If no match is found, and the type sought is a vector type, then the largest vector type that is smaller than the sought vector type will be used - as a fall back. This happens because <128 x double> can be implemented in - terms of 64 <2 x double>, for example.
        4. + as a fall back. This happens because <128 x double> can be implemented + in terms of 64 <2 x double>, for example.
        @@ -1800,7 +1801,7 @@ following is the syntax for constant expressions:

        extractelement ( VAL, IDX )
        Perform the extractelement - operation on constants. + operation on constants.
        insertelement ( VAL, ELT, IDX )
        @@ -1955,7 +1956,7 @@ the instruction after the call. If the caller was an "invoke" instruction, execution continues 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. +return value.

        Example:
        @@ -2072,7 +2073,7 @@ function, with the possibility of control flow transfer to either the "ret" instruction, control flow will return to the "normal" label. If the callee (or any indirect callees) returns with the "unwind" instruction, control is interrupted and -continued at the dynamically nearest "exception" label. +continued at the dynamically nearest "exception" label.

        Arguments:
        @@ -3066,6 +3067,7 @@ indices in a 'getelementptr' instruction. The value to insert must have the same type as the value identified by the indices. +

        Semantics:
        @@ -3430,7 +3432,7 @@ FAQ.

        ; yields [12 x i8]*:aptr %aptr = getelementptr {i32, [12 x i8]}* %saptr, i64 0, i32 1 ; yields i8*:vptr - %vptr = getelementptr {i32, <2 x i8>}* %svptr, i64 0, i32 1, i32 1 + %vptr = getelementptr {i32, <2 x i8>}* %svptr, i64 0, i32 1, i32 1 ; yields i8*:eptr %eptr = getelementptr [12 x i8]* %aptr, i64 0, i32 1 @@ -3734,7 +3736,7 @@ the value cannot fit in the floating point value, the results are undefined.

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

        Example:
           %X = sitofp i32 257 to float         ; yields float:257.0
        -  %Y = sitofp i8  -1 to double         ; yields double:-1.0
        +  %Y = sitofp i8 -1 to double          ; yields double:-1.0
         
        @@ -3790,7 +3792,7 @@ the integer type ty2.

        Arguments:

        The 'ptrtoint' instruction takes a value to cast, which must be a pointer value, and a type to cast it to -ty2, which must be an integer type. +ty2, which must be an integer type.

        Semantics:

        The 'ptrtoint' instruction converts value to integer type @@ -3826,7 +3828,7 @@ a pointer type, ty2.

        Arguments:

        The 'inttoptr' instruction takes an integer value to cast, and a type to cast it to, which must be a -pointer type. +pointer type.

        Semantics:

        The 'inttoptr' instruction converts value to type @@ -3884,7 +3886,7 @@ other types, use the inttoptr or

           %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   
        +  %Z = bitcast <2 x int> %V to i64;      ; yields i64: %V   
         
        @@ -3900,7 +3902,7 @@ instructions, which defy better classification.

        Syntax:
        -
          <result> = icmp <cond> <ty> <op1>, <op2>   ; yields {i1} or {<N x i1>}:result
        +
          <result> = icmp <cond> <ty> <op1>, <op2>   ; yields {i1} or {<N x i1>}:result
         
        Overview:

        The 'icmp' instruction returns a boolean value or @@ -3910,6 +3912,7 @@ of its two integer, integer vector, or pointer operands.

        The 'icmp' 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: +

        1. eq: equal
        2. ne: not equal
        3. @@ -3930,12 +3933,13 @@ They must also be identical types.

          The 'icmp' compares op1 and op2 according to the condition code given as cond. The comparison performed always yields either an i1 or vector of i1 result, as follows: +

          1. eq: yields true if the operands are equal, false otherwise. No sign interpretation is necessary or performed.
          2. ne: yields true if the operands are unequal, - false otherwise. No sign interpretation is necessary or performed. + false otherwise. No sign interpretation is necessary or performed.
          3. ugt: interprets the operands as unsigned values and yields true if op1 is greater than op2.
          4. uge: interprets the operands as unsigned values and yields @@ -3976,12 +3980,12 @@ Otherwise, the result is an i1.
        Syntax:
        -
          <result> = fcmp <cond> <ty> <op1>, <op2>     ; yields {i1} or {<N x i1>}:result
        +
          <result> = fcmp <cond> <ty> <op1>, <op2>     ; yields {i1} or {<N x i1>}:result
         
        Overview:

        The 'fcmp' instruction returns a boolean value or vector of boolean values based on comparison -of its operands. +of its operands.

        If the operands are floating point scalars, then the result type is a boolean (i1). @@ -3992,7 +3996,7 @@ operands being compared.

        Arguments:

        The 'fcmp' 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: +a value, just a keyword. The possible condition code are:

        1. false: no comparison, always returns false
        2. oeq: ordered and equal
        3. @@ -4023,7 +4027,7 @@ according to the condition code given as cond. If the operands are vectors, then the vectors are compared element by element. Each comparison performed -always yields an i1 result, as follows: +always yields an i1 result, as follows:

          1. false: always yields false, regardless of operands.
          2. oeq: yields true if both operands are not a QNAN and @@ -4077,7 +4081,7 @@ element-wise comparison of its two integer vector operands.

            Arguments:

            The 'vicmp' 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: +a value, just a keyword. The possible condition code are:

            1. eq: equal
            2. ne: not equal
            3. @@ -4100,7 +4104,7 @@ 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 'icmp' -instruction. +instruction.

              Example:
              @@ -4123,7 +4127,7 @@ elements have the same width as the input elements.

              Arguments:

              The 'vfcmp' 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: +a value, just a keyword. The possible condition code are:

              1. false: no comparison, always returns false
              2. oeq: ordered and equal
              3. @@ -4154,7 +4158,7 @@ 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 -'fcmp' instruction. +'fcmp' instruction.

                Example:
                @@ -4219,7 +4223,7 @@ Loop:       ; Infinite loop that counts from 0 on up...
                 
                   <result> = select selty <cond>, <ty> <val1>, <ty> <val2>             ; yields ty
                 
                -  selty is either i1 or {<N x i1>}
                +  selty is either i1 or {<N x i1>}
                 
                Overview:
                @@ -4287,12 +4291,12 @@ by element. 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 ret instruction. + href="#i_ret">ret instruction.

              4. The optional "cconv" marker indicates which calling convention the call should use. If none is specified, the call defaults - to using C calling conventions. + to using C calling conventions.

              5. @@ -4339,7 +4343,7 @@ transfer to a specified function, with its incoming arguments bound to the specified values. Upon a 'ret' 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. +function is bound to the result argument.

                Example:
                @@ -4519,17 +4523,17 @@ declare void @llvm.va_end(i8*)
                Syntax:
                  declare void %llvm.va_start(i8* <arglist>)
                Overview:
                -

                The 'llvm.va_start' intrinsic initializes +

                The 'llvm.va_start' intrinsic initializes *<arglist> for subsequent use by va_arg.

                Arguments:
                -

                The argument is a pointer to a va_list element to initialize.

                +

                The argument is a pointer to a va_list element to initialize.

                Semantics:
                -

                The 'llvm.va_start' intrinsic works just like the va_start +

                The 'llvm.va_start' intrinsic works just like the va_start macro available in C. In a target-dependent way, it initializes the va_list element to which the argument points, so that the next call to va_arg will produce the first variable argument passed to the function. @@ -5209,7 +5213,7 @@ this can be specified as the fourth argument, otherwise it should be set to 0 or

                Syntax:

                This is an overloaded intrinsic. You can use llvm.sqrt on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.sqrt.f32(float %Val)
                   declare double    @llvm.sqrt.f64(double %Val)
                @@ -5253,7 +5257,7 @@ floating point number.
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.powi on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.powi.f32(float  %Val, i32 %power)
                   declare double    @llvm.powi.f64(double %Val, i32 %power)
                @@ -5295,7 +5299,7 @@ unspecified sequence of rounding operations.

                Syntax:

                This is an overloaded intrinsic. You can use llvm.sin on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.sin.f32(float  %Val)
                   declare double    @llvm.sin.f64(double %Val)
                @@ -5334,7 +5338,7 @@ conditions in the same way.

                Syntax:

                This is an overloaded intrinsic. You can use llvm.cos on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.cos.f32(float  %Val)
                   declare double    @llvm.cos.f64(double %Val)
                @@ -5373,7 +5377,7 @@ conditions in the same way.

                Syntax:

                This is an overloaded intrinsic. You can use llvm.pow on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.pow.f32(float  %Val, float %Power)
                   declare double    @llvm.pow.f64(double %Val, double %Power)
                @@ -5428,7 +5432,7 @@ These allow efficient code generation for some algorithms.
                 
                 
                Syntax:

                This is an overloaded intrinsic function. You can use bswap on any integer -type that is an even number of bytes (i.e. BitWidth % 16 == 0). +type that is an even number of bytes (i.e. BitWidth % 16 == 0).

                   declare i16 @llvm.bswap.i16(i16 <id>)
                   declare i32 @llvm.bswap.i32(i32 <id>)
                @@ -5467,7 +5471,7 @@ additional even-byte lengths (6 bytes, 8 bytes and more, respectively).
                 
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.ctpop on any integer bit -width. Not all targets support all bit widths however. +width. Not all targets support all bit widths however.

                   declare i8 @llvm.ctpop.i8 (i8  <src>)
                   declare i16 @llvm.ctpop.i16(i16 <src>)
                @@ -5506,7 +5510,7 @@ The 'llvm.ctpop' intrinsic counts the 1's in a variable.
                 
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.ctlz on any -integer bit width. Not all targets support all bit widths however. +integer bit width. Not all targets support all bit widths however.

                   declare i8 @llvm.ctlz.i8 (i8  <src>)
                   declare i16 @llvm.ctlz.i16(i16 <src>)
                @@ -5549,7 +5553,7 @@ of src. For example, llvm.ctlz(i32 2) = 30.
                 
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.cttz on any -integer bit width. Not all targets support all bit widths however. +integer bit width. Not all targets support all bit widths however.

                   declare i8 @llvm.cttz.i8 (i8  <src>)
                   declare i16 @llvm.cttz.i16(i16 <src>)
                @@ -5590,7 +5594,7 @@ of src.  For example, llvm.cttz(2) = 1.
                 
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.part.select -on any integer bit width. +on any integer bit width.

                   declare i17 @llvm.part.select.i17 (i17 %val, i32 %loBit, i32 %hiBit)
                   declare i29 @llvm.part.select.i29 (i29 %val, i32 %loBit, i32 %hiBit)
                @@ -5620,7 +5624,7 @@ only the %hiBit - %loBit bits set, as follows:

              6. The %loBits value is subtracted from the %hiBits value to determine the number of bits to retain.
              7. A mask of the retained bits is created by shifting a -1 value.
              8. -
              9. The mask is ANDed with %val to produce the result. +
              10. The mask is ANDed with %val to produce the result.

              In reverse mode, a similar computation is made except that the bits are returned in the reverse order. So, for example, if X has the value @@ -5637,7 +5641,7 @@ returned in the reverse order. So, for example, if X has the value

              Syntax:

              This is an overloaded intrinsic. You can use llvm.part.set -on any integer bit width. +on any integer bit width.

                 declare i17 @llvm.part.set.i17.i9 (i17 %val, i9 %repl, i32 %lo, i32 %hi)
                 declare i29 @llvm.part.set.i29.i9 (i29 %val, i9 %repl, i32 %lo, i32 %hi)
              @@ -5666,10 +5670,10 @@ up to that size.

              In forward mode, the bits between %lo and %hi (inclusive) are replaced with corresponding bits from %repl. That is the 0th bit in %repl replaces the %loth bit in %val and etc. up -to the %hith bit. +to the %hith bit.

              In reverse mode, a similar computation is made except that the bits are reversed. That is, the 0th bit in %repl replaces the -%hi bit in %val and etc. down to the %loth bit. +%hi bit in %val and etc. down to the %loth bit.

              Examples:
                 llvm.part.set(0xFFFF, 0, 4, 7) -> 0xFF0F
              @@ -5836,7 +5840,7 @@ i1 <device> )
                   
            4. ls: load-store barrier
            5. sl: store-load barrier
            6. ss: store-store barrier
            7. -
            8. device: barrier applies to device and uncached memory also. +
            9. device: barrier applies to device and uncached memory also.
            10. Semantics:

              @@ -6360,6 +6364,7 @@ This intrinsic allows annotations to be put on arbitrary expressions with arbitrary strings. This can be useful for special purpose optimizations that want to look for these annotations. These have no other defined use, they are ignored by code generation and optimization. +