Syntax:
@@ -3012,11 +3069,11 @@ IfUnequal:
-
+
-
+
Syntax:
@@ -3060,11 +3117,11 @@ IfUnequal:
-
+
-
+
Syntax:
@@ -3150,10 +3207,11 @@ that the invoke/unwind semantics are likely to change in future versions.
-
+
-
+
Syntax:
@@ -3181,10 +3239,11 @@ that the invoke/unwind semantics are likely to change in future versions.
-
+
-
+
Syntax:
@@ -3202,10 +3261,14 @@ Instruction
+
+
-
+
-
+
Binary operators are used to do most of the computation in a program. They
require two operands of the same type, execute an operation on them, and
@@ -3215,14 +3278,12 @@ Instruction
There are several different binary operators:
-
-
-
+
-
+
Syntax:
@@ -3263,11 +3324,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3293,11 +3354,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3345,11 +3406,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3381,11 +3442,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3431,11 +3492,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3461,10 +3522,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3501,10 +3563,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3543,10 +3606,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3572,10 +3636,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3609,11 +3674,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3660,10 +3725,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3690,11 +3756,14 @@ Instruction
+
+
-
+
-
+
Bitwise binary operators are used to do various forms of bit-twiddling in a
program. They are generally very efficient instructions and can commonly be
@@ -3702,13 +3771,12 @@ Operations
same type, execute an operation on them, and produce a single value. The
resulting value is the same type as its operands.
-
-
-
+
-
+
Syntax:
@@ -3755,10 +3823,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3801,9 +3870,11 @@ Instruction
-
-
+
+
+
Syntax:
@@ -3846,10 +3917,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3906,9 +3978,11 @@ Instruction
-
+
-
+
Syntax:
@@ -3967,10 +4041,11 @@ Instruction
-
+
-
+
Syntax:
@@ -4030,12 +4105,14 @@ Instruction
+
+
-
+
-
+
LLVM supports several instructions to represent vector operations in a
target-independent manner. These instructions cover the element-access and
@@ -4044,14 +4121,12 @@ Instruction
will want to use target-specific intrinsics to take full advantage of a
specific target.
-
-
-
+
-
+
Syntax:
@@ -4083,11 +4158,11 @@ Instruction
-
+
-
+
Syntax:
@@ -4119,11 +4194,11 @@ Instruction
-
+
-
+
Syntax:
@@ -4166,24 +4241,24 @@ Instruction
+
+
-
+
-
+
LLVM supports several instructions for working with
aggregate values.
-
-
-
+
-
+
Syntax:
@@ -4221,15 +4296,15 @@ Instruction
-
+
-
+
Syntax:
- <result> = insertvalue <aggregate type> <val>, <ty> <elt>, <idx> ; yields <aggregate type>
+ <result> = insertvalue <aggregate type> <val>, <ty> <elt>, <idx>{, }* ; yields <aggregate type>
Overview:
@@ -4253,33 +4328,33 @@ Instruction
Example:
- %agg1 = insertvalue {i32, float} undef, i32 1, 0 ; yields {i32 1, float undef}
- %agg2 = insertvalue {i32, float} %agg1, float %val, 1 ; yields {i32 1, float %val}
+ %agg1 = insertvalue {i32, float} undef, i32 1, 0 ; yields {i32 1, float undef}
+ %agg2 = insertvalue {i32, float} %agg1, float %val, 1 ; yields {i32 1, float %val}
+ %agg3 = insertvalue {i32, {float}} %agg1, float %val, 1, 0 ; yields {i32 1, float %val}
+
-
+
-
+
A key design point of an SSA-based representation is how it represents
memory. In LLVM, no memory locations are in SSA form, which makes things
very simple. This section describes how to read, write, and allocate
memory in LLVM.
-
-
-
+
-
+
Syntax:
@@ -4326,10 +4401,11 @@ Instruction
-
+
-
+
Syntax:
@@ -4384,10 +4460,11 @@ Instruction
-
+
-
+
Syntax:
@@ -4445,11 +4522,11 @@ Instruction
-
+
-
+
Syntax:
@@ -4575,23 +4652,25 @@ entry:
-
-
-
+
+
+
+
The instructions in this category are the conversion instructions (casting)
which all take a single operand and a type. They perform various bit
conversions on the operand.
-
-
-
-
+
+
+
Syntax:
@@ -4627,10 +4706,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -4666,10 +4746,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -4704,11 +4785,11 @@ entry:
-
+
-
+
Syntax:
@@ -4742,10 +4823,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -4778,10 +4860,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -4815,10 +4898,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -4853,10 +4937,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -4889,10 +4974,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -4924,10 +5010,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -4961,10 +5048,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -4998,10 +5086,11 @@ entry:
-
-
+
+
+
Syntax:
@@ -5040,21 +5129,24 @@ entry:
+
+
-
+
-
+
The instructions in this category are the "miscellaneous" instructions, which
defy better classification.
-
-
-
+
-
+
Syntax:
@@ -5153,10 +5245,11 @@ entry:
-
+
-
+
Syntax:
@@ -5273,11 +5366,11 @@ entry:
-
+
-
+
Syntax:
@@ -5321,11 +5414,11 @@ Loop: ; Infinite loop that counts from 0 on up...
-
+
-
+
Syntax:
@@ -5364,11 +5457,11 @@ Loop: ; Infinite loop that counts from 0 on up...
-
+
-
+
Syntax:
@@ -5473,11 +5566,11 @@ freestanding environments and non-C-based languages.
-
+
-
+
Syntax:
@@ -5518,11 +5611,15 @@ freestanding environments and non-C-based languages.
+
+
+
+
-
+
-
+
LLVM supports the notion of an "intrinsic function". These functions have
well known names and semantics and are required to follow certain
@@ -5565,14 +5662,12 @@ freestanding environments and non-C-based languages.
To learn how to add an intrinsic function, please see the
Extending LLVM Guide.
-
-
-
+
-
+
Variable argument support is defined in LLVM with
the va_arg instruction and these three
@@ -5614,15 +5709,13 @@ declare void @llvm.va_copy(i8*, i8*)
declare void @llvm.va_end(i8*)
-
-
-
+
-
+
Syntax:
@@ -5648,11 +5741,11 @@ declare void @llvm.va_end(i8*)
-
+
-
+
Syntax:
@@ -5679,11 +5772,11 @@ declare void @llvm.va_end(i8*)
-
+
-
+
Syntax:
@@ -5709,12 +5802,14 @@ declare void @llvm.va_end(i8*)
+
+
-
+
-
+
LLVM support for Accurate Garbage
Collection (GC) requires the implementation and generation of these
@@ -5729,14 +5824,12 @@ LLVM.
The garbage collection intrinsics only operate on objects in the generic
address space (address space zero).
-
-
-
+
-
+
Syntax:
@@ -5763,11 +5856,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -5795,11 +5888,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -5826,24 +5919,24 @@ LLVM.
+
+
-
+
-
+
These intrinsics are provided by LLVM to expose special features that may
only be implemented with code generator support.
-
-
-
+
-
+
Syntax:
@@ -5874,11 +5967,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -5908,11 +6001,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -5938,11 +6031,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -5963,11 +6056,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -5996,11 +6089,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -6027,11 +6120,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -6053,26 +6146,26 @@ LLVM.
+
+
-
+
-
+
LLVM provides intrinsics for a few important standard C library functions.
These intrinsics allow source-language front-ends to pass information about
the alignment of the pointer arguments to the code generator, providing
opportunity for more efficient code generation.
-
-
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.memcpy on any
@@ -6122,11 +6215,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.memmove on any integer bit
@@ -6178,11 +6271,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.memset on any integer bit
@@ -6228,11 +6321,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.sqrt on any
@@ -6266,11 +6359,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.powi on any
@@ -6302,11 +6395,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.sin on any
@@ -6336,11 +6429,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.cos on any
@@ -6370,11 +6463,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.pow on any
@@ -6404,24 +6497,90 @@ LLVM.
+
+
+
+
+
+
+
+
Syntax:
+
This is an overloaded intrinsic. You can use llvm.exp on any
+ floating point or vector of floating point type. Not all targets support all
+ types however.
+
+
+ declare float @llvm.exp.f32(float %Val)
+ declare double @llvm.exp.f64(double %Val)
+ declare x86_fp80 @llvm.exp.f80(x86_fp80 %Val)
+ declare fp128 @llvm.exp.f128(fp128 %Val)
+ declare ppc_fp128 @llvm.exp.ppcf128(ppc_fp128 %Val)
+
+
+
Overview:
+
The 'llvm.exp.*' intrinsics perform the exp function.
+
+
Arguments:
+
The argument and return value are floating point numbers of the same
+ type.
+
+
Semantics:
+
This function returns the same values as the libm exp functions
+ would, and handles error conditions in the same way.
+
+
+
+
+
+
+
+
+
Syntax:
+
This is an overloaded intrinsic. You can use llvm.log on any
+ floating point or vector of floating point type. Not all targets support all
+ types however.
+
+
+ declare float @llvm.log.f32(float %Val)
+ declare double @llvm.log.f64(double %Val)
+ declare x86_fp80 @llvm.log.f80(x86_fp80 %Val)
+ declare fp128 @llvm.log.f128(fp128 %Val)
+ declare ppc_fp128 @llvm.log.ppcf128(ppc_fp128 %Val)
+
+
+
Overview:
+
The 'llvm.log.*' intrinsics perform the log function.
+
+
Arguments:
+
The argument and return value are floating point numbers of the same
+ type.
+
+
Semantics:
+
This function returns the same values as the libm log functions
+ would, and handles error conditions in the same way.
+
+
+
-
+
-
+
LLVM provides intrinsics for a few important bit manipulation operations.
These allow efficient code generation for some algorithms.
-
-
-
+
-
+
Syntax:
This is an overloaded intrinsic function. You can use bswap on any integer
@@ -6452,11 +6611,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.ctpop on any integer bit
@@ -6484,11 +6643,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.ctlz on any
@@ -6518,11 +6677,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.cttz on any
@@ -6551,23 +6710,25 @@ LLVM.
+
+
-
+
-
+
LLVM provides intrinsics for some arithmetic with overflow operations.
-
-
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.sadd.with.overflow
@@ -6609,11 +6770,13 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.uadd.with.overflow
@@ -6654,11 +6817,13 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.ssub.with.overflow
@@ -6700,11 +6865,13 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.usub.with.overflow
@@ -6746,11 +6913,13 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.smul.with.overflow
@@ -6793,11 +6962,13 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.umul.with.overflow
@@ -6838,12 +7009,14 @@ LLVM.
+
+
-
+
-
+
Half precision floating point is a storage-only format. This means that it is
a dense encoding (in memory) but does not support computation in the
@@ -6857,14 +7030,15 @@ LLVM.
float if needed, then converted to i16 with
llvm.convert.to.fp16, then
storing as an i16 value.
-
-
+
-
+
Syntax:
@@ -6895,11 +7069,13 @@ LLVM.
-
+
-
+
Syntax:
@@ -6929,12 +7105,14 @@ LLVM.
+
+
-
+
-
+
The LLVM debugger intrinsics (which all start with llvm.dbg.
prefix), are described in
@@ -6944,11 +7122,11 @@ LLVM.
-
+
-
+
The LLVM exception handling intrinsics (which all start with
llvm.eh. prefix), are described in
@@ -6958,11 +7136,11 @@ LLVM.
-
+
-
+
This intrinsic makes it possible to excise one parameter, marked with
the nest attribute, from a function.
@@ -6988,14 +7166,14 @@ LLVM.
The call %val = call i32 %fp(i32 %x, i32 %y) is then equivalent
to %val = call i32 %f(i8* %nval, i32 %x, i32 %y).
-
-
-
+
-
+
Syntax:
@@ -7032,12 +7210,14 @@ LLVM.
+
+
-
+
-
+
These intrinsic functions expand the "universal IR" of LLVM to represent
hardware constructs for atomic operations and memory synchronization. This
@@ -7057,13 +7237,12 @@ LLVM.
No one model or paradigm should be selected above others unless the hardware
itself ubiquitously does so.
-
-
-
-
+
+
+
Syntax:
declare void @llvm.memory.barrier(i1 <ll>, i1 <ls>, i1 <sl>, i1 <ss>, i1 <device>)
@@ -7131,11 +7310,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.atomic.cmp.swap on
@@ -7191,10 +7370,11 @@ LLVM.
-
-
+
+
+
Syntax:
This is an overloaded intrinsic. You can use llvm.atomic.swap on any
@@ -7247,12 +7427,11 @@ LLVM.
-
-
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.atomic.load.add on
@@ -7297,12 +7476,11 @@ LLVM.
-
-
-
+
Syntax:
This is an overloaded intrinsic. You can use llvm.atomic.load.sub on
@@ -7349,14 +7527,25 @@ LLVM.
-
-
-
+
+
+
Syntax:
These are overloaded intrinsics. You can
@@ -7429,14 +7618,25 @@ LLVM.
-
-
-
+
+
+
Syntax:
These are overloaded intrinsics. You can use llvm.atomic.load_max,
@@ -7507,25 +7707,24 @@ LLVM.
+
-
+
-
+
This class of intrinsics exists to information about the lifetime of memory
objects and ranges where variables are immutable.
-
-
-
+
-
+
Syntax:
@@ -7551,11 +7750,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -7580,11 +7779,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -7608,11 +7807,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -7634,24 +7833,24 @@ LLVM.
+
+
-
+
-
+
This class of intrinsics is designed to be generic and has no specific
purpose.
-
-
-
+
-
+
Syntax:
@@ -7675,11 +7874,11 @@ LLVM.
-
+
-
+
Syntax:
This is an overloaded intrinsic. You can use 'llvm.annotation' on
@@ -7711,11 +7910,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -7736,11 +7935,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -7770,11 +7969,11 @@ LLVM.
-
+
-
+
Syntax:
@@ -7804,6 +8003,10 @@ LLVM.
+
+
+
+