X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FLangRef.html;h=45f6f38f598fc9c34bc7b9ce70feb8905d7b2f40;hb=9e6d1d1f5034347d237941f1bf08fba5c1583cd3;hp=af0e5640c5b2061e017e95c0bf0a1a58ae579799;hpb=cdfc940912d56a63b6f12eaa7f3faf79cf74c693;p=oota-llvm.git diff --git a/docs/LangRef.html b/docs/LangRef.html index af0e5640c5b..45f6f38f598 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -5,7 +5,7 @@ LLVM Assembly Language Reference Manual - @@ -54,7 +54,7 @@
  • Type System
    1. Type Classifications
    2. -
    3. Primitive Types +
    4. Primitive Types
      1. Integer Type
      2. Floating Point Types
      3. @@ -291,6 +291,8 @@ 'llvm.trap' Intrinsic
      4. 'llvm.stackprotector' Intrinsic
      5. +
      6. + 'llvm.objectsize' Intrinsic
    @@ -338,7 +340,7 @@ IR's", allowing many source languages to be mapped to them). By providing type information, LLVM can be used as the target of optimizations: for example, through pointer analysis, it can be proven that a C automatic - variable is never accessed outside of the current function... allowing it to + variable is never accessed outside of the current function, allowing it to be promoted to a simple SSA value instead of a memory location.

    @@ -359,12 +361,12 @@ -

    ...because the definition of %x does not dominate all of its - uses. The LLVM infrastructure provides a verification pass that may be used - to verify that an LLVM module is well formed. This pass is automatically run - by the parser after parsing input assembly and by the optimizer before it - outputs bitcode. The violations pointed out by the verifier pass indicate - bugs in transformation passes or input to the parser.

    +

    because the definition of %x does not dominate all of its uses. The + LLVM infrastructure provides a verification pass that may be used to verify + that an LLVM module is well formed. This pass is automatically run by the + parser after parsing input assembly and by the optimizer before it outputs + bitcode. The violations pointed out by the verifier pass indicate bugs in + transformation passes or input to the parser.

    @@ -457,7 +459,7 @@
  • Unnamed temporaries are numbered sequentially
  • -

    ...and it also shows a convention that we follow in this document. When +

    It also shows a convention that we follow in this document. When demonstrating instructions, we will follow an instruction with a comment that defines the type and name of value produced. Comments are shown in italic text.

    @@ -482,24 +484,21 @@ the "hello world" module:

    -
    ; Declare the string constant as a global constant...
    -@.LC0 = internal constant [13 x i8] c"hello world\0A\00"          ; [13 x i8]*
    +
    +; Declare the string constant as a global constant.
    +@.LC0 = internal constant [13 x i8] c"hello world\0A\00"    ; [13 x i8]*
     
     ; External declaration of the puts function
    -declare i32 @puts(i8 *)                                           ; i32(i8 *)* 
    +declare i32 @puts(i8 *)                                     ; i32(i8 *)* 
     
     ; Definition of main function
    -define i32 @main() {                                              ; i32()* 
    -        ; Convert [13 x i8]* to i8  *...
    -        %cast210 = getelementptr [13 x i8]* @.LC0, i64 0, i64 0   ; i8 *
    +define i32 @main() {                                        ; i32()* 
    +  ; Convert [13 x i8]* to i8  *...
    +  %cast210 = getelementptr [13 x i8]* @.LC0, i64 0, i64 0   ; i8 *
     
    -        ; Call puts function to write out the string to stdout...
    -        call i32 @puts(i8 * %cast210)                             ; i32
    -        ret i32 0
    }
    + ; Call puts function to write out the string to stdout. + call i32 @puts(i8 * %cast210) ; i32 + ret i32 0
    }
    @@ -527,7 +526,7 @@ define i32 @main() { ; i32()*
    -
    private:
    +
    private
    Global values with private linkage are only directly accessible by objects in the current module. In particular, linking code into a module with an private global value may cause the private to be renamed as necessary to @@ -535,7 +534,7 @@ define i32 @main() { ; i32()* -
    linker_private:
    +
    linker_private
    Similar to private, but the symbol is passed through the assembler and removed by the linker after evaluation. Note that (unlike private symbols) linker_private symbols are subject to coalescing by the linker: @@ -543,12 +542,12 @@ define i32 @main() { ; i32()* -
    internal:
    +
    internal
    Similar to private, but the value shows as a local symbol (STB_LOCAL in the case of ELF) in the object file. This corresponds to the notion of the 'static' keyword in C.
    -
    available_externally:
    +
    available_externally
    Globals with "available_externally" linkage are never emitted into the object file corresponding to the LLVM module. They exist to allow inlining and other optimizations to take place given knowledge of @@ -557,45 +556,45 @@ define i32 @main() { ; i32()* linkonce_odr. This linkage type is only allowed on definitions, not declarations.
    -
    linkonce:
    +
    linkonce
    Globals with "linkonce" linkage are merged with other globals of the same name when linkage occurs. This is typically used to implement inline functions, templates, or other code which must be generated in each translation unit that uses it. Unreferenced linkonce globals are allowed to be discarded.
    -
    weak:
    +
    weak
    "weak" linkage has the same merging semantics as linkonce linkage, except that unreferenced globals with weak linkage may not be discarded. This is used for globals that are declared "weak" in C source code.
    -
    common:
    +
    common
    "common" linkage is most similar to "weak" linkage, but they are used for tentative definitions in C, such as "int X;" at global scope. Symbols with "common" linkage are merged in the same way as weak symbols, and they may not be deleted if unreferenced. common symbols may not have an explicit section, - must have a zero initializer, and may not be marked 'constant'. Functions and aliases may not have common linkage.
    -
    appending:
    +
    appending
    "appending" linkage may only be applied to global variables of pointer to array type. When two global variables with appending linkage are linked together, the two global arrays are appended together. This is the LLVM, typesafe, equivalent of having the system linker append together "sections" with identical names when .o files are linked.
    -
    extern_weak:
    +
    extern_weak
    The semantics of this linkage follow the ELF object file model: the symbol is weak until linked, if not linked, the symbol becomes null instead of being an undefined reference.
    -
    linkonce_odr:
    -
    weak_odr:
    +
    linkonce_odr
    +
    weak_odr
    Some languages allow differing globals to be merged, such as two functions with different semantics. Other languages, such as C++, ensure that only equivalent globals are ever merged (the "one definition rule" - @@ -615,14 +614,14 @@ define i32 @main() { ; i32()*
    -
    dllimport:
    +
    dllimport
    "dllimport" linkage causes the compiler to reference a function or variable via a global pointer to a pointer that is set up by the DLL exporting the symbol. On Microsoft Windows targets, the pointer name is formed by combining __imp_ and the function or variable name.
    -
    dllexport:
    +
    dllexport
    "dllexport" linkage causes the compiler to provide a global pointer to a pointer in a DLL, so that it can be referenced with the dllimport attribute. On Microsoft Windows targets, the pointer @@ -844,7 +843,7 @@ define i32 @main() { ; i32()* LLVM function declarations consist of the "declare" keyword, an optional linkage type, an optional - visibility style, an optional + visibility style, an optional calling convention, a return type, an optional parameter attribute for the return type, a function name, a possibly empty list of arguments, an optional alignment, and an @@ -935,24 +934,24 @@ declare signext i8 @returns_signed_char()

    Currently, only the following parameter attributes are defined:

    -
    zeroext
    +
    zeroext
    This indicates to the code generator that the parameter or return value should be zero-extended to a 32-bit value by the caller (for a parameter) or the callee (for a return value).
    -
    signext
    +
    signext
    This indicates to the code generator that the parameter or return value should be sign-extended to a 32-bit value by the caller (for a parameter) or the callee (for a return value).
    -
    inreg
    +
    inreg
    This indicates that this parameter or return value should be treated in a special target-dependent fashion during while emitting code for a function call or return (usually, by putting it in a register as opposed to memory, though some targets use it to distinguish between two different kinds of registers). Use of this attribute is target-specific.
    -
    byval
    +
    byval
    This indicates that the pointer parameter should really be passed by value to the function. The attribute implies that a hidden copy of the pointee is made between the caller and the callee, so the callee is unable to @@ -967,7 +966,7 @@ declare signext i8 @returns_signed_char() generator that usually indicates a desired alignment for the synthesized stack slot.
    -
    sret
    +
    sret
    This indicates that the pointer parameter specifies the address of a structure that is the return value of the function in the source program. This pointer must be guaranteed by the caller to be valid: loads and @@ -975,7 +974,7 @@ declare signext i8 @returns_signed_char() may only be applied to the first parameter. This is not a valid attribute for return values.
    -
    noalias
    +
    noalias
    This indicates that the pointer does not alias any global or any other parameter. The caller is responsible for ensuring that this is the case. On a function return value, noalias additionally indicates @@ -985,12 +984,12 @@ declare signext i8 @returns_signed_char() alias analysis.
    -
    nocapture
    +
    nocapture
    This indicates that the callee does not make any copies of the pointer that outlive the callee itself. This is not a valid attribute for return values.
    -
    nest
    +
    nest
    This indicates that the pointer parameter can be excised using the trampoline intrinsics. This is not a valid attribute for return values.
    @@ -1010,7 +1009,7 @@ declare signext i8 @returns_signed_char()
    -define void @f() gc "name" { ...
    +define void @f() gc "name" { ... }
     
    @@ -1040,42 +1039,42 @@ define void @f() gc "name" { ... define void @f() noinline { ... } define void @f() alwaysinline { ... } define void @f() alwaysinline optsize { ... } -define void @f() optsize +define void @f() optsize { ... }
    -
    alwaysinline
    +
    alwaysinline
    This attribute indicates that the inliner should attempt to inline this function into callers whenever possible, ignoring any active inlining size threshold for this caller.
    -
    inlinehint
    +
    inlinehint
    This attribute indicates that the source code contained a hint that inlining this function is desirable (such as the "inline" keyword in C/C++). It is just a hint; it imposes no requirements on the inliner.
    -
    noinline
    +
    noinline
    This attribute indicates that the inliner should never inline this function in any situation. This attribute may not be used together with the alwaysinline attribute.
    -
    optsize
    +
    optsize
    This attribute suggests that optimization passes and code generator passes make choices that keep the code size of this function low, and otherwise do optimizations specifically to reduce code size.
    -
    noreturn
    +
    noreturn
    This function attribute indicates that the function never returns normally. This produces undefined behavior at runtime if the function ever does dynamically return.
    -
    nounwind
    +
    nounwind
    This function attribute indicates that the function never returns with an unwind or exceptional control flow. If the function does unwind, its runtime behavior is undefined.
    -
    readnone
    +
    readnone
    This attribute indicates that the function computes its result (or decides to unwind an exception) based strictly on its arguments, without dereferencing any pointer arguments or otherwise accessing any mutable @@ -1086,7 +1085,7 @@ define void @f() optsize exceptions by calling the C++ exception throwing methods, but could use the unwind instruction.
    -
    readonly
    +
    readonly
    This attribute indicates that the function does not write through any pointer arguments (including byval arguments) or otherwise modify any state (e.g. memory, control registers, @@ -1097,7 +1096,7 @@ define void @f() optsize exception by calling the C++ exception throwing methods, but may use the unwind instruction.
    -
    ssp
    +
    ssp
    This attribute indicates that the function should emit a stack smashing protector. It is in the form of a "canary"—a random value placed on the stack before the local variables that's checked upon return from the @@ -1108,7 +1107,7 @@ define void @f() optsize function that doesn't have an ssp attribute, then the resulting function will have an ssp attribute.
    -
    sspreq
    +
    sspreq
    This attribute indicates that the function should always emit a stack smashing protector. This overrides the ssp function attribute.
    @@ -1118,14 +1117,14 @@ define void @f() optsize an ssp attribute, then the resulting function will have an sspreq attribute.
    -
    noredzone
    +
    noredzone
    This attribute indicates that the code generator should not use a red zone, even if the target-specific ABI normally permits it.
    -
    noimplicitfloat
    +
    noimplicitfloat
    This attributes disables implicit floating point instructions.
    -
    naked
    +
    naked
    This attribute disables prologue / epilogue emission for the function. This can have very system-specific consequences.
    @@ -1193,7 +1192,7 @@ target datalayout = "layout specification" location.
    p:size:abi:pref
    -
    This specifies the size of a pointer and its abi and +
    This specifies the size of a pointer and its abi and preferred alignments. All sizes are in bits. Specifying the pref alignment is optional. If omitted, the preceding : should be omitted too.
    @@ -1203,11 +1202,11 @@ target datalayout = "layout specification" size. The value of size must be in the range [1,2^23).
    vsize:abi:pref
    -
    This specifies the alignment for a vector type of a given bit +
    This specifies the alignment for a vector type of a given bit size.
    fsize:abi:pref
    -
    This specifies the alignment for a floating point type of a given bit +
    This specifies the alignment for a floating point type of a given bit size. The value of size must be either 32 (float) or 64 (double).
    @@ -1218,6 +1217,13 @@ target datalayout = "layout specification"
    ssize:abi:pref
    This specifies the alignment for a stack object of a given bit size.
    + +
    nsize1:size2:size3...
    +
    This specifies a set of native integer widths for the target CPU + in bits. For example, it might contain "n32" for 32-bit PowerPC, + "n32:64" for PowerPC 64, or "n8:16:32:64" for X86-64. Elements of + this set are considered to support most general arithmetic + operations efficiently.

    When constructing the data layout for a given target, LLVM starts with a @@ -1436,11 +1442,6 @@ Classifications -

    Note that the code generator does not yet support large integer types to be - used as function return types. The specific limit on how large a return type - the code generator can currently handle is target-dependent; currently it's - often 64 bits for 32-bit targets and 128 bits for 64-bit targets.

    - @@ -1572,17 +1573,12 @@ Classifications -

    Note that 'variable sized arrays' can be implemented in LLVM with a zero - 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 "{ i32, [0 x float]}", for example.

    - -

    Note that the code generator does not yet support large aggregate types to be - used as function return types. The specific limit on how large an aggregate - return type the code generator can currently handle is target-dependent, and - also dependent on the aggregate element types.

    +

    There is no restriction on indexing beyond the end of the array implied by + a static type (though there are restrictions on indexing beyond the bounds + of an allocated object in some cases). This means that single-dimension + 'variable sized array' addressing can be implemented in LLVM with a zero + length array type. An implementation of 'pascal style arrays' in LLVM could + use the type "{ i32, [0 x float]}", for example.

    @@ -1620,16 +1616,16 @@ Classifications float (i16 signext, i32 *) * - Pointer to a function that takes - an i16 that should be sign extended and a - pointer to i32, returning + Pointer to a function that takes + an i16 that should be sign extended and a + pointer to i32, returning float. i32 (i8*, ...) - A vararg function that takes at least one - pointer to i8 (char in C), - which returns an integer. This is the signature for printf in + A vararg function that takes at least one + pointer to i8 (char in C), + which returns an integer. This is the signature for printf in LLVM. @@ -1676,11 +1672,6 @@ Classifications -

    Note that the code generator does not yet support large aggregate types to be - used as function return types. The specific limit on how large an aggregate - return type the code generator can currently handle is target-dependent, and - also dependent on the aggregate element types.

    - @@ -1771,8 +1762,7 @@ Classifications

    A vector type is a simple derived type that represents a vector of elements. Vector types are used when multiple primitive data are operated in parallel using a single instruction (SIMD). A vector type requires a size (number of - elements) and an underlying primitive data type. Vectors must have a power - of two length (1, 2, 4, 8, 16 ...). Vector types are considered + elements) and an underlying primitive data type. Vector types are considered first class.

    Syntax:
    @@ -1799,11 +1789,6 @@ Classifications -

    Note that the code generator does not yet support large vector types to be - used as function return types. The specific limit on how large a vector - return type codegen can currently handle is target-dependent; currently it's - often a few times longer than a hardware vector register.

    - @@ -2069,9 +2054,9 @@ Unsafe: For example, if "%X" has a zero bit, then the output of the 'and' operation will always be a zero, no matter what the corresponding bit from the undef is. As such, it is unsafe to optimize or assume that the result of the and is undef. -However, it is safe to assume that all bits of the undef could be 0, and -optimize the and to 0. Likewise, it is safe to assume that all the bits of -the undef operand to the or could be set, allowing the or to be folded to +However, it is safe to assume that all bits of the undef could be 0, and +optimize the and to 0. Likewise, it is safe to assume that all the bits of +the undef operand to the or could be set, allowing the or to be folded to -1.

    @@ -2101,7 +2086,7 @@ the optimizer is allowed to assume that the undef operand could be the same as
       %A = xor undef, undef
    -  
    +
       %B = undef
       %C = xor %B, %B
     
    @@ -2152,7 +2137,7 @@ does not execute at all.  This allows us to delete the divide and all code after
     it: since the undefined operation "can't happen", the optimizer can assume that
     it occurs in dead code.
     

    - +
     a:  store undef -> %X
    @@ -2164,7 +2149,7 @@ b: unreachable
     

    These examples reiterate the fdiv example: a store "of" an undefined value -can be assumed to not have any effect: we can assume that the value is +can be assumed to not have any effect: we can assume that the value is overwritten with bits that happen to match what was already there. However, a store "to" an undefined location could clobber arbitrary memory, therefore, it has undefined behavior.

    @@ -2181,7 +2166,7 @@ has undefined behavior.

    The 'blockaddress' constant computes the address of the specified basic block in the specified function, and always has an i8* type. Taking the address of the entry block is illegal.

    - +

    This value only has defined behavior when used as an operand to the 'indirectbr' instruction or for comparisons against null. Pointer equality tests between labels addresses is undefined @@ -2190,7 +2175,7 @@ has undefined behavior.

    pointer sized value as long as the bits are not inspected. This allows ptrtoint and arithmetic to be performed on these values so long as the original value is reconstituted before the indirectbr.

    - +

    Finally, some targets may provide defined semantics when using the value as the operand to an inline assembly, but that is target specific. @@ -2541,7 +2526,7 @@ Instructions

    'ret' instruction, the 'br' instruction, the 'switch' instruction, the - ''indirectbr' Instruction, the + ''indirectbr' Instruction, the 'invoke' instruction, the 'unwind' instruction, and the 'unreachable' instruction.

    @@ -2596,14 +2581,6 @@ Instruction
    ret { i32, i8 } { i32 4, i8 2 } ; Return a struct of values 4 and 2 -

    Note that the code generator does not yet fully support large - return values. The specific sizes that are currently supported are - dependent on the target. For integers, on 32-bit targets the limit - is often 64 bits, and on 64-bit targets the limit is often 128 bits. - For aggregate types, the current limits are dependent on the element - types; for example targets are often limited to 2 total integer - elements and 2 total floating-point elements.

    - @@ -2726,7 +2703,7 @@ IfUnequal: rest of the arguments indicate the full set of possible destinations that the address may point to. Blocks are allowed to occur multiple times in the destination list, though this isn't particularly useful.

    - +

    This destination list is required so that dataflow analysis has an accurate understanding of the CFG.

    @@ -3083,7 +3060,7 @@ Instruction

    The two arguments to the 'mul' instruction must be integer or vector of integer values. Both arguments must have identical types.

    - +
    Semantics:

    The value produced is the integer product of the two operands.

    @@ -3155,7 +3132,7 @@ Instruction

    The 'udiv' instruction returns the quotient of its two operands.

    Arguments:
    -

    The two arguments to the 'udiv' instruction must be +

    The two arguments to the 'udiv' instruction must be integer or vector of integer values. Both arguments must have identical types.

    @@ -3190,7 +3167,7 @@ Instruction

    The 'sdiv' instruction returns the quotient of its two operands.

    Arguments:
    -

    The two arguments to the 'sdiv' instruction must be +

    The two arguments to the 'sdiv' instruction must be integer or vector of integer values. Both arguments must have identical types.

    @@ -3261,7 +3238,7 @@ Instruction division of its two arguments.

    Arguments:
    -

    The two arguments to the 'urem' instruction must be +

    The two arguments to the 'urem' instruction must be integer or vector of integer values. Both arguments must have identical types.

    @@ -3301,7 +3278,7 @@ Instruction elements must be integers.

    Arguments:
    -

    The two arguments to the 'srem' instruction must be +

    The two arguments to the 'srem' instruction must be integer or vector of integer values. Both arguments must have identical types.

    @@ -3396,7 +3373,7 @@ Instruction

    Both arguments to the 'shl' instruction must be the same integer or vector of integer type. 'op2' is treated as an unsigned value.

    - +
    Semantics:

    The value produced is op1 * 2op2 mod 2n, where n is the width of the result. If op2 @@ -3432,7 +3409,7 @@ Instruction operand shifted to the right a specified number of bits with zero fill.

    Arguments:
    -

    Both arguments to the 'lshr' instruction must be the same +

    Both arguments to the 'lshr' instruction must be the same integer or vector of integer type. 'op2' is treated as an unsigned value.

    @@ -3472,7 +3449,7 @@ Instruction extension.

    Arguments:
    -

    Both arguments to the 'ashr' instruction must be the same +

    Both arguments to the 'ashr' instruction must be the same integer or vector of integer type. 'op2' is treated as an unsigned value.

    @@ -3512,7 +3489,7 @@ Instruction operands.

    Arguments:
    -

    The two arguments to the 'and' instruction must be +

    The two arguments to the 'and' instruction must be integer or vector of integer values. Both arguments must have identical types.

    @@ -3571,7 +3548,7 @@ Instruction two operands.

    Arguments:
    -

    The two arguments to the 'or' instruction must be +

    The two arguments to the 'or' instruction must be integer or vector of integer values. Both arguments must have identical types.

    @@ -3634,7 +3611,7 @@ Instruction complement" operation, which is the "~" operator in C.

    Arguments:
    -

    The two arguments to the 'xor' instruction must be +

    The two arguments to the 'xor' instruction must be integer or vector of integer values. Both arguments must have identical types.

    @@ -3682,7 +3659,7 @@ Instruction -
    + @@ -3805,20 +3782,20 @@ Instruction
    Example:
    -  <result> = shufflevector <4 x i32> %v1, <4 x i32> %v2, 
    +  <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, 
    +  <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.
    -  <result> = shufflevector <8 x i32> %v1, <8 x i32> undef, 
    +  <result> = shufflevector <8 x i32> %v1, <8 x i32> undef,
                               <4 x i32> <i32 0, i32 1, i32 2, i32 3>  ; yields <4 x i32>
    -  <result> = shufflevector <4 x i32> %v1, <4 x i32> %v2, 
    +  <result> = shufflevector <4 x i32> %v1, <4 x i32> %v2,
                               <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7 >  ; yields <8 x i32>
     
    -
    + @@ -3903,7 +3880,7 @@ Instruction
    -
    + @@ -4266,15 +4243,15 @@ entry:
    Overview:
    -

    The 'zext' instruction zero extends its operand to type +

    The 'zext' instruction zero extends its operand to type ty2.

    Arguments:
    -

    The 'zext' instruction takes a value to cast, which must be of +

    The 'zext' instruction takes a value to cast, which must be of integer type, and a type to cast it to, which must also be of integer type. The bit size of the - value must be smaller than the bit size of the destination type, + value must be smaller than the bit size of the destination type, ty2.

    Semantics:
    @@ -4306,10 +4283,10 @@ entry:

    The 'sext' sign extends value to the type ty2.

    Arguments:
    -

    The 'sext' instruction takes a value to cast, which must be of +

    The 'sext' instruction takes a value to cast, which must be of integer type, and a type to cast it to, which must also be of integer type. The bit size of the - value must be smaller than the bit size of the destination type, + value must be smaller than the bit size of the destination type, ty2.

    Semantics:
    @@ -4347,12 +4324,12 @@ entry:

    The 'fptrunc' instruction takes a floating point value to cast and a floating point type to cast it to. The size of value must be larger than the size of - ty2. This implies that fptrunc cannot be used to make a + ty2. This implies that fptrunc cannot be used to make a no-op cast.

    Semantics:

    The 'fptrunc' instruction truncates a value from a larger - floating point type to a smaller + floating point type to a smaller floating point type. If the value cannot fit within the destination type, ty2, then the results are undefined.

    @@ -4381,7 +4358,7 @@ entry: floating point value.

    Arguments:
    -

    The 'fpext' instruction takes a +

    The 'fpext' instruction takes a floating point value to cast, and a floating point type to cast it to. The source type must be smaller than the destination type.

    @@ -4424,7 +4401,7 @@ entry: vector integer type with the same number of elements as ty

    Semantics:
    -

    The 'fptoui' instruction converts its +

    The 'fptoui' instruction converts its floating point operand into the nearest (rounding towards zero) unsigned integer value. If the value cannot fit in ty2, the results are undefined.

    @@ -4450,7 +4427,7 @@ entry:
    Overview:
    -

    The 'fptosi' instruction converts +

    The 'fptosi' instruction converts floating point value to type ty2.

    @@ -4462,7 +4439,7 @@ entry: vector integer type with the same number of elements as ty

    Semantics:
    -

    The 'fptosi' instruction converts its +

    The 'fptosi' instruction converts its floating point operand into the nearest (rounding towards zero) signed integer value. If the value cannot fit in ty2, the results are undefined.

    @@ -4659,7 +4636,7 @@ entry:
       %X = bitcast i8 255 to i8              ; yields i8 :-1
       %Y = bitcast i32* %x to sint*          ; yields sint*:%x
    -  %Z = bitcast <2 x int> %V to i64;      ; yields i64: %V   
    +  %Z = bitcast <2 x int> %V to i64;      ; yields i64: %V
     
    @@ -4719,11 +4696,11 @@ entry: result, as follows:

      -
    1. eq: yields true if the operands are equal, +
    2. eq: yields true if the operands are equal, false otherwise. No sign interpretation is necessary or performed.
    3. -
    4. ne: yields true if the operands are unequal, +
    5. ne: yields true if the operands are unequal, false otherwise. No sign interpretation is necessary or performed.
    6. @@ -4840,42 +4817,42 @@ entry:
      1. false: always yields false, regardless of operands.
      2. -
      3. oeq: yields true if both operands are not a QNAN and +
      4. oeq: yields true if both operands are not a QNAN and op1 is equal to op2.
      5. ogt: yields true if both operands are not a QNAN and op1 is greather than op2.
      6. -
      7. oge: yields true if both operands are not a QNAN and +
      8. oge: yields true if both operands are not a QNAN and op1 is greater than or equal to op2.
      9. -
      10. olt: yields true if both operands are not a QNAN and +
      11. olt: yields true if both operands are not a QNAN and op1 is less than op2.
      12. -
      13. ole: yields true if both operands are not a QNAN and +
      14. ole: yields true if both operands are not a QNAN and op1 is less than or equal to op2.
      15. -
      16. one: yields true if both operands are not a QNAN and +
      17. one: yields true if both operands are not a QNAN and op1 is not equal to op2.
      18. ord: yields true if both operands are not a QNAN.
      19. -
      20. ueq: yields true if either operand is a QNAN or +
      21. ueq: yields true if either operand is a QNAN or op1 is equal to op2.
      22. -
      23. ugt: yields true if either operand is a QNAN or +
      24. ugt: yields true if either operand is a QNAN or op1 is greater than op2.
      25. -
      26. uge: yields true if either operand is a QNAN or +
      27. uge: yields true if either operand is a QNAN or op1 is greater than or equal to op2.
      28. -
      29. ult: yields true if either operand is a QNAN or +
      30. ult: yields true if either operand is a QNAN or op1 is less than op2.
      31. -
      32. ule: yields true if either operand is a QNAN or +
      33. ule: yields true if either operand is a QNAN or op1 is less than or equal to op2.
      34. -
      35. une: yields true if either operand is a QNAN or +
      36. une: yields true if either operand is a QNAN or op1 is not equal to op2.
      37. uno: yields true if either operand is a QNAN.
      38. @@ -5167,7 +5144,7 @@ freestanding environments and non-C-based langauges.

        suffix is required. Because the argument's type is matched against the return type, it does not require its own name suffix.

        -

        To learn how to add an intrinsic function, please see the +

        To learn how to add an intrinsic function, please see the Extending LLVM Guide.

        @@ -6602,11 +6579,11 @@ LLVM.

        • ll: All loads before the barrier must complete before any load after the barrier begins.
        • -
        • ls: All loads before the barrier must complete before any +
        • ls: All loads before the barrier must complete before any store after the barrier begins.
        • -
        • ss: All stores before the barrier must complete before any +
        • ss: All stores before the barrier must complete before any store after the barrier begins.
        • -
        • sl: All stores before the barrier must complete before any +
        • sl: All stores before the barrier must complete before any load after the barrier begins.
        @@ -6819,7 +6796,7 @@ LLVM.

        Overview:
        -

        This intrinsic subtracts delta to the value stored in memory at +

        This intrinsic subtracts delta to the value stored in memory at ptr. It yields the original value at ptr.

        Arguments:
        @@ -6975,7 +6952,7 @@ LLVM.

        Overview:
        -

        These intrinsics takes the signed or unsigned minimum or maximum of +

        These intrinsics takes the signed or unsigned minimum or maximum of delta and the value stored in memory at ptr. It yields the original value at ptr.

        @@ -7271,6 +7248,61 @@ LLVM.

        + + + +
        + +
        Syntax:
        +
        +  declare i32 @llvm.objectsize.i32( i8* <ptr>, i32 <type> )
        +  declare i64 @llvm.objectsize.i64( i8* <ptr>, i32 <type> )
        +
        + +
        Overview:
        +

        The llvm.objectsize intrinsic is designed to provide information + to the optimizers to either discover at compile time either a) when an + operation like memcpy will either overflow a buffer that corresponds to + an object, or b) to determine that a runtime check for overflow isn't + necessary. An object in this context means an allocation of a + specific type.

        + +
        Arguments:
        +

        The llvm.objectsize intrinsic takes two arguments. The first + argument is a pointer to the object ptr. The second argument + is an integer type which ranges from 0 to 3. The first bit in + the type corresponds to a return value based on whole objects, + and the second bit whether or not we return the maximum or minimum + remaining bytes computed.

        + + + + + + + + + + + + + + + + + +
        00whole object, maximum number of bytes
        01partial object, maximum number of bytes
        10whole object, minimum number of bytes
        11partial object, minimum number of bytes
        + +
        Semantics:
        +

        The llvm.objectsize intrinsic is lowered to either a constant + representing the size of the object concerned or i32/i64 -1 or 0 + (depending on the type argument if the size cannot be determined + at compile time.

        + +
        +