diff --git a/docs/LangRef.html b/docs/LangRef.html index 691e34171fc..45f6f38f598 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -5,7 +5,7 @@
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 @@ -1192,7 +1192,7 @@ target datalayout = "layout specification" location.
%A = xor undef, undef - + %B = undef %C = xor %B, %B @@ -2137,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 @@ -2149,7 +2149,7 @@ b: unreachableThese 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.
@@ -2166,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 @@ -2175,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. @@ -2703,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.
@@ -3060,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.
- +The value produced is the integer product of the two operands.
@@ -3132,7 +3132,7 @@ InstructionThe 'udiv' instruction returns the quotient of its two operands.
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.
@@ -3167,7 +3167,7 @@ InstructionThe 'sdiv' instruction returns the quotient of its two operands.
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.
@@ -3238,7 +3238,7 @@ Instruction division of its two 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.
@@ -3278,7 +3278,7 @@ Instruction elements must be integers.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.
@@ -3373,7 +3373,7 @@ InstructionBoth arguments to the 'shl' instruction must be the same integer or vector of integer type. 'op2' is treated as an unsigned value.
- +The value produced is op1 * 2op2 mod 2n, where n is the width of the result. If op2 @@ -3409,7 +3409,7 @@ Instruction operand shifted to the right a specified number of bits with zero fill.
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.
@@ -3449,7 +3449,7 @@ Instruction extension.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.
@@ -3489,7 +3489,7 @@ Instruction operands.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.
@@ -3548,7 +3548,7 @@ Instruction two operands.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.
@@ -3611,7 +3611,7 @@ Instruction complement" operation, which is the "~" operator in C.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.
@@ -3659,7 +3659,7 @@ Instruction -- <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>-
The 'zext' instruction zero extends its operand to type +
The 'zext' instruction zero extends its operand to type ty2.
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.
The 'sext' sign extends value to the type ty2.
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.
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.
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.
@@ -4358,7 +4358,7 @@ entry: floating point value.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.
@@ -4401,7 +4401,7 @@ entry: vector integer type with the same number of elements as tyThe '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.
@@ -4427,7 +4427,7 @@ entry:The 'fptosi' instruction converts +
The 'fptosi' instruction converts floating point value to type ty2.
@@ -4439,7 +4439,7 @@ entry: vector integer type with the same number of elements as tyThe '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.
@@ -4636,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
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.
@@ -6579,11 +6579,11 @@ LLVM.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.
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.
@@ -7262,24 +7262,44 @@ LLVM.The llvm.objectsize intrinsic returns the constant number of bytes - from ptr to the end of the object ptr points to, if it - can deduce this at compile time. If there are any side-effects in evaluating - the argument or it cannot deduce which objects ptr points to at compile - time, the intrinsic returns i32/i64 -1 for type 0 - or 1 and i32/i64 0 for type 2 or 3.
+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.
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 - 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.
+ 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. +00 | +whole object, maximum number of bytes | +
01 | +partial object, maximum number of bytes | +
10 | +whole object, minimum number of bytes | +
11 | +partial object, minimum number of bytes | +
The llvm.objectsize intrinsic is lowered to either a constant - representing the size of the object concerned or i32/i64 -1 if - it cannot be determined at compile time.
+ 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.