[www-releases] r208244 - Add source, binaries, and documentation for 3.4.1 release

Tom Stellard thomas.stellard at amd.com
Wed May 7 13:09:36 PDT 2014


Added: www-releases/trunk/3.4.1/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/LangRef.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/LangRef.html (added)
+++ www-releases/trunk/3.4.1/docs/LangRef.html Wed May  7 15:09:32 2014
@@ -0,0 +1,8137 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>LLVM Language Reference Manual — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="index.html" />
+    <link rel="next" title="Building LLVM with CMake" href="CMake.html" />
+    <link rel="prev" title="Overview" href="index.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="index.html">
+    <img src="_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="CMake.html" title="Building LLVM with CMake"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="index.html" title="Overview"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="index.html">Documentation</a>»</li>
+ 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="llvm-language-reference-manual">
+<h1>LLVM Language Reference Manual<a class="headerlink" href="#llvm-language-reference-manual" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#abstract" id="id571">Abstract</a></li>
+<li><a class="reference internal" href="#introduction" id="id572">Introduction</a><ul>
+<li><a class="reference internal" href="#well-formedness" id="id573">Well-Formedness</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#identifiers" id="id574">Identifiers</a></li>
+<li><a class="reference internal" href="#high-level-structure" id="id575">High Level Structure</a><ul>
+<li><a class="reference internal" href="#module-structure" id="id576">Module Structure</a></li>
+<li><a class="reference internal" href="#linkage-types" id="id577">Linkage Types</a></li>
+<li><a class="reference internal" href="#calling-conventions" id="id578">Calling Conventions</a></li>
+<li><a class="reference internal" href="#visibility-styles" id="id579">Visibility Styles</a></li>
+<li><a class="reference internal" href="#named-types" id="id580">Named Types</a></li>
+<li><a class="reference internal" href="#global-variables" id="id581">Global Variables</a></li>
+<li><a class="reference internal" href="#functions" id="id582">Functions</a></li>
+<li><a class="reference internal" href="#aliases" id="id583">Aliases</a></li>
+<li><a class="reference internal" href="#named-metadata" id="id584">Named Metadata</a></li>
+<li><a class="reference internal" href="#parameter-attributes" id="id585">Parameter Attributes</a></li>
+<li><a class="reference internal" href="#garbage-collector-names" id="id586">Garbage Collector Names</a></li>
+<li><a class="reference internal" href="#prefix-data" id="id587">Prefix Data</a></li>
+<li><a class="reference internal" href="#attribute-groups" id="id588">Attribute Groups</a></li>
+<li><a class="reference internal" href="#function-attributes" id="id589">Function Attributes</a></li>
+<li><a class="reference internal" href="#module-level-inline-assembly" id="id590">Module-Level Inline Assembly</a></li>
+<li><a class="reference internal" href="#data-layout" id="id591">Data Layout</a></li>
+<li><a class="reference internal" href="#target-triple" id="id592">Target Triple</a></li>
+<li><a class="reference internal" href="#pointer-aliasing-rules" id="id593">Pointer Aliasing Rules</a></li>
+<li><a class="reference internal" href="#volatile-memory-accesses" id="id594">Volatile Memory Accesses</a></li>
+<li><a class="reference internal" href="#memory-model-for-concurrent-operations" id="id595">Memory Model for Concurrent Operations</a></li>
+<li><a class="reference internal" href="#atomic-memory-ordering-constraints" id="id596">Atomic Memory Ordering Constraints</a></li>
+<li><a class="reference internal" href="#fast-math-flags" id="id597">Fast-Math Flags</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#type-system" id="id598">Type System</a><ul>
+<li><a class="reference internal" href="#type-classifications" id="id599">Type Classifications</a></li>
+<li><a class="reference internal" href="#primitive-types" id="id600">Primitive Types</a><ul>
+<li><a class="reference internal" href="#integer-type" id="id601">Integer Type</a></li>
+<li><a class="reference internal" href="#floating-point-types" id="id602">Floating Point Types</a></li>
+<li><a class="reference internal" href="#x86mmx-type" id="id603">X86mmx Type</a></li>
+<li><a class="reference internal" href="#void-type" id="id604">Void Type</a></li>
+<li><a class="reference internal" href="#label-type" id="id605">Label Type</a></li>
+<li><a class="reference internal" href="#metadata-type" id="id606">Metadata Type</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#derived-types" id="id607">Derived Types</a><ul>
+<li><a class="reference internal" href="#aggregate-types" id="id608">Aggregate Types</a></li>
+<li><a class="reference internal" href="#array-type" id="id609">Array Type</a></li>
+<li><a class="reference internal" href="#function-type" id="id610">Function Type</a></li>
+<li><a class="reference internal" href="#structure-type" id="id611">Structure Type</a></li>
+<li><a class="reference internal" href="#opaque-structure-types" id="id612">Opaque Structure Types</a></li>
+<li><a class="reference internal" href="#pointer-type" id="id613">Pointer Type</a></li>
+<li><a class="reference internal" href="#vector-type" id="id614">Vector Type</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference internal" href="#constants" id="id615">Constants</a><ul>
+<li><a class="reference internal" href="#simple-constants" id="id616">Simple Constants</a></li>
+<li><a class="reference internal" href="#complex-constants" id="id617">Complex Constants</a></li>
+<li><a class="reference internal" href="#global-variable-and-function-addresses" id="id618">Global Variable and Function Addresses</a></li>
+<li><a class="reference internal" href="#undefined-values" id="id619">Undefined Values</a></li>
+<li><a class="reference internal" href="#poison-values" id="id620">Poison Values</a></li>
+<li><a class="reference internal" href="#addresses-of-basic-blocks" id="id621">Addresses of Basic Blocks</a></li>
+<li><a class="reference internal" href="#constant-expressions" id="id622">Constant Expressions</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#other-values" id="id623">Other Values</a><ul>
+<li><a class="reference internal" href="#inline-assembler-expressions" id="id624">Inline Assembler Expressions</a><ul>
+<li><a class="reference internal" href="#inline-asm-metadata" id="id625">Inline Asm Metadata</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#metadata-nodes-and-metadata-strings" id="id626">Metadata Nodes and Metadata Strings</a><ul>
+<li><a class="reference internal" href="#tbaa-metadata" id="id627">‘<tt class="docutils literal"><span class="pre">tbaa</span></tt>‘ Metadata</a></li>
+<li><a class="reference internal" href="#tbaa-struct-metadata" id="id628">‘<tt class="docutils literal"><span class="pre">tbaa.struct</span></tt>‘ Metadata</a></li>
+<li><a class="reference internal" href="#fpmath-metadata" id="id629">‘<tt class="docutils literal"><span class="pre">fpmath</span></tt>‘ Metadata</a></li>
+<li><a class="reference internal" href="#range-metadata" id="id630">‘<tt class="docutils literal"><span class="pre">range</span></tt>‘ Metadata</a></li>
+<li><a class="reference internal" href="#llvm-loop" id="id631">‘<tt class="docutils literal"><span class="pre">llvm.loop</span></tt>‘</a></li>
+<li><a class="reference internal" href="#llvm-mem" id="id632">‘<tt class="docutils literal"><span class="pre">llvm.mem</span></tt>‘</a></li>
+<li><a class="reference internal" href="#llvm-mem-parallel-loop-access-metadata" id="id633">‘<tt class="docutils literal"><span class="pre">llvm.mem.parallel_loop_access</span></tt>‘ Metadata</a></li>
+<li><a class="reference internal" href="#llvm-vectorizer" id="id634">‘<tt class="docutils literal"><span class="pre">llvm.vectorizer</span></tt>‘</a></li>
+<li><a class="reference internal" href="#llvm-vectorizer-unroll-metadata" id="id635">‘<tt class="docutils literal"><span class="pre">llvm.vectorizer.unroll</span></tt>‘ Metadata</a></li>
+<li><a class="reference internal" href="#llvm-vectorizer-width-metadata" id="id636">‘<tt class="docutils literal"><span class="pre">llvm.vectorizer.width</span></tt>‘ Metadata</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference internal" href="#module-flags-metadata" id="id637">Module Flags Metadata</a><ul>
+<li><a class="reference internal" href="#objective-c-garbage-collection-module-flags-metadata" id="id638">Objective-C Garbage Collection Module Flags Metadata</a></li>
+<li><a class="reference internal" href="#automatic-linker-flags-module-flags-metadata" id="id639">Automatic Linker Flags Module Flags Metadata</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#intrinsic-global-variables" id="id640">Intrinsic Global Variables</a><ul>
+<li><a class="reference internal" href="#the-llvm-used-global-variable" id="id641">The ‘<tt class="docutils literal"><span class="pre">llvm.used</span></tt>‘ Global Variable</a></li>
+<li><a class="reference internal" href="#the-llvm-compiler-used-global-variable" id="id642">The ‘<tt class="docutils literal"><span class="pre">llvm.compiler.used</span></tt>‘ Global Variable</a></li>
+<li><a class="reference internal" href="#the-llvm-global-ctors-global-variable" id="id643">The ‘<tt class="docutils literal"><span class="pre">llvm.global_ctors</span></tt>‘ Global Variable</a></li>
+<li><a class="reference internal" href="#the-llvm-global-dtors-global-variable" id="id644">The ‘<tt class="docutils literal"><span class="pre">llvm.global_dtors</span></tt>‘ Global Variable</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#instruction-reference" id="id645">Instruction Reference</a><ul>
+<li><a class="reference internal" href="#terminator-instructions" id="id646">Terminator Instructions</a><ul>
+<li><a class="reference internal" href="#ret-instruction" id="id647">‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#br-instruction" id="id648">‘<tt class="docutils literal"><span class="pre">br</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#switch-instruction" id="id649">‘<tt class="docutils literal"><span class="pre">switch</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#indirectbr-instruction" id="id650">‘<tt class="docutils literal"><span class="pre">indirectbr</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#invoke-instruction" id="id651">‘<tt class="docutils literal"><span class="pre">invoke</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#resume-instruction" id="id652">‘<tt class="docutils literal"><span class="pre">resume</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#unreachable-instruction" id="id653">‘<tt class="docutils literal"><span class="pre">unreachable</span></tt>‘ Instruction</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#binary-operations" id="id654">Binary Operations</a><ul>
+<li><a class="reference internal" href="#add-instruction" id="id655">‘<tt class="docutils literal"><span class="pre">add</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fadd-instruction" id="id656">‘<tt class="docutils literal"><span class="pre">fadd</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#sub-instruction" id="id657">‘<tt class="docutils literal"><span class="pre">sub</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fsub-instruction" id="id658">‘<tt class="docutils literal"><span class="pre">fsub</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#mul-instruction" id="id659">‘<tt class="docutils literal"><span class="pre">mul</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fmul-instruction" id="id660">‘<tt class="docutils literal"><span class="pre">fmul</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#udiv-instruction" id="id661">‘<tt class="docutils literal"><span class="pre">udiv</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#sdiv-instruction" id="id662">‘<tt class="docutils literal"><span class="pre">sdiv</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fdiv-instruction" id="id663">‘<tt class="docutils literal"><span class="pre">fdiv</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#urem-instruction" id="id664">‘<tt class="docutils literal"><span class="pre">urem</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#srem-instruction" id="id665">‘<tt class="docutils literal"><span class="pre">srem</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#frem-instruction" id="id666">‘<tt class="docutils literal"><span class="pre">frem</span></tt>‘ Instruction</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#bitwise-binary-operations" id="id667">Bitwise Binary Operations</a><ul>
+<li><a class="reference internal" href="#shl-instruction" id="id668">‘<tt class="docutils literal"><span class="pre">shl</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#lshr-instruction" id="id669">‘<tt class="docutils literal"><span class="pre">lshr</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#ashr-instruction" id="id670">‘<tt class="docutils literal"><span class="pre">ashr</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#and-instruction" id="id671">‘<tt class="docutils literal"><span class="pre">and</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#or-instruction" id="id672">‘<tt class="docutils literal"><span class="pre">or</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#xor-instruction" id="id673">‘<tt class="docutils literal"><span class="pre">xor</span></tt>‘ Instruction</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#vector-operations" id="id674">Vector Operations</a><ul>
+<li><a class="reference internal" href="#extractelement-instruction" id="id675">‘<tt class="docutils literal"><span class="pre">extractelement</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#insertelement-instruction" id="id676">‘<tt class="docutils literal"><span class="pre">insertelement</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#shufflevector-instruction" id="id677">‘<tt class="docutils literal"><span class="pre">shufflevector</span></tt>‘ Instruction</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#aggregate-operations" id="id678">Aggregate Operations</a><ul>
+<li><a class="reference internal" href="#extractvalue-instruction" id="id679">‘<tt class="docutils literal"><span class="pre">extractvalue</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#insertvalue-instruction" id="id680">‘<tt class="docutils literal"><span class="pre">insertvalue</span></tt>‘ Instruction</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#memory-access-and-addressing-operations" id="id681">Memory Access and Addressing Operations</a><ul>
+<li><a class="reference internal" href="#alloca-instruction" id="id682">‘<tt class="docutils literal"><span class="pre">alloca</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#load-instruction" id="id683">‘<tt class="docutils literal"><span class="pre">load</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#store-instruction" id="id684">‘<tt class="docutils literal"><span class="pre">store</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fence-instruction" id="id685">‘<tt class="docutils literal"><span class="pre">fence</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#cmpxchg-instruction" id="id686">‘<tt class="docutils literal"><span class="pre">cmpxchg</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#atomicrmw-instruction" id="id687">‘<tt class="docutils literal"><span class="pre">atomicrmw</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#getelementptr-instruction" id="id688">‘<tt class="docutils literal"><span class="pre">getelementptr</span></tt>‘ Instruction</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#conversion-operations" id="id689">Conversion Operations</a><ul>
+<li><a class="reference internal" href="#trunc-to-instruction" id="id690">‘<tt class="docutils literal"><span class="pre">trunc</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#zext-to-instruction" id="id691">‘<tt class="docutils literal"><span class="pre">zext</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#sext-to-instruction" id="id692">‘<tt class="docutils literal"><span class="pre">sext</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fptrunc-to-instruction" id="id693">‘<tt class="docutils literal"><span class="pre">fptrunc</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fpext-to-instruction" id="id694">‘<tt class="docutils literal"><span class="pre">fpext</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fptoui-to-instruction" id="id695">‘<tt class="docutils literal"><span class="pre">fptoui</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fptosi-to-instruction" id="id696">‘<tt class="docutils literal"><span class="pre">fptosi</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#uitofp-to-instruction" id="id697">‘<tt class="docutils literal"><span class="pre">uitofp</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#sitofp-to-instruction" id="id698">‘<tt class="docutils literal"><span class="pre">sitofp</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#ptrtoint-to-instruction" id="id699">‘<tt class="docutils literal"><span class="pre">ptrtoint</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#inttoptr-to-instruction" id="id700">‘<tt class="docutils literal"><span class="pre">inttoptr</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#bitcast-to-instruction" id="id701">‘<tt class="docutils literal"><span class="pre">bitcast</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#addrspacecast-to-instruction" id="id702">‘<tt class="docutils literal"><span class="pre">addrspacecast</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#other-operations" id="id703">Other Operations</a><ul>
+<li><a class="reference internal" href="#icmp-instruction" id="id704">‘<tt class="docutils literal"><span class="pre">icmp</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#fcmp-instruction" id="id705">‘<tt class="docutils literal"><span class="pre">fcmp</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#phi-instruction" id="id706">‘<tt class="docutils literal"><span class="pre">phi</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#select-instruction" id="id707">‘<tt class="docutils literal"><span class="pre">select</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#call-instruction" id="id708">‘<tt class="docutils literal"><span class="pre">call</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#va-arg-instruction" id="id709">‘<tt class="docutils literal"><span class="pre">va_arg</span></tt>‘ Instruction</a></li>
+<li><a class="reference internal" href="#landingpad-instruction" id="id710">‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ Instruction</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference internal" href="#intrinsic-functions" id="id711">Intrinsic Functions</a><ul>
+<li><a class="reference internal" href="#variable-argument-handling-intrinsics" id="id712">Variable Argument Handling Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-va-start-intrinsic" id="id713">‘<tt class="docutils literal"><span class="pre">llvm.va_start</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-va-end-intrinsic" id="id714">‘<tt class="docutils literal"><span class="pre">llvm.va_end</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-va-copy-intrinsic" id="id715">‘<tt class="docutils literal"><span class="pre">llvm.va_copy</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#accurate-garbage-collection-intrinsics" id="id716">Accurate Garbage Collection Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-gcroot-intrinsic" id="id717">‘<tt class="docutils literal"><span class="pre">llvm.gcroot</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-gcread-intrinsic" id="id718">‘<tt class="docutils literal"><span class="pre">llvm.gcread</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-gcwrite-intrinsic" id="id719">‘<tt class="docutils literal"><span class="pre">llvm.gcwrite</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#code-generator-intrinsics" id="id720">Code Generator Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-returnaddress-intrinsic" id="id721">‘<tt class="docutils literal"><span class="pre">llvm.returnaddress</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-frameaddress-intrinsic" id="id722">‘<tt class="docutils literal"><span class="pre">llvm.frameaddress</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-stacksave-intrinsic" id="id723">‘<tt class="docutils literal"><span class="pre">llvm.stacksave</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-stackrestore-intrinsic" id="id724">‘<tt class="docutils literal"><span class="pre">llvm.stackrestore</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-prefetch-intrinsic" id="id725">‘<tt class="docutils literal"><span class="pre">llvm.prefetch</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-pcmarker-intrinsic" id="id726">‘<tt class="docutils literal"><span class="pre">llvm.pcmarker</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-readcyclecounter-intrinsic" id="id727">‘<tt class="docutils literal"><span class="pre">llvm.readcyclecounter</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#standard-c-library-intrinsics" id="id728">Standard C Library Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-memcpy-intrinsic" id="id729">‘<tt class="docutils literal"><span class="pre">llvm.memcpy</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-memmove-intrinsic" id="id730">‘<tt class="docutils literal"><span class="pre">llvm.memmove</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-memset-intrinsics" id="id731">‘<tt class="docutils literal"><span class="pre">llvm.memset.*</span></tt>‘ Intrinsics</a></li>
+<li><a class="reference internal" href="#llvm-sqrt-intrinsic" id="id732">‘<tt class="docutils literal"><span class="pre">llvm.sqrt.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-powi-intrinsic" id="id733">‘<tt class="docutils literal"><span class="pre">llvm.powi.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-sin-intrinsic" id="id734">‘<tt class="docutils literal"><span class="pre">llvm.sin.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-cos-intrinsic" id="id735">‘<tt class="docutils literal"><span class="pre">llvm.cos.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-pow-intrinsic" id="id736">‘<tt class="docutils literal"><span class="pre">llvm.pow.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-exp-intrinsic" id="id737">‘<tt class="docutils literal"><span class="pre">llvm.exp.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-exp2-intrinsic" id="id738">‘<tt class="docutils literal"><span class="pre">llvm.exp2.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-log-intrinsic" id="id739">‘<tt class="docutils literal"><span class="pre">llvm.log.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-log10-intrinsic" id="id740">‘<tt class="docutils literal"><span class="pre">llvm.log10.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-log2-intrinsic" id="id741">‘<tt class="docutils literal"><span class="pre">llvm.log2.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-fma-intrinsic" id="id742">‘<tt class="docutils literal"><span class="pre">llvm.fma.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-fabs-intrinsic" id="id743">‘<tt class="docutils literal"><span class="pre">llvm.fabs.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-copysign-intrinsic" id="id744">‘<tt class="docutils literal"><span class="pre">llvm.copysign.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-floor-intrinsic" id="id745">‘<tt class="docutils literal"><span class="pre">llvm.floor.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-ceil-intrinsic" id="id746">‘<tt class="docutils literal"><span class="pre">llvm.ceil.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-trunc-intrinsic" id="id747">‘<tt class="docutils literal"><span class="pre">llvm.trunc.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-rint-intrinsic" id="id748">‘<tt class="docutils literal"><span class="pre">llvm.rint.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-nearbyint-intrinsic" id="id749">‘<tt class="docutils literal"><span class="pre">llvm.nearbyint.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-round-intrinsic" id="id750">‘<tt class="docutils literal"><span class="pre">llvm.round.*</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#bit-manipulation-intrinsics" id="id751">Bit Manipulation Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-bswap-intrinsics" id="id752">‘<tt class="docutils literal"><span class="pre">llvm.bswap.*</span></tt>‘ Intrinsics</a></li>
+<li><a class="reference internal" href="#llvm-ctpop-intrinsic" id="id753">‘<tt class="docutils literal"><span class="pre">llvm.ctpop.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-ctlz-intrinsic" id="id754">‘<tt class="docutils literal"><span class="pre">llvm.ctlz.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-cttz-intrinsic" id="id755">‘<tt class="docutils literal"><span class="pre">llvm.cttz.*</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#arithmetic-with-overflow-intrinsics" id="id756">Arithmetic with Overflow Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-sadd-with-overflow-intrinsics" id="id757">‘<tt class="docutils literal"><span class="pre">llvm.sadd.with.overflow.*</span></tt>‘ Intrinsics</a></li>
+<li><a class="reference internal" href="#llvm-uadd-with-overflow-intrinsics" id="id758">‘<tt class="docutils literal"><span class="pre">llvm.uadd.with.overflow.*</span></tt>‘ Intrinsics</a></li>
+<li><a class="reference internal" href="#llvm-ssub-with-overflow-intrinsics" id="id759">‘<tt class="docutils literal"><span class="pre">llvm.ssub.with.overflow.*</span></tt>‘ Intrinsics</a></li>
+<li><a class="reference internal" href="#llvm-usub-with-overflow-intrinsics" id="id760">‘<tt class="docutils literal"><span class="pre">llvm.usub.with.overflow.*</span></tt>‘ Intrinsics</a></li>
+<li><a class="reference internal" href="#llvm-smul-with-overflow-intrinsics" id="id761">‘<tt class="docutils literal"><span class="pre">llvm.smul.with.overflow.*</span></tt>‘ Intrinsics</a></li>
+<li><a class="reference internal" href="#llvm-umul-with-overflow-intrinsics" id="id762">‘<tt class="docutils literal"><span class="pre">llvm.umul.with.overflow.*</span></tt>‘ Intrinsics</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#specialised-arithmetic-intrinsics" id="id763">Specialised Arithmetic Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-fmuladd-intrinsic" id="id764">‘<tt class="docutils literal"><span class="pre">llvm.fmuladd.*</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#half-precision-floating-point-intrinsics" id="id765">Half Precision Floating Point Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-convert-to-fp16-intrinsic" id="id766">‘<tt class="docutils literal"><span class="pre">llvm.convert.to.fp16</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-convert-from-fp16-intrinsic" id="id767">‘<tt class="docutils literal"><span class="pre">llvm.convert.from.fp16</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#debugger-intrinsics" id="id768">Debugger Intrinsics</a></li>
+<li><a class="reference internal" href="#exception-handling-intrinsics" id="id769">Exception Handling Intrinsics</a></li>
+<li><a class="reference internal" href="#trampoline-intrinsics" id="id770">Trampoline Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-init-trampoline-intrinsic" id="id771">‘<tt class="docutils literal"><span class="pre">llvm.init.trampoline</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-adjust-trampoline-intrinsic" id="id772">‘<tt class="docutils literal"><span class="pre">llvm.adjust.trampoline</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#memory-use-markers" id="id773">Memory Use Markers</a><ul>
+<li><a class="reference internal" href="#llvm-lifetime-start-intrinsic" id="id774">‘<tt class="docutils literal"><span class="pre">llvm.lifetime.start</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-lifetime-end-intrinsic" id="id775">‘<tt class="docutils literal"><span class="pre">llvm.lifetime.end</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-invariant-start-intrinsic" id="id776">‘<tt class="docutils literal"><span class="pre">llvm.invariant.start</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-invariant-end-intrinsic" id="id777">‘<tt class="docutils literal"><span class="pre">llvm.invariant.end</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#general-intrinsics" id="id778">General Intrinsics</a><ul>
+<li><a class="reference internal" href="#llvm-var-annotation-intrinsic" id="id779">‘<tt class="docutils literal"><span class="pre">llvm.var.annotation</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-ptr-annotation-intrinsic" id="id780">‘<tt class="docutils literal"><span class="pre">llvm.ptr.annotation.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-annotation-intrinsic" id="id781">‘<tt class="docutils literal"><span class="pre">llvm.annotation.*</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-trap-intrinsic" id="id782">‘<tt class="docutils literal"><span class="pre">llvm.trap</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-debugtrap-intrinsic" id="id783">‘<tt class="docutils literal"><span class="pre">llvm.debugtrap</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-stackprotector-intrinsic" id="id784">‘<tt class="docutils literal"><span class="pre">llvm.stackprotector</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-stackprotectorcheck-intrinsic" id="id785">‘<tt class="docutils literal"><span class="pre">llvm.stackprotectorcheck</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-objectsize-intrinsic" id="id786">‘<tt class="docutils literal"><span class="pre">llvm.objectsize</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-expect-intrinsic" id="id787">‘<tt class="docutils literal"><span class="pre">llvm.expect</span></tt>‘ Intrinsic</a></li>
+<li><a class="reference internal" href="#llvm-donothing-intrinsic" id="id788">‘<tt class="docutils literal"><span class="pre">llvm.donothing</span></tt>‘ Intrinsic</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="section" id="abstract">
+<h2><a class="toc-backref" href="#id571">Abstract</a><a class="headerlink" href="#abstract" title="Permalink to this headline">¶</a></h2>
+<p>This document is a reference manual for the LLVM assembly language. LLVM
+is a Static Single Assignment (SSA) based representation that provides
+type safety, low-level operations, flexibility, and the capability of
+representing ‘all’ high-level languages cleanly. It is the common code
+representation used throughout all phases of the LLVM compilation
+strategy.</p>
+</div>
+<div class="section" id="introduction">
+<h2><a class="toc-backref" href="#id572">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
+<p>The LLVM code representation is designed to be used in three different
+forms: as an in-memory compiler IR, as an on-disk bitcode representation
+(suitable for fast loading by a Just-In-Time compiler), and as a human
+readable assembly language representation. This allows LLVM to provide a
+powerful intermediate representation for efficient compiler
+transformations and analysis, while providing a natural means to debug
+and visualize the transformations. The three different forms of LLVM are
+all equivalent. This document describes the human readable
+representation and notation.</p>
+<p>The LLVM representation aims to be light-weight and low-level while
+being expressive, typed, and extensible at the same time. It aims to be
+a “universal IR” of sorts, by being at a low enough level that
+high-level ideas may be cleanly mapped to it (similar to how
+microprocessors are “universal 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 be promoted to a simple SSA value
+instead of a memory location.</p>
+<div class="section" id="well-formedness">
+<span id="wellformed"></span><h3><a class="toc-backref" href="#id573">Well-Formedness</a><a class="headerlink" href="#well-formedness" title="Permalink to this headline">¶</a></h3>
+<p>It is important to note that this document describes ‘well formed’ LLVM
+assembly language. There is a difference between what the parser accepts
+and what is considered ‘well formed’. For example, the following
+instruction is syntactically okay, but not well formed:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%x</span> <span class="p">=</span> <span class="k">add</span> <span class="k">i32</span> <span class="m">1</span><span class="p">,</span> <span class="nv">%x</span>
+</pre></div>
+</div>
+<p>because the definition of <tt class="docutils literal"><span class="pre">%x</span></tt> 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.</p>
+</div>
+</div>
+<div class="section" id="identifiers">
+<span id="id1"></span><h2><a class="toc-backref" href="#id574">Identifiers</a><a class="headerlink" href="#identifiers" title="Permalink to this headline">¶</a></h2>
+<p>LLVM identifiers come in two basic types: global and local. Global
+identifiers (functions, global variables) begin with the <tt class="docutils literal"><span class="pre">'@'</span></tt>
+character. Local identifiers (register names, types) begin with the
+<tt class="docutils literal"><span class="pre">'%'</span></tt> character. Additionally, there are three different formats for
+identifiers, for different purposes:</p>
+<ol class="arabic simple">
+<li>Named values are represented as a string of characters with their
+prefix. For example, <tt class="docutils literal"><span class="pre">%foo</span></tt>, <tt class="docutils literal"><span class="pre">@DivisionByZero</span></tt>,
+<tt class="docutils literal"><span class="pre">%a.really.long.identifier</span></tt>. The actual regular expression used is
+‘<tt class="docutils literal"><span class="pre">[%@][a-zA-Z$._][a-zA-Z$._0-9]*</span></tt>‘. Identifiers which require other
+characters in their names can be surrounded with quotes. Special
+characters may be escaped using <tt class="docutils literal"><span class="pre">"\xx"</span></tt> where <tt class="docutils literal"><span class="pre">xx</span></tt> is the ASCII
+code for the character in hexadecimal. In this way, any character can
+be used in a name value, even quotes themselves.</li>
+<li>Unnamed values are represented as an unsigned numeric value with
+their prefix. For example, <tt class="docutils literal"><span class="pre">%12</span></tt>, <tt class="docutils literal"><span class="pre">@2</span></tt>, <tt class="docutils literal"><span class="pre">%44</span></tt>.</li>
+<li>Constants, which are described in the section  <a class="reference internal" href="#constants">Constants</a> below.</li>
+</ol>
+<p>LLVM requires that values start with a prefix for two reasons: Compilers
+don’t need to worry about name clashes with reserved words, and the set
+of reserved words may be expanded in the future without penalty.
+Additionally, unnamed identifiers allow a compiler to quickly come up
+with a temporary variable without having to avoid symbol table
+conflicts.</p>
+<p>Reserved words in LLVM are very similar to reserved words in other
+languages. There are keywords for different opcodes (‘<tt class="docutils literal"><span class="pre">add</span></tt>‘,
+‘<tt class="docutils literal"><span class="pre">bitcast</span></tt>‘, ‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘, etc...), for primitive type names (‘<tt class="docutils literal"><span class="pre">void</span></tt>‘,
+‘<tt class="docutils literal"><span class="pre">i32</span></tt>‘, etc...), and others. These reserved words cannot conflict
+with variable names, because none of them start with a prefix character
+(<tt class="docutils literal"><span class="pre">'%'</span></tt> or <tt class="docutils literal"><span class="pre">'@'</span></tt>).</p>
+<p>Here is an example of LLVM code to multiply the integer variable
+‘<tt class="docutils literal"><span class="pre">%X</span></tt>‘ by 8:</p>
+<p>The easy way:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%result</span> <span class="p">=</span> <span class="k">mul</span> <span class="k">i32</span> <span class="nv">%X</span><span class="p">,</span> <span class="m">8</span>
+</pre></div>
+</div>
+<p>After strength reduction:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%result</span> <span class="p">=</span> <span class="k">shl</span> <span class="k">i32</span> <span class="nv">%X</span><span class="p">,</span> <span class="m">3</span>
+</pre></div>
+</div>
+<p>And the hard way:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">%0</span> <span class="p">=</span> <span class="k">add</span> <span class="k">i32</span> <span class="nv">%X</span><span class="p">,</span> <span class="nv">%X</span>           <span class="c">; yields {i32}:%0</span>
+<span class="nv-Anonymous">%1</span> <span class="p">=</span> <span class="k">add</span> <span class="k">i32</span> <span class="nv-Anonymous">%0</span><span class="p">,</span> <span class="nv-Anonymous">%0</span>           <span class="c">; yields {i32}:%1</span>
+<span class="nv">%result</span> <span class="p">=</span> <span class="k">add</span> <span class="k">i32</span> <span class="nv-Anonymous">%1</span><span class="p">,</span> <span class="nv-Anonymous">%1</span>
+</pre></div>
+</div>
+<p>This last way of multiplying <tt class="docutils literal"><span class="pre">%X</span></tt> by 8 illustrates several important
+lexical features of LLVM:</p>
+<ol class="arabic simple">
+<li>Comments are delimited with a ‘<tt class="docutils literal"><span class="pre">;</span></tt>‘ and go until the end of line.</li>
+<li>Unnamed temporaries are created when the result of a computation is
+not assigned to a named value.</li>
+<li>Unnamed temporaries are numbered sequentially (using a per-function
+incrementing counter, starting with 0). Note that basic blocks are
+included in this numbering. For example, if the entry basic block is not
+given a label name, then it will get number 0.</li>
+</ol>
+<p>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.</p>
+</div>
+<div class="section" id="high-level-structure">
+<h2><a class="toc-backref" href="#id575">High Level Structure</a><a class="headerlink" href="#high-level-structure" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="module-structure">
+<h3><a class="toc-backref" href="#id576">Module Structure</a><a class="headerlink" href="#module-structure" title="Permalink to this headline">¶</a></h3>
+<p>LLVM programs are composed of <tt class="docutils literal"><span class="pre">Module</span></tt>‘s, each of which is a
+translation unit of the input programs. Each module consists of
+functions, global variables, and symbol table entries. Modules may be
+combined together with the LLVM linker, which merges function (and
+global variable) definitions, resolves forward declarations, and merges
+symbol table entries. Here is an example of the “hello world” module:</p>
+<div class="highlight-llvm"><pre>; Declare the string constant as a global constant.
+ at .str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
+
+; External declaration of the puts function
+declare i32 @puts(i8* nocapture) nounwind
+
+; Definition of main function
+define i32 @main() {   ; i32()*
+  ; Convert [13 x i8]* to i8  *...
+  %cast210 = getelementptr [13 x i8]* @.str, i64 0, i64 0
+
+  ; Call puts function to write out the string to stdout.
+  call i32 @puts(i8* %cast210)
+  ret i32 0
+}
+
+; Named metadata
+!1 = metadata !{i32 42}
+!foo = !{!1, null}</pre>
+</div>
+<p>This example is made up of a <a class="reference internal" href="#globalvars"><em>global variable</em></a> named
+“<tt class="docutils literal"><span class="pre">.str</span></tt>”, an external declaration of the “<tt class="docutils literal"><span class="pre">puts</span></tt>” function, a
+<a class="reference internal" href="#functionstructure"><em>function definition</em></a> for “<tt class="docutils literal"><span class="pre">main</span></tt>” and
+<a class="reference internal" href="#namedmetadatastructure"><em>named metadata</em></a> “<tt class="docutils literal"><span class="pre">foo</span></tt>”.</p>
+<p>In general, a module is made up of a list of global values (where both
+functions and global variables are global values). Global values are
+represented by a pointer to a memory location (in this case, a pointer
+to an array of char, and a pointer to a function), and have one of the
+following <a class="reference internal" href="#linkage"><em>linkage types</em></a>.</p>
+</div>
+<div class="section" id="linkage-types">
+<span id="linkage"></span><h3><a class="toc-backref" href="#id577">Linkage Types</a><a class="headerlink" href="#linkage-types" title="Permalink to this headline">¶</a></h3>
+<p>All Global Variables and Functions have one of the following types of
+linkage:</p>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">private</span></tt></dt>
+<dd>Global values with “<tt class="docutils literal"><span class="pre">private</span></tt>” 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 avoid collisions. Because the
+symbol is private to the module, all references can be updated. This
+doesn’t show up in any symbol table in the object file.</dd>
+<dt><tt class="docutils literal"><span class="pre">linker_private</span></tt></dt>
+<dd>Similar to <tt class="docutils literal"><span class="pre">private</span></tt>, but the symbol is passed through the
+assembler and evaluated by the linker. Unlike normal strong symbols,
+they are removed by the linker from the final linked image
+(executable or dynamic library).</dd>
+<dt><tt class="docutils literal"><span class="pre">linker_private_weak</span></tt></dt>
+<dd>Similar to “<tt class="docutils literal"><span class="pre">linker_private</span></tt>”, but the symbol is weak. Note that
+<tt class="docutils literal"><span class="pre">linker_private_weak</span></tt> symbols are subject to coalescing by the
+linker. The symbols are removed by the linker from the final linked
+image (executable or dynamic library).</dd>
+<dt><tt class="docutils literal"><span class="pre">internal</span></tt></dt>
+<dd>Similar to private, but the value shows as a local symbol
+(<tt class="docutils literal"><span class="pre">STB_LOCAL</span></tt> in the case of ELF) in the object file. This
+corresponds to the notion of the ‘<tt class="docutils literal"><span class="pre">static</span></tt>‘ keyword in C.</dd>
+<dt><tt class="docutils literal"><span class="pre">available_externally</span></tt></dt>
+<dd>Globals with “<tt class="docutils literal"><span class="pre">available_externally</span></tt>” 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 the definition of the global, which is known to be somewhere
+outside the module. Globals with <tt class="docutils literal"><span class="pre">available_externally</span></tt> linkage
+are allowed to be discarded at will, and are otherwise the same as
+<tt class="docutils literal"><span class="pre">linkonce_odr</span></tt>. This linkage type is only allowed on definitions,
+not declarations.</dd>
+<dt><tt class="docutils literal"><span class="pre">linkonce</span></tt></dt>
+<dd>Globals with “<tt class="docutils literal"><span class="pre">linkonce</span></tt>” linkage are merged with other globals of
+the same name when linkage occurs. This can be used to implement
+some forms of inline functions, templates, or other code which must
+be generated in each translation unit that uses it, but where the
+body may be overridden with a more definitive definition later.
+Unreferenced <tt class="docutils literal"><span class="pre">linkonce</span></tt> globals are allowed to be discarded. Note
+that <tt class="docutils literal"><span class="pre">linkonce</span></tt> linkage does not actually allow the optimizer to
+inline the body of this function into callers because it doesn’t
+know if this definition of the function is the definitive definition
+within the program or whether it will be overridden by a stronger
+definition. To enable inlining and other optimizations, use
+“<tt class="docutils literal"><span class="pre">linkonce_odr</span></tt>” linkage.</dd>
+<dt><tt class="docutils literal"><span class="pre">weak</span></tt></dt>
+<dd>“<tt class="docutils literal"><span class="pre">weak</span></tt>” linkage has the same merging semantics as <tt class="docutils literal"><span class="pre">linkonce</span></tt>
+linkage, except that unreferenced globals with <tt class="docutils literal"><span class="pre">weak</span></tt> linkage may
+not be discarded. This is used for globals that are declared “weak”
+in C source code.</dd>
+<dt><tt class="docutils literal"><span class="pre">common</span></tt></dt>
+<dd>“<tt class="docutils literal"><span class="pre">common</span></tt>” linkage is most similar to “<tt class="docutils literal"><span class="pre">weak</span></tt>” linkage, but they
+are used for tentative definitions in C, such as “<tt class="docutils literal"><span class="pre">int</span> <span class="pre">X;</span></tt>” at
+global scope. Symbols with “<tt class="docutils literal"><span class="pre">common</span></tt>” linkage are merged in the
+same way as <tt class="docutils literal"><span class="pre">weak</span> <span class="pre">symbols</span></tt>, and they may not be deleted if
+unreferenced. <tt class="docutils literal"><span class="pre">common</span></tt> symbols may not have an explicit section,
+must have a zero initializer, and may not be marked
+‘<a class="reference internal" href="#globalvars"><em>constant</em></a>‘. Functions and aliases may not have
+common linkage.</dd>
+</dl>
+<dl class="docutils" id="linkage-appending">
+<dt><tt class="docutils literal"><span class="pre">appending</span></tt></dt>
+<dd>“<tt class="docutils literal"><span class="pre">appending</span></tt>” 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.</dd>
+<dt><tt class="docutils literal"><span class="pre">extern_weak</span></tt></dt>
+<dd>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.</dd>
+<dt><tt class="docutils literal"><span class="pre">linkonce_odr</span></tt>, <tt class="docutils literal"><span class="pre">weak_odr</span></tt></dt>
+<dd>Some languages allow differing globals to be merged, such as two
+functions with different semantics. Other languages, such as
+<tt class="docutils literal"><span class="pre">C++</span></tt>, ensure that only equivalent globals are ever merged (the
+“one definition rule” — “ODR”).  Such languages can use the
+<tt class="docutils literal"><span class="pre">linkonce_odr</span></tt> and <tt class="docutils literal"><span class="pre">weak_odr</span></tt> linkage types to indicate that the
+global will only be merged with equivalent globals. These linkage
+types are otherwise the same as their non-<tt class="docutils literal"><span class="pre">odr</span></tt> versions.</dd>
+<dt><tt class="docutils literal"><span class="pre">external</span></tt></dt>
+<dd>If none of the above identifiers are used, the global is externally
+visible, meaning that it participates in linkage and can be used to
+resolve external symbol references.</dd>
+</dl>
+<p>The next two types of linkage are targeted for Microsoft Windows
+platform only. They are designed to support importing (exporting)
+symbols from (to) DLLs (Dynamic Link Libraries).</p>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">dllimport</span></tt></dt>
+<dd>“<tt class="docutils literal"><span class="pre">dllimport</span></tt>” 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 <tt class="docutils literal"><span class="pre">__imp_</span></tt> and the function or variable
+name.</dd>
+<dt><tt class="docutils literal"><span class="pre">dllexport</span></tt></dt>
+<dd>“<tt class="docutils literal"><span class="pre">dllexport</span></tt>” linkage causes the compiler to provide a global
+pointer to a pointer in a DLL, so that it can be referenced with the
+<tt class="docutils literal"><span class="pre">dllimport</span></tt> attribute. On Microsoft Windows targets, the pointer
+name is formed by combining <tt class="docutils literal"><span class="pre">__imp_</span></tt> and the function or variable
+name.</dd>
+</dl>
+<p>For example, since the “<tt class="docutils literal"><span class="pre">.LC0</span></tt>” variable is defined to be internal, if
+another module defined a “<tt class="docutils literal"><span class="pre">.LC0</span></tt>” variable and was linked with this
+one, one of the two would be renamed, preventing a collision. Since
+“<tt class="docutils literal"><span class="pre">main</span></tt>” and “<tt class="docutils literal"><span class="pre">puts</span></tt>” are external (i.e., lacking any linkage
+declarations), they are accessible outside of the current module.</p>
+<p>It is illegal for a function <em>declaration</em> to have any linkage type
+other than <tt class="docutils literal"><span class="pre">external</span></tt>, <tt class="docutils literal"><span class="pre">dllimport</span></tt> or <tt class="docutils literal"><span class="pre">extern_weak</span></tt>.</p>
+</div>
+<div class="section" id="calling-conventions">
+<span id="callingconv"></span><h3><a class="toc-backref" href="#id578">Calling Conventions</a><a class="headerlink" href="#calling-conventions" title="Permalink to this headline">¶</a></h3>
+<p>LLVM <a class="reference internal" href="#functionstructure"><em>functions</em></a>, <a class="reference internal" href="#i-call"><em>calls</em></a> and
+<a class="reference internal" href="#i-invoke"><em>invokes</em></a> can all have an optional calling convention
+specified for the call. The calling convention of any pair of dynamic
+caller/callee must match, or the behavior of the program is undefined.
+The following calling conventions are supported by LLVM, and more may be
+added in the future:</p>
+<dl class="docutils">
+<dt>“<tt class="docutils literal"><span class="pre">ccc</span></tt>” - The C calling convention</dt>
+<dd>This calling convention (the default if no other calling convention
+is specified) matches the target C calling conventions. This calling
+convention supports varargs function calls and tolerates some
+mismatch in the declared prototype and implemented declaration of
+the function (as does normal C).</dd>
+<dt>“<tt class="docutils literal"><span class="pre">fastcc</span></tt>” - The fast calling convention</dt>
+<dd>This calling convention attempts to make calls as fast as possible
+(e.g. by passing things in registers). This calling convention
+allows the target to use whatever tricks it wants to produce fast
+code for the target, without having to conform to an externally
+specified ABI (Application Binary Interface). <a class="reference external" href="CodeGenerator.html#id80">Tail calls can only
+be optimized when this, the GHC or the HiPE convention is
+used.</a> This calling convention does not
+support varargs and requires the prototype of all callees to exactly
+match the prototype of the function definition.</dd>
+<dt>“<tt class="docutils literal"><span class="pre">coldcc</span></tt>” - The cold calling convention</dt>
+<dd>This calling convention attempts to make code in the caller as
+efficient as possible under the assumption that the call is not
+commonly executed. As such, these calls often preserve all registers
+so that the call does not break any live ranges in the caller side.
+This calling convention does not support varargs and requires the
+prototype of all callees to exactly match the prototype of the
+function definition.</dd>
+<dt>“<tt class="docutils literal"><span class="pre">cc</span> <span class="pre">10</span></tt>” - GHC convention</dt>
+<dd><p class="first">This calling convention has been implemented specifically for use by
+the <a class="reference external" href="http://www.haskell.org/ghc">Glasgow Haskell Compiler (GHC)</a>.
+It passes everything in registers, going to extremes to achieve this
+by disabling callee save registers. This calling convention should
+not be used lightly but only for specific situations such as an
+alternative to the <em>register pinning</em> performance technique often
+used when implementing functional programming languages. At the
+moment only X86 supports this convention and it has the following
+limitations:</p>
+<ul class="simple">
+<li>On <em>X86-32</em> only supports up to 4 bit type parameters. No
+floating point types are supported.</li>
+<li>On <em>X86-64</em> only supports up to 10 bit type parameters and 6
+floating point parameters.</li>
+</ul>
+<p class="last">This calling convention supports <a class="reference external" href="CodeGenerator.html#id80">tail call
+optimization</a> but requires both the
+caller and callee are using it.</p>
+</dd>
+<dt>“<tt class="docutils literal"><span class="pre">cc</span> <span class="pre">11</span></tt>” - The HiPE calling convention</dt>
+<dd>This calling convention has been implemented specifically for use by
+the <a class="reference external" href="http://www.it.uu.se/research/group/hipe/">High-Performance Erlang
+(HiPE)</a> compiler, <em>the</em>
+native code compiler of the <a class="reference external" href="http://www.erlang.org/download.shtml">Ericsson’s Open Source Erlang/OTP
+system</a>. It uses more
+registers for argument passing than the ordinary C calling
+convention and defines no callee-saved registers. The calling
+convention properly supports <a class="reference external" href="CodeGenerator.html#id80">tail call
+optimization</a> but requires that both the
+caller and the callee use it. It uses a <em>register pinning</em>
+mechanism, similar to GHC’s convention, for keeping frequently
+accessed runtime components pinned to specific hardware registers.
+At the moment only X86 supports this convention (both 32 and 64
+bit).</dd>
+<dt>“<tt class="docutils literal"><span class="pre">cc</span> <span class="pre"><n></span></tt>” - Numbered convention</dt>
+<dd>Any calling convention may be specified by number, allowing
+target-specific calling conventions to be used. Target specific
+calling conventions start at 64.</dd>
+</dl>
+<p>More calling conventions can be added/defined on an as-needed basis, to
+support Pascal conventions or any other well-known target-independent
+convention.</p>
+</div>
+<div class="section" id="visibility-styles">
+<span id="visibilitystyles"></span><h3><a class="toc-backref" href="#id579">Visibility Styles</a><a class="headerlink" href="#visibility-styles" title="Permalink to this headline">¶</a></h3>
+<p>All Global Variables and Functions have one of the following visibility
+styles:</p>
+<dl class="docutils">
+<dt>“<tt class="docutils literal"><span class="pre">default</span></tt>” - Default style</dt>
+<dd>On targets that use the ELF object file format, default visibility
+means that the declaration is visible to other modules and, in
+shared libraries, means that the declared entity may be overridden.
+On Darwin, default visibility means that the declaration is visible
+to other modules. Default visibility corresponds to “external
+linkage” in the language.</dd>
+<dt>“<tt class="docutils literal"><span class="pre">hidden</span></tt>” - Hidden style</dt>
+<dd>Two declarations of an object with hidden visibility refer to the
+same object if they are in the same shared object. Usually, hidden
+visibility indicates that the symbol will not be placed into the
+dynamic symbol table, so no other module (executable or shared
+library) can reference it directly.</dd>
+<dt>“<tt class="docutils literal"><span class="pre">protected</span></tt>” - Protected style</dt>
+<dd>On ELF, protected visibility indicates that the symbol will be
+placed in the dynamic symbol table, but that references within the
+defining module will bind to the local symbol. That is, the symbol
+cannot be overridden by another module.</dd>
+</dl>
+</div>
+<div class="section" id="named-types">
+<span id="namedtypes"></span><h3><a class="toc-backref" href="#id580">Named Types</a><a class="headerlink" href="#named-types" title="Permalink to this headline">¶</a></h3>
+<p>LLVM IR allows you to specify name aliases for certain types. This can
+make it easier to read the IR and make the IR more condensed
+(particularly when recursive types are involved). An example of a name
+specification is:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%mytype</span> <span class="p">=</span> <span class="k">type</span> <span class="p">{</span> <span class="nv">%mytype</span><span class="p">*,</span> <span class="k">i32</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>You may give a name to any <a class="reference internal" href="#typesystem"><em>type</em></a> except
+“<a class="reference internal" href="#t-void"><em>void</em></a>”. Type name aliases may be used anywhere a type is
+expected with the syntax “%mytype”.</p>
+<p>Note that type names are aliases for the structural type that they
+indicate, and that you can therefore specify multiple names for the same
+type. This often leads to confusing behavior when dumping out a .ll
+file. Since LLVM IR uses structural typing, the name is not part of the
+type. When printing out LLVM IR, the printer will pick <em>one name</em> to
+render all types of a particular shape. This means that if you have code
+where two different source types end up having the same LLVM type, that
+the dumper will sometimes print the “wrong” or unexpected type. This is
+an important design point and isn’t going to change.</p>
+</div>
+<div class="section" id="global-variables">
+<span id="globalvars"></span><h3><a class="toc-backref" href="#id581">Global Variables</a><a class="headerlink" href="#global-variables" title="Permalink to this headline">¶</a></h3>
+<p>Global variables define regions of memory allocated at compilation time
+instead of run-time.</p>
+<p>Global variables definitions must be initialized, may have an explicit section
+to be placed in, and may have an optional explicit alignment specified.</p>
+<p>Global variables in other translation units can also be declared, in which
+case they don’t have an initializer.</p>
+<p>A variable may be defined as <tt class="docutils literal"><span class="pre">thread_local</span></tt>, which means that it will
+not be shared by threads (each thread will have a separated copy of the
+variable). Not all targets support thread-local variables. Optionally, a
+TLS model may be specified:</p>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">localdynamic</span></tt></dt>
+<dd>For variables that are only used within the current shared library.</dd>
+<dt><tt class="docutils literal"><span class="pre">initialexec</span></tt></dt>
+<dd>For variables in modules that will not be loaded dynamically.</dd>
+<dt><tt class="docutils literal"><span class="pre">localexec</span></tt></dt>
+<dd>For variables defined in the executable and only used within it.</dd>
+</dl>
+<p>The models correspond to the ELF TLS models; see <a class="reference external" href="http://people.redhat.com/drepper/tls.pdf">ELF Handling For
+Thread-Local Storage</a> for
+more information on under which circumstances the different models may
+be used. The target may choose a different TLS model if the specified
+model is not supported, or if a better choice of model can be made.</p>
+<p>A variable may be defined as a global <tt class="docutils literal"><span class="pre">constant</span></tt>, which indicates that
+the contents of the variable will <strong>never</strong> be modified (enabling better
+optimization, allowing the global data to be placed in the read-only
+section of an executable, etc). Note that variables that need runtime
+initialization cannot be marked <tt class="docutils literal"><span class="pre">constant</span></tt> as there is a store to the
+variable.</p>
+<p>LLVM explicitly allows <em>declarations</em> of global variables to be marked
+constant, even if the final definition of the global is not. This
+capability can be used to enable slightly better optimization of the
+program, but requires the language definition to guarantee that
+optimizations based on the ‘constantness’ are valid for the translation
+units that do not include the definition.</p>
+<p>As SSA values, global variables define pointer values that are in scope
+(i.e. they dominate) all basic blocks in the program. Global variables
+always define a pointer to their “content” type because they describe a
+region of memory, and all memory objects in LLVM are accessed through
+pointers.</p>
+<p>Global variables can be marked with <tt class="docutils literal"><span class="pre">unnamed_addr</span></tt> which indicates
+that the address is not significant, only the content. Constants marked
+like this can be merged with other constants if they have the same
+initializer. Note that a constant with significant address <em>can</em> be
+merged with a <tt class="docutils literal"><span class="pre">unnamed_addr</span></tt> constant, the result being a constant
+whose address is significant.</p>
+<p>A global variable may be declared to reside in a target-specific
+numbered address space. For targets that support them, address spaces
+may affect how optimizations are performed and/or what target
+instructions are used to access the variable. The default address space
+is zero. The address space qualifier must precede any other attributes.</p>
+<p>LLVM allows an explicit section to be specified for globals. If the
+target supports it, it will emit globals to the section specified.</p>
+<p>By default, global initializers are optimized by assuming that global
+variables defined within the module are not modified from their
+initial values before the start of the global initializer.  This is
+true even for variables potentially accessible from outside the
+module, including those with external linkage or appearing in
+<tt class="docutils literal"><span class="pre">@llvm.used</span></tt>. This assumption may be suppressed by marking the
+variable with <tt class="docutils literal"><span class="pre">externally_initialized</span></tt>.</p>
+<p>An explicit alignment may be specified for a global, which must be a
+power of 2. If not present, or if the alignment is set to zero, the
+alignment of the global is set by the target to whatever it feels
+convenient. If an explicit alignment is specified, the global is forced
+to have exactly that alignment. Targets and optimizers are not allowed
+to over-align the global if the global has an assigned section. In this
+case, the extra alignment could be observable: for example, code could
+assume that the globals are densely packed in their section and try to
+iterate over them as an array, alignment padding would break this
+iteration.</p>
+<p>For example, the following defines a global in a numbered address space
+with an initializer, section, and alignment:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="vg">@G</span> <span class="p">=</span> <span class="k">addrspace</span><span class="p">(</span><span class="m">5</span><span class="p">)</span> <span class="k">constant</span> <span class="kt">float</span> <span class="m">1.0</span><span class="p">,</span> <span class="k">section</span> <span class="s">"foo"</span><span class="p">,</span> <span class="k">align</span> <span class="m">4</span>
+</pre></div>
+</div>
+<p>The following example just declares a global variable</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="vg">@G</span> <span class="p">=</span> <span class="k">external</span> <span class="k">global</span> <span class="k">i32</span>
+</pre></div>
+</div>
+<p>The following example defines a thread-local global with the
+<tt class="docutils literal"><span class="pre">initialexec</span></tt> TLS model:</p>
+<div class="highlight-llvm"><pre>@G = thread_local(initialexec) global i32 0, align 4</pre>
+</div>
+</div>
+<div class="section" id="functions">
+<span id="functionstructure"></span><h3><a class="toc-backref" href="#id582">Functions</a><a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h3>
+<p>LLVM function definitions consist of the “<tt class="docutils literal"><span class="pre">define</span></tt>” keyword, an
+optional <a class="reference internal" href="#linkage"><em>linkage type</em></a>, an optional <a class="reference internal" href="BitCodeFormat.html#visibility"><em>visibility
+style</em></a>, an optional <a class="reference internal" href="#callingconv"><em>calling convention</em></a>,
+an optional <tt class="docutils literal"><span class="pre">unnamed_addr</span></tt> attribute, a return type, an optional
+<a class="reference internal" href="#paramattrs"><em>parameter attribute</em></a> for the return type, a function
+name, a (possibly empty) argument list (each with optional <a class="reference internal" href="#paramattrs"><em>parameter
+attributes</em></a>), optional <a class="reference internal" href="#fnattrs"><em>function attributes</em></a>,
+an optional section, an optional alignment, an optional <a class="reference internal" href="#gc"><em>garbage
+collector name</em></a>, an optional <a class="reference internal" href="#prefixdata"><em>prefix</em></a>, an opening
+curly brace, a list of basic blocks, and a closing curly brace.</p>
+<p>LLVM function declarations consist of the “<tt class="docutils literal"><span class="pre">declare</span></tt>” keyword, an
+optional <a class="reference internal" href="#linkage"><em>linkage type</em></a>, an optional <a class="reference internal" href="BitCodeFormat.html#visibility"><em>visibility
+style</em></a>, an optional <a class="reference internal" href="#callingconv"><em>calling convention</em></a>,
+an optional <tt class="docutils literal"><span class="pre">unnamed_addr</span></tt> attribute, a return type, an optional
+<a class="reference internal" href="#paramattrs"><em>parameter attribute</em></a> for the return type, a function
+name, a possibly empty list of arguments, an optional alignment, an optional
+<a class="reference internal" href="#gc"><em>garbage collector name</em></a> and an optional <a class="reference internal" href="#prefixdata"><em>prefix</em></a>.</p>
+<p>A function definition contains a list of basic blocks, forming the CFG (Control
+Flow Graph) for the function. Each basic block may optionally start with a label
+(giving the basic block a symbol table entry), contains a list of instructions,
+and ends with a <a class="reference internal" href="#terminators"><em>terminator</em></a> instruction (such as a branch or
+function return). If an explicit label is not provided, a block is assigned an
+implicit numbered label, using the next value from the same counter as used for
+unnamed temporaries (<a class="reference internal" href="#identifiers"><em>see above</em></a>). For example, if a function
+entry block does not have an explicit label, it will be assigned label “%0”,
+then the first unnamed temporary in that block will be “%1”, etc.</p>
+<p>The first basic block in a function is special in two ways: it is
+immediately executed on entrance to the function, and it is not allowed
+to have predecessor basic blocks (i.e. there can not be any branches to
+the entry block of a function). Because the block can have no
+predecessors, it also cannot have any <a class="reference internal" href="#i-phi"><em>PHI nodes</em></a>.</p>
+<p>LLVM allows an explicit section to be specified for functions. If the
+target supports it, it will emit functions to the section specified.</p>
+<p>An explicit alignment may be specified for a function. If not present,
+or if the alignment is set to zero, the alignment of the function is set
+by the target to whatever it feels convenient. If an explicit alignment
+is specified, the function is forced to have at least that much
+alignment. All alignments must be a power of 2.</p>
+<p>If the <tt class="docutils literal"><span class="pre">unnamed_addr</span></tt> attribute is given, the address is know to not
+be significant and two identical functions can be merged.</p>
+<p>Syntax:</p>
+<div class="highlight-python"><pre>define [linkage] [visibility]
+       [cconv] [ret attrs]
+       <ResultType> @<FunctionName> ([argument list])
+       [fn Attrs] [section "name"] [align N]
+       [gc] [prefix Constant] { ... }</pre>
+</div>
+</div>
+<div class="section" id="aliases">
+<span id="langref-aliases"></span><h3><a class="toc-backref" href="#id583">Aliases</a><a class="headerlink" href="#aliases" title="Permalink to this headline">¶</a></h3>
+<p>Aliases act as “second name” for the aliasee value (which can be either
+function, global variable, another alias or bitcast of global value).
+Aliases may have an optional <a class="reference internal" href="#linkage"><em>linkage type</em></a>, and an optional
+<a class="reference internal" href="BitCodeFormat.html#visibility"><em>visibility style</em></a>.</p>
+<p>Syntax:</p>
+<div class="highlight-python"><pre>@<Name> = alias [Linkage] [Visibility] <AliaseeTy> @<Aliasee></pre>
+</div>
+<p>The linkage must be one of <tt class="docutils literal"><span class="pre">private</span></tt>, <tt class="docutils literal"><span class="pre">linker_private</span></tt>,
+<tt class="docutils literal"><span class="pre">linker_private_weak</span></tt>, <tt class="docutils literal"><span class="pre">internal</span></tt>, <tt class="docutils literal"><span class="pre">linkonce</span></tt>, <tt class="docutils literal"><span class="pre">weak</span></tt>,
+<tt class="docutils literal"><span class="pre">linkonce_odr</span></tt>, <tt class="docutils literal"><span class="pre">weak_odr</span></tt>, <tt class="docutils literal"><span class="pre">external</span></tt>. Note that some system linkers
+might not correctly handle dropping a weak symbol that is aliased by a non weak
+alias.</p>
+</div>
+<div class="section" id="named-metadata">
+<span id="namedmetadatastructure"></span><h3><a class="toc-backref" href="#id584">Named Metadata</a><a class="headerlink" href="#named-metadata" title="Permalink to this headline">¶</a></h3>
+<p>Named metadata is a collection of metadata. <a class="reference internal" href="#metadata"><em>Metadata
+nodes</em></a> (but not metadata strings) are the only valid
+operands for a named metadata.</p>
+<p>Syntax:</p>
+<div class="highlight-python"><pre>; Some unnamed metadata nodes, which are referenced by the named metadata.
+!0 = metadata !{metadata !"zero"}
+!1 = metadata !{metadata !"one"}
+!2 = metadata !{metadata !"two"}
+; A named metadata.
+!name = !{!0, !1, !2}</pre>
+</div>
+</div>
+<div class="section" id="parameter-attributes">
+<span id="paramattrs"></span><h3><a class="toc-backref" href="#id585">Parameter Attributes</a><a class="headerlink" href="#parameter-attributes" title="Permalink to this headline">¶</a></h3>
+<p>The return type and each parameter of a function type may have a set of
+<em>parameter attributes</em> 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, not of the function type, so functions with different
+parameter attributes can have the same function type.</p>
+<p>Parameter attributes are simple keywords that follow the type specified.
+If multiple parameter attributes are needed, they are space separated.
+For example:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">declare</span> <span class="k">i32</span> <span class="vg">@printf</span><span class="p">(</span><span class="k">i8</span><span class="p">*</span> <span class="k">noalias</span> <span class="k">nocapture</span><span class="p">,</span> <span class="p">...)</span>
+<span class="k">declare</span> <span class="k">i32</span> <span class="vg">@atoi</span><span class="p">(</span><span class="k">i8</span> <span class="k">zeroext</span><span class="p">)</span>
+<span class="k">declare</span> <span class="k">signext</span> <span class="k">i8</span> <span class="vg">@returns_signed_char</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Note that any attributes for the function result (<tt class="docutils literal"><span class="pre">nounwind</span></tt>,
+<tt class="docutils literal"><span class="pre">readonly</span></tt>) come immediately after the argument list.</p>
+<p>Currently, only the following parameter attributes are defined:</p>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">zeroext</span></tt></dt>
+<dd>This indicates to the code generator that the parameter or return
+value should be zero-extended to the extent required by the target’s
+ABI (which is usually 32-bits, but is 8-bits for a i1 on x86-64) by
+the caller (for a parameter) or the callee (for a return value).</dd>
+<dt><tt class="docutils literal"><span class="pre">signext</span></tt></dt>
+<dd>This indicates to the code generator that the parameter or return
+value should be sign-extended to the extent required by the target’s
+ABI (which is usually 32-bits) by the caller (for a parameter) or
+the callee (for a return value).</dd>
+<dt><tt class="docutils literal"><span class="pre">inreg</span></tt></dt>
+<dd>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.</dd>
+<dt><tt class="docutils literal"><span class="pre">byval</span></tt></dt>
+<dd><p class="first">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 modify the value in the caller. This attribute is only
+valid on LLVM pointer arguments. It is generally used to pass
+structs and arrays by value, but is also valid on pointers to
+scalars. The copy is considered to belong to the caller not the
+callee (for example, <tt class="docutils literal"><span class="pre">readonly</span></tt> functions should not write to
+<tt class="docutils literal"><span class="pre">byval</span></tt> parameters). This is not a valid attribute for return
+values.</p>
+<p class="last">The byval attribute also supports specifying an alignment with the
+align attribute. It indicates the alignment of the stack slot to
+form and the known alignment of the pointer specified to the call
+site. If the alignment is not specified, then the code generator
+makes a target-specific assumption.</p>
+</dd>
+<dt><tt class="docutils literal"><span class="pre">sret</span></tt></dt>
+<dd>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 stores to the structure may be assumed by the callee
+not to trap and to be properly aligned. This may only be applied to
+the first parameter. This is not a valid attribute for return
+values.</dd>
+<dt><tt class="docutils literal"><span class="pre">noalias</span></tt></dt>
+<dd><p class="first">This indicates that pointer values <a class="reference internal" href="#pointeraliasing"><em>based</em></a> on
+the argument or return value do not alias pointer values which are
+not <em>based</em> on it, ignoring certain “irrelevant” dependencies. For a
+call to the parent function, dependencies between memory references
+from before or after the call and from those during the call are
+“irrelevant” to the <tt class="docutils literal"><span class="pre">noalias</span></tt> keyword for the arguments and return
+value used in that call. The caller shares the responsibility with
+the callee for ensuring that these requirements are met. For further
+details, please see the discussion of the NoAlias response in <a class="reference external" href="AliasAnalysis.html#MustMayNo">alias
+analysis</a>.</p>
+<p>Note that this definition of <tt class="docutils literal"><span class="pre">noalias</span></tt> is intentionally similar
+to the definition of <tt class="docutils literal"><span class="pre">restrict</span></tt> in C99 for function arguments,
+though it is slightly weaker.</p>
+<p class="last">For function return values, C99’s <tt class="docutils literal"><span class="pre">restrict</span></tt> is not meaningful,
+while LLVM’s <tt class="docutils literal"><span class="pre">noalias</span></tt> is.</p>
+</dd>
+<dt><tt class="docutils literal"><span class="pre">nocapture</span></tt></dt>
+<dd>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.</dd>
+</dl>
+<dl class="docutils" id="nest">
+<dt><tt class="docutils literal"><span class="pre">nest</span></tt></dt>
+<dd>This indicates that the pointer parameter can be excised using the
+<a class="reference internal" href="#int-trampoline"><em>trampoline intrinsics</em></a>. This is not a valid
+attribute for return values and can only be applied to one parameter.</dd>
+<dt><tt class="docutils literal"><span class="pre">returned</span></tt></dt>
+<dd>This indicates that the function always returns the argument as its return
+value. This is an optimization hint to the code generator when generating
+the caller, allowing tail call optimization and omission of register saves
+and restores in some cases; it is not checked or enforced when generating
+the callee. The parameter and the function return type must be valid
+operands for the <a class="reference internal" href="#i-bitcast"><em>bitcast instruction</em></a>. This is not a
+valid attribute for return values and can only be applied to one parameter.</dd>
+</dl>
+</div>
+<div class="section" id="garbage-collector-names">
+<span id="gc"></span><h3><a class="toc-backref" href="#id586">Garbage Collector Names</a><a class="headerlink" href="#garbage-collector-names" title="Permalink to this headline">¶</a></h3>
+<p>Each function may specify a garbage collector name, which is simply a
+string:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">define</span> <span class="kt">void</span> <span class="vg">@f</span><span class="p">()</span> <span class="k">gc</span> <span class="s">"name"</span> <span class="p">{</span> <span class="p">...</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>The compiler declares the supported values of <em>name</em>. Specifying a
+collector which will cause the compiler to alter its output in order to
+support the named garbage collection algorithm.</p>
+</div>
+<div class="section" id="prefix-data">
+<span id="prefixdata"></span><h3><a class="toc-backref" href="#id587">Prefix Data</a><a class="headerlink" href="#prefix-data" title="Permalink to this headline">¶</a></h3>
+<p>Prefix data is data associated with a function which the code generator
+will emit immediately before the function body.  The purpose of this feature
+is to allow frontends to associate language-specific runtime metadata with
+specific functions and make it available through the function pointer while
+still allowing the function pointer to be called.  To access the data for a
+given function, a program may bitcast the function pointer to a pointer to
+the constant’s type.  This implies that the IR symbol points to the start
+of the prefix data.</p>
+<p>To maintain the semantics of ordinary function calls, the prefix data must
+have a particular format.  Specifically, it must begin with a sequence of
+bytes which decode to a sequence of machine instructions, valid for the
+module’s target, which transfer control to the point immediately succeeding
+the prefix data, without performing any other visible action.  This allows
+the inliner and other passes to reason about the semantics of the function
+definition without needing to reason about the prefix data.  Obviously this
+makes the format of the prefix data highly target dependent.</p>
+<p>Prefix data is laid out as if it were an initializer for a global variable
+of the prefix data’s type.  No padding is automatically placed between the
+prefix data and the function body.  If padding is required, it must be part
+of the prefix data.</p>
+<p>A trivial example of valid prefix data for the x86 architecture is <tt class="docutils literal"><span class="pre">i8</span> <span class="pre">144</span></tt>,
+which encodes the <tt class="docutils literal"><span class="pre">nop</span></tt> instruction:</p>
+<div class="highlight-llvm"><pre>define void @f() prefix i8 144 { ... }</pre>
+</div>
+<p>Generally prefix data can be formed by encoding a relative branch instruction
+which skips the metadata, as in this example of valid prefix data for the
+x86_64 architecture, where the first two bytes encode <tt class="docutils literal"><span class="pre">jmp</span> <span class="pre">.+10</span></tt>:</p>
+<div class="highlight-llvm"><pre>%0 = type <{ i8, i8, i8* }>
+
+define void @f() prefix %0 <{ i8 235, i8 8, i8* @md}> { ... }</pre>
+</div>
+<p>A function may have prefix data but no body.  This has similar semantics
+to the <tt class="docutils literal"><span class="pre">available_externally</span></tt> linkage in that the data may be used by the
+optimizers but will not be emitted in the object file.</p>
+</div>
+<div class="section" id="attribute-groups">
+<span id="attrgrp"></span><h3><a class="toc-backref" href="#id588">Attribute Groups</a><a class="headerlink" href="#attribute-groups" title="Permalink to this headline">¶</a></h3>
+<p>Attribute groups are groups of attributes that are referenced by objects within
+the IR. They are important for keeping <tt class="docutils literal"><span class="pre">.ll</span></tt> files readable, because a lot of
+functions will use the same set of attributes. In the degenerative case of a
+<tt class="docutils literal"><span class="pre">.ll</span></tt> file that corresponds to a single <tt class="docutils literal"><span class="pre">.c</span></tt> file, the single attribute
+group will capture the important command line flags used to build that file.</p>
+<p>An attribute group is a module-level object. To use an attribute group, an
+object references the attribute group’s ID (e.g. <tt class="docutils literal"><span class="pre">#37</span></tt>). An object may refer
+to more than one attribute group. In that situation, the attributes from the
+different groups are merged.</p>
+<p>Here is an example of attribute groups for a function that should always be
+inlined, has a stack alignment of 4, and which shouldn’t use SSE instructions:</p>
+<div class="highlight-llvm"><pre>; Target-independent attributes:
+attributes #0 = { alwaysinline alignstack=4 }
+
+; Target-dependent attributes:
+attributes #1 = { "no-sse" }
+
+; Function @f has attributes: alwaysinline, alignstack=4, and "no-sse".
+define void @f() #0 #1 { ... }</pre>
+</div>
+</div>
+<div class="section" id="function-attributes">
+<span id="fnattrs"></span><h3><a class="toc-backref" href="#id589">Function Attributes</a><a class="headerlink" href="#function-attributes" title="Permalink to this headline">¶</a></h3>
+<p>Function attributes are set to communicate additional information about
+a function. Function attributes are considered to be part of the
+function, not of the function type, so functions with different function
+attributes can have the same function type.</p>
+<p>Function attributes are simple keywords that follow the type specified.
+If multiple attributes are needed, they are space separated. For
+example:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">define</span> <span class="kt">void</span> <span class="vg">@f</span><span class="p">()</span> <span class="k">noinline</span> <span class="p">{</span> <span class="p">...</span> <span class="p">}</span>
+<span class="k">define</span> <span class="kt">void</span> <span class="vg">@f</span><span class="p">()</span> <span class="k">alwaysinline</span> <span class="p">{</span> <span class="p">...</span> <span class="p">}</span>
+<span class="k">define</span> <span class="kt">void</span> <span class="vg">@f</span><span class="p">()</span> <span class="k">alwaysinline</span> <span class="k">optsize</span> <span class="p">{</span> <span class="p">...</span> <span class="p">}</span>
+<span class="k">define</span> <span class="kt">void</span> <span class="vg">@f</span><span class="p">()</span> <span class="k">optsize</span> <span class="p">{</span> <span class="p">...</span> <span class="p">}</span>
+</pre></div>
+</div>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">alignstack(<n>)</span></tt></dt>
+<dd>This attribute indicates that, when emitting the prologue and
+epilogue, the backend should forcibly align the stack pointer.
+Specify the desired alignment, which must be a power of two, in
+parentheses.</dd>
+<dt><tt class="docutils literal"><span class="pre">alwaysinline</span></tt></dt>
+<dd>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.</dd>
+<dt><tt class="docutils literal"><span class="pre">builtin</span></tt></dt>
+<dd>This indicates that the callee function at a call site should be
+recognized as a built-in function, even though the function’s declaration
+uses the <tt class="docutils literal"><span class="pre">nobuiltin</span></tt> attribute. This is only valid at call sites for
+direct calls to functions which are declared with the <tt class="docutils literal"><span class="pre">nobuiltin</span></tt>
+attribute.</dd>
+<dt><tt class="docutils literal"><span class="pre">cold</span></tt></dt>
+<dd>This attribute indicates that this function is rarely called. When
+computing edge weights, basic blocks post-dominated by a cold
+function call are also considered to be cold; and, thus, given low
+weight.</dd>
+<dt><tt class="docutils literal"><span class="pre">inlinehint</span></tt></dt>
+<dd>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.</dd>
+<dt><tt class="docutils literal"><span class="pre">minsize</span></tt></dt>
+<dd>This attribute suggests that optimization passes and code generator
+passes make choices that keep the code size of this function as small
+as possible and perform optimizations that may sacrifice runtime
+performance in order to minimize the size of the generated code.</dd>
+<dt><tt class="docutils literal"><span class="pre">naked</span></tt></dt>
+<dd>This attribute disables prologue / epilogue emission for the
+function. This can have very system-specific consequences.</dd>
+<dt><tt class="docutils literal"><span class="pre">nobuiltin</span></tt></dt>
+<dd>This indicates that the callee function at a call site is not recognized as
+a built-in function. LLVM will retain the original call and not replace it
+with equivalent code based on the semantics of the built-in function, unless
+the call site uses the <tt class="docutils literal"><span class="pre">builtin</span></tt> attribute. This is valid at call sites
+and on function declarations and definitions.</dd>
+<dt><tt class="docutils literal"><span class="pre">noduplicate</span></tt></dt>
+<dd><p class="first">This attribute indicates that calls to the function cannot be
+duplicated. A call to a <tt class="docutils literal"><span class="pre">noduplicate</span></tt> function may be moved
+within its parent function, but may not be duplicated within
+its parent function.</p>
+<p class="last">A function containing a <tt class="docutils literal"><span class="pre">noduplicate</span></tt> call may still
+be an inlining candidate, provided that the call is not
+duplicated by inlining. That implies that the function has
+internal linkage and only has one call site, so the original
+call is dead after inlining.</p>
+</dd>
+<dt><tt class="docutils literal"><span class="pre">noimplicitfloat</span></tt></dt>
+<dd>This attributes disables implicit floating point instructions.</dd>
+<dt><tt class="docutils literal"><span class="pre">noinline</span></tt></dt>
+<dd>This attribute indicates that the inliner should never inline this
+function in any situation. This attribute may not be used together
+with the <tt class="docutils literal"><span class="pre">alwaysinline</span></tt> attribute.</dd>
+<dt><tt class="docutils literal"><span class="pre">nonlazybind</span></tt></dt>
+<dd>This attribute suppresses lazy symbol binding for the function. This
+may make calls to the function faster, at the cost of extra program
+startup time if the function is not called during program startup.</dd>
+<dt><tt class="docutils literal"><span class="pre">noredzone</span></tt></dt>
+<dd>This attribute indicates that the code generator should not use a
+red zone, even if the target-specific ABI normally permits it.</dd>
+<dt><tt class="docutils literal"><span class="pre">noreturn</span></tt></dt>
+<dd>This function attribute indicates that the function never returns
+normally. This produces undefined behavior at runtime if the
+function ever does dynamically return.</dd>
+<dt><tt class="docutils literal"><span class="pre">nounwind</span></tt></dt>
+<dd>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.</dd>
+<dt><tt class="docutils literal"><span class="pre">optnone</span></tt></dt>
+<dd><p class="first">This function attribute indicates that the function is not optimized
+by any optimization or code generator passes with the
+exception of interprocedural optimization passes.
+This attribute cannot be used together with the <tt class="docutils literal"><span class="pre">alwaysinline</span></tt>
+attribute; this attribute is also incompatible
+with the <tt class="docutils literal"><span class="pre">minsize</span></tt> attribute and the <tt class="docutils literal"><span class="pre">optsize</span></tt> attribute.</p>
+<p class="last">This attribute requires the <tt class="docutils literal"><span class="pre">noinline</span></tt> attribute to be specified on
+the function as well, so the function is never inlined into any caller.
+Only functions with the <tt class="docutils literal"><span class="pre">alwaysinline</span></tt> attribute are valid
+candidates for inlining into the body of this function.</p>
+</dd>
+<dt><tt class="docutils literal"><span class="pre">optsize</span></tt></dt>
+<dd>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 as
+long as they do not significantly impact runtime performance.</dd>
+<dt><tt class="docutils literal"><span class="pre">readnone</span></tt></dt>
+<dd><p class="first">On a function, 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 state (e.g. memory, control registers, etc) visible to
+caller functions. It does not write through any pointer arguments
+(including <tt class="docutils literal"><span class="pre">byval</span></tt> arguments) and never changes any state visible
+to callers. This means that it cannot unwind exceptions by calling
+the <tt class="docutils literal"><span class="pre">C++</span></tt> exception throwing methods.</p>
+<p class="last">On an argument, this attribute indicates that the function does not
+dereference that pointer argument, even though it may read or write the
+memory that the pointer points to if accessed through other pointers.</p>
+</dd>
+<dt><tt class="docutils literal"><span class="pre">readonly</span></tt></dt>
+<dd><p class="first">On a function, this attribute indicates that the function does not write
+through any pointer arguments (including <tt class="docutils literal"><span class="pre">byval</span></tt> arguments) or otherwise
+modify any state (e.g. memory, control registers, etc) visible to
+caller functions. It may dereference pointer arguments and read
+state that may be set in the caller. A readonly function always
+returns the same value (or unwinds an exception identically) when
+called with the same set of arguments and global state. It cannot
+unwind an exception by calling the <tt class="docutils literal"><span class="pre">C++</span></tt> exception throwing
+methods.</p>
+<p class="last">On an argument, this attribute indicates that the function does not write
+through this pointer argument, even though it may write to the memory that
+the pointer points to.</p>
+</dd>
+<dt><tt class="docutils literal"><span class="pre">returns_twice</span></tt></dt>
+<dd>This attribute indicates that this function can return twice. The C
+<tt class="docutils literal"><span class="pre">setjmp</span></tt> is an example of such a function. The compiler disables
+some optimizations (like tail calls) in the caller of these
+functions.</dd>
+<dt><tt class="docutils literal"><span class="pre">sanitize_address</span></tt></dt>
+<dd>This attribute indicates that AddressSanitizer checks
+(dynamic address safety analysis) are enabled for this function.</dd>
+<dt><tt class="docutils literal"><span class="pre">sanitize_memory</span></tt></dt>
+<dd>This attribute indicates that MemorySanitizer checks (dynamic detection
+of accesses to uninitialized memory) are enabled for this function.</dd>
+<dt><tt class="docutils literal"><span class="pre">sanitize_thread</span></tt></dt>
+<dd>This attribute indicates that ThreadSanitizer checks
+(dynamic thread safety analysis) are enabled for this function.</dd>
+<dt><tt class="docutils literal"><span class="pre">ssp</span></tt></dt>
+<dd><p class="first">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 function to see if it has been overwritten. A
+heuristic is used to determine if a function needs stack protectors
+or not. The heuristic used will enable protectors for functions with:</p>
+<ul class="simple">
+<li>Character arrays larger than <tt class="docutils literal"><span class="pre">ssp-buffer-size</span></tt> (default 8).</li>
+<li>Aggregates containing character arrays larger than <tt class="docutils literal"><span class="pre">ssp-buffer-size</span></tt>.</li>
+<li>Calls to alloca() with variable sizes or constant sizes greater than
+<tt class="docutils literal"><span class="pre">ssp-buffer-size</span></tt>.</li>
+</ul>
+<p class="last">If a function that has an <tt class="docutils literal"><span class="pre">ssp</span></tt> attribute is inlined into a
+function that doesn’t have an <tt class="docutils literal"><span class="pre">ssp</span></tt> attribute, then the resulting
+function will have an <tt class="docutils literal"><span class="pre">ssp</span></tt> attribute.</p>
+</dd>
+<dt><tt class="docutils literal"><span class="pre">sspreq</span></tt></dt>
+<dd><p class="first">This attribute indicates that the function should <em>always</em> emit a
+stack smashing protector. This overrides the <tt class="docutils literal"><span class="pre">ssp</span></tt> function
+attribute.</p>
+<p class="last">If a function that has an <tt class="docutils literal"><span class="pre">sspreq</span></tt> attribute is inlined into a
+function that doesn’t have an <tt class="docutils literal"><span class="pre">sspreq</span></tt> attribute or which has an
+<tt class="docutils literal"><span class="pre">ssp</span></tt> or <tt class="docutils literal"><span class="pre">sspstrong</span></tt> attribute, then the resulting function will have
+an <tt class="docutils literal"><span class="pre">sspreq</span></tt> attribute.</p>
+</dd>
+<dt><tt class="docutils literal"><span class="pre">sspstrong</span></tt></dt>
+<dd><p class="first">This attribute indicates that the function should emit a stack smashing
+protector. This attribute causes a strong heuristic to be used when
+determining if a function needs stack protectors.  The strong heuristic
+will enable protectors for functions with:</p>
+<ul class="simple">
+<li>Arrays of any size and type</li>
+<li>Aggregates containing an array of any size and type.</li>
+<li>Calls to alloca().</li>
+<li>Local variables that have had their address taken.</li>
+</ul>
+<p>This overrides the <tt class="docutils literal"><span class="pre">ssp</span></tt> function attribute.</p>
+<p class="last">If a function that has an <tt class="docutils literal"><span class="pre">sspstrong</span></tt> attribute is inlined into a
+function that doesn’t have an <tt class="docutils literal"><span class="pre">sspstrong</span></tt> attribute, then the
+resulting function will have an <tt class="docutils literal"><span class="pre">sspstrong</span></tt> attribute.</p>
+</dd>
+<dt><tt class="docutils literal"><span class="pre">uwtable</span></tt></dt>
+<dd>This attribute indicates that the ABI being targeted requires that
+an unwind table entry be produce for this function even if we can
+show that no exceptions passes by it. This is normally the case for
+the ELF x86-64 abi, but it can be disabled for some compilation
+units.</dd>
+</dl>
+</div>
+<div class="section" id="module-level-inline-assembly">
+<span id="moduleasm"></span><h3><a class="toc-backref" href="#id590">Module-Level Inline Assembly</a><a class="headerlink" href="#module-level-inline-assembly" title="Permalink to this headline">¶</a></h3>
+<p>Modules may contain “module-level inline asm” blocks, which corresponds
+to the GCC “file scope inline asm” blocks. These blocks are internally
+concatenated by LLVM and treated as a single unit, but may be separated
+in the <tt class="docutils literal"><span class="pre">.ll</span></tt> file if desired. The syntax is very simple:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">module</span> <span class="k">asm</span> <span class="s">"inline asm code goes here"</span>
+<span class="k">module</span> <span class="k">asm</span> <span class="s">"more can go here"</span>
+</pre></div>
+</div>
+<p>The strings can contain any character by escaping non-printable
+characters. The escape sequence used is simply “\xx” where “xx” is the
+two digit hex code for the number.</p>
+<p>The inline asm code is simply printed to the machine code .s file when
+assembly code is generated.</p>
+</div>
+<div class="section" id="data-layout">
+<span id="langref-datalayout"></span><h3><a class="toc-backref" href="#id591">Data Layout</a><a class="headerlink" href="#data-layout" title="Permalink to this headline">¶</a></h3>
+<p>A module may specify a target specific data layout string that specifies
+how data is to be laid out in memory. The syntax for the data layout is
+simply:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">target</span> <span class="k">datalayout</span> <span class="p">=</span> <span class="s">"layout specification"</span>
+</pre></div>
+</div>
+<p>The <em>layout specification</em> consists of a list of specifications
+separated by the minus sign character (‘-‘). Each specification starts
+with a letter and may include other information after the letter to
+define some aspect of the data layout. The specifications accepted are
+as follows:</p>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">E</span></tt></dt>
+<dd>Specifies that the target lays out data in big-endian form. That is,
+the bits with the most significance have the lowest address
+location.</dd>
+<dt><tt class="docutils literal"><span class="pre">e</span></tt></dt>
+<dd>Specifies that the target lays out data in little-endian form. That
+is, the bits with the least significance have the lowest address
+location.</dd>
+<dt><tt class="docutils literal"><span class="pre">S<size></span></tt></dt>
+<dd>Specifies the natural alignment of the stack in bits. Alignment
+promotion of stack variables is limited to the natural stack
+alignment to avoid dynamic stack realignment. The stack alignment
+must be a multiple of 8-bits. If omitted, the natural stack
+alignment defaults to “unspecified”, which does not prevent any
+alignment promotions.</dd>
+<dt><tt class="docutils literal"><span class="pre">p[n]:<size>:<abi>:<pref></span></tt></dt>
+<dd>This specifies the <em>size</em> of a pointer and its <tt class="docutils literal"><span class="pre"><abi></span></tt> and
+<tt class="docutils literal"><span class="pre"><pref></span></tt>erred alignments for address space <tt class="docutils literal"><span class="pre">n</span></tt>. All sizes are in
+bits. Specifying the <tt class="docutils literal"><span class="pre"><pref></span></tt> alignment is optional. If omitted, the
+preceding <tt class="docutils literal"><span class="pre">:</span></tt> should be omitted too. The address space, <tt class="docutils literal"><span class="pre">n</span></tt> is
+optional, and if not specified, denotes the default address space 0.
+The value of <tt class="docutils literal"><span class="pre">n</span></tt> must be in the range [1,2^23).</dd>
+<dt><tt class="docutils literal"><span class="pre">i<size>:<abi>:<pref></span></tt></dt>
+<dd>This specifies the alignment for an integer type of a given bit
+<tt class="docutils literal"><span class="pre"><size></span></tt>. The value of <tt class="docutils literal"><span class="pre"><size></span></tt> must be in the range [1,2^23).</dd>
+<dt><tt class="docutils literal"><span class="pre">v<size>:<abi>:<pref></span></tt></dt>
+<dd>This specifies the alignment for a vector type of a given bit
+<tt class="docutils literal"><span class="pre"><size></span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">f<size>:<abi>:<pref></span></tt></dt>
+<dd>This specifies the alignment for a floating point type of a given bit
+<tt class="docutils literal"><span class="pre"><size></span></tt>. Only values of <tt class="docutils literal"><span class="pre"><size></span></tt> that are supported by the target
+will work. 32 (float) and 64 (double) are supported on all targets; 80
+or 128 (different flavors of long double) are also supported on some
+targets.</dd>
+<dt><tt class="docutils literal"><span class="pre">a<size>:<abi>:<pref></span></tt></dt>
+<dd>This specifies the alignment for an aggregate type of a given bit
+<tt class="docutils literal"><span class="pre"><size></span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">s<size>:<abi>:<pref></span></tt></dt>
+<dd>This specifies the alignment for a stack object of a given bit
+<tt class="docutils literal"><span class="pre"><size></span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">n<size1>:<size2>:<size3>...</span></tt></dt>
+<dd>This specifies a set of native integer widths for the target CPU in
+bits. For example, it might contain <tt class="docutils literal"><span class="pre">n32</span></tt> for 32-bit PowerPC,
+<tt class="docutils literal"><span class="pre">n32:64</span></tt> for PowerPC 64, or <tt class="docutils literal"><span class="pre">n8:16:32:64</span></tt> for X86-64. Elements of
+this set are considered to support most general arithmetic operations
+efficiently.</dd>
+</dl>
+<p>When constructing the data layout for a given target, LLVM starts with a
+default set of specifications which are then (possibly) overridden by
+the specifications in the <tt class="docutils literal"><span class="pre">datalayout</span></tt> keyword. The default
+specifications are given in this list:</p>
+<ul class="simple">
+<li><tt class="docutils literal"><span class="pre">E</span></tt> - big endian</li>
+<li><tt class="docutils literal"><span class="pre">p:64:64:64</span></tt> - 64-bit pointers with 64-bit alignment.</li>
+<li><tt class="docutils literal"><span class="pre">p[n]:64:64:64</span></tt> - Other address spaces are assumed to be the
+same as the default address space.</li>
+<li><tt class="docutils literal"><span class="pre">S0</span></tt> - natural stack alignment is unspecified</li>
+<li><tt class="docutils literal"><span class="pre">i1:8:8</span></tt> - i1 is 8-bit (byte) aligned</li>
+<li><tt class="docutils literal"><span class="pre">i8:8:8</span></tt> - i8 is 8-bit (byte) aligned</li>
+<li><tt class="docutils literal"><span class="pre">i16:16:16</span></tt> - i16 is 16-bit aligned</li>
+<li><tt class="docutils literal"><span class="pre">i32:32:32</span></tt> - i32 is 32-bit aligned</li>
+<li><tt class="docutils literal"><span class="pre">i64:32:64</span></tt> - i64 has ABI alignment of 32-bits but preferred
+alignment of 64-bits</li>
+<li><tt class="docutils literal"><span class="pre">f16:16:16</span></tt> - half is 16-bit aligned</li>
+<li><tt class="docutils literal"><span class="pre">f32:32:32</span></tt> - float is 32-bit aligned</li>
+<li><tt class="docutils literal"><span class="pre">f64:64:64</span></tt> - double is 64-bit aligned</li>
+<li><tt class="docutils literal"><span class="pre">f128:128:128</span></tt> - quad is 128-bit aligned</li>
+<li><tt class="docutils literal"><span class="pre">v64:64:64</span></tt> - 64-bit vector is 64-bit aligned</li>
+<li><tt class="docutils literal"><span class="pre">v128:128:128</span></tt> - 128-bit vector is 128-bit aligned</li>
+<li><tt class="docutils literal"><span class="pre">a0:0:64</span></tt> - aggregates are 64-bit aligned</li>
+</ul>
+<p>When LLVM is determining the alignment for a given type, it uses the
+following rules:</p>
+<ol class="arabic simple">
+<li>If the type sought is an exact match for one of the specifications,
+that specification is used.</li>
+<li>If no match is found, and the type sought is an integer type, then
+the smallest integer type that is larger than the bitwidth of the
+sought type is used. If none of the specifications are larger than
+the bitwidth then the largest integer type is used. For example,
+given the default specifications above, the i7 type will use the
+alignment of i8 (next largest) while both i65 and i256 will use the
+alignment of i64 (largest specified).</li>
+<li>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.</li>
+</ol>
+<p>The function of the data layout string may not be what you expect.
+Notably, this is not a specification from the frontend of what alignment
+the code generator should use.</p>
+<p>Instead, if specified, the target data layout is required to match what
+the ultimate <em>code generator</em> expects. This string is used by the
+mid-level optimizers to improve code, and this only works if it matches
+what the ultimate code generator uses. If you would like to generate IR
+that does not embed this target-specific detail into the IR, then you
+don’t have to specify the string. This will disable some optimizations
+that require precise layout information, but this also prevents those
+optimizations from introducing target specificity into the IR.</p>
+</div>
+<div class="section" id="target-triple">
+<span id="langref-triple"></span><h3><a class="toc-backref" href="#id592">Target Triple</a><a class="headerlink" href="#target-triple" title="Permalink to this headline">¶</a></h3>
+<p>A module may specify a target triple string that describes the target
+host. The syntax for the target triple is simply:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">target</span> <span class="k">triple</span> <span class="p">=</span> <span class="s">"x86_64-apple-macosx10.7.0"</span>
+</pre></div>
+</div>
+<p>The <em>target triple</em> string consists of a series of identifiers delimited
+by the minus sign character (‘-‘). The canonical forms are:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">ARCHITECTURE</span><span class="o">-</span><span class="n">VENDOR</span><span class="o">-</span><span class="n">OPERATING_SYSTEM</span>
+<span class="n">ARCHITECTURE</span><span class="o">-</span><span class="n">VENDOR</span><span class="o">-</span><span class="n">OPERATING_SYSTEM</span><span class="o">-</span><span class="n">ENVIRONMENT</span>
+</pre></div>
+</div>
+<p>This information is passed along to the backend so that it generates
+code for the proper architecture. It’s possible to override this on the
+command line with the <tt class="docutils literal"><span class="pre">-mtriple</span></tt> command line option.</p>
+</div>
+<div class="section" id="pointer-aliasing-rules">
+<span id="pointeraliasing"></span><h3><a class="toc-backref" href="#id593">Pointer Aliasing Rules</a><a class="headerlink" href="#pointer-aliasing-rules" title="Permalink to this headline">¶</a></h3>
+<p>Any memory access must be done through a pointer value associated with
+an address range of the memory access, otherwise the behavior is
+undefined. Pointer values are associated with address ranges according
+to the following rules:</p>
+<ul class="simple">
+<li>A pointer value is associated with the addresses associated with any
+value it is <em>based</em> on.</li>
+<li>An address of a global variable is associated with the address range
+of the variable’s storage.</li>
+<li>The result value of an allocation instruction is associated with the
+address range of the allocated storage.</li>
+<li>A null pointer in the default address-space is associated with no
+address.</li>
+<li>An integer constant other than zero or a pointer value returned from
+a function not defined within LLVM may be associated with address
+ranges allocated through mechanisms other than those provided by
+LLVM. Such ranges shall not overlap with any ranges of addresses
+allocated by mechanisms provided by LLVM.</li>
+</ul>
+<p>A pointer value is <em>based</em> on another pointer value according to the
+following rules:</p>
+<ul class="simple">
+<li>A pointer value formed from a <tt class="docutils literal"><span class="pre">getelementptr</span></tt> operation is <em>based</em>
+on the first operand of the <tt class="docutils literal"><span class="pre">getelementptr</span></tt>.</li>
+<li>The result value of a <tt class="docutils literal"><span class="pre">bitcast</span></tt> is <em>based</em> on the operand of the
+<tt class="docutils literal"><span class="pre">bitcast</span></tt>.</li>
+<li>A pointer value formed by an <tt class="docutils literal"><span class="pre">inttoptr</span></tt> is <em>based</em> on all pointer
+values that contribute (directly or indirectly) to the computation of
+the pointer’s value.</li>
+<li>The “<em>based</em> on” relationship is transitive.</li>
+</ul>
+<p>Note that this definition of <em>“based”</em> is intentionally similar to the
+definition of <em>“based”</em> in C99, though it is slightly weaker.</p>
+<p>LLVM IR does not associate types with memory. The result type of a
+<tt class="docutils literal"><span class="pre">load</span></tt> merely indicates the size and alignment of the memory from
+which to load, as well as the interpretation of the value. The first
+operand type of a <tt class="docutils literal"><span class="pre">store</span></tt> similarly only indicates the size and
+alignment of the store.</p>
+<p>Consequently, type-based alias analysis, aka TBAA, aka
+<tt class="docutils literal"><span class="pre">-fstrict-aliasing</span></tt>, is not applicable to general unadorned LLVM IR.
+<a class="reference internal" href="#metadata"><em>Metadata</em></a> may be used to encode additional information
+which specialized optimization passes may use to implement type-based
+alias analysis.</p>
+</div>
+<div class="section" id="volatile-memory-accesses">
+<span id="volatile"></span><h3><a class="toc-backref" href="#id594">Volatile Memory Accesses</a><a class="headerlink" href="#volatile-memory-accesses" title="Permalink to this headline">¶</a></h3>
+<p>Certain memory accesses, such as <a class="reference internal" href="#i-load"><em>load</em></a>‘s,
+<a class="reference internal" href="#i-store"><em>store</em></a>‘s, and <a class="reference internal" href="#int-memcpy"><em>llvm.memcpy</em></a>‘s may be
+marked <tt class="docutils literal"><span class="pre">volatile</span></tt>. The optimizers must not change the number of
+volatile operations or change their order of execution relative to other
+volatile operations. The optimizers <em>may</em> change the order of volatile
+operations relative to non-volatile operations. This is not Java’s
+“volatile” and has no cross-thread synchronization behavior.</p>
+<p>IR-level volatile loads and stores cannot safely be optimized into
+llvm.memcpy or llvm.memmove intrinsics even when those intrinsics are
+flagged volatile. Likewise, the backend should never split or merge
+target-legal volatile load/store instructions.</p>
+<div class="admonition-rationale admonition">
+<p class="first admonition-title">Rationale</p>
+<p class="last">Platforms may rely on volatile loads and stores of natively supported
+data width to be executed as single instruction. For example, in C
+this holds for an l-value of volatile primitive type with native
+hardware support, but not necessarily for aggregate types. The
+frontend upholds these expectations, which are intentionally
+unspecified in the IR. The rules above ensure that IR transformation
+do not violate the frontend’s contract with the language.</p>
+</div>
+</div>
+<div class="section" id="memory-model-for-concurrent-operations">
+<span id="memmodel"></span><h3><a class="toc-backref" href="#id595">Memory Model for Concurrent Operations</a><a class="headerlink" href="#memory-model-for-concurrent-operations" title="Permalink to this headline">¶</a></h3>
+<p>The LLVM IR does not define any way to start parallel threads of
+execution or to register signal handlers. Nonetheless, there are
+platform-specific ways to create them, and we define LLVM IR’s behavior
+in their presence. This model is inspired by the C++0x memory model.</p>
+<p>For a more informal introduction to this model, see the <a class="reference internal" href="Atomics.html"><em>LLVM Atomic Instructions and Concurrency Guide</em></a>.</p>
+<p>We define a <em>happens-before</em> partial order as the least partial order
+that</p>
+<ul class="simple">
+<li>Is a superset of single-thread program order, and</li>
+<li>When a <em>synchronizes-with</em> <tt class="docutils literal"><span class="pre">b</span></tt>, includes an edge from <tt class="docutils literal"><span class="pre">a</span></tt> to
+<tt class="docutils literal"><span class="pre">b</span></tt>. <em>Synchronizes-with</em> pairs are introduced by platform-specific
+techniques, like pthread locks, thread creation, thread joining,
+etc., and by atomic instructions. (See also <a class="reference internal" href="#ordering"><em>Atomic Memory Ordering
+Constraints</em></a>).</li>
+</ul>
+<p>Note that program order does not introduce <em>happens-before</em> edges
+between a thread and signals executing inside that thread.</p>
+<p>Every (defined) read operation (load instructions, memcpy, atomic
+loads/read-modify-writes, etc.) R reads a series of bytes written by
+(defined) write operations (store instructions, atomic
+stores/read-modify-writes, memcpy, etc.). For the purposes of this
+section, initialized globals are considered to have a write of the
+initializer which is atomic and happens before any other read or write
+of the memory in question. For each byte of a read R, R<sub>byte</sub>
+may see any write to the same byte, except:</p>
+<ul class="simple">
+<li>If write<sub>1</sub>  happens before write<sub>2</sub>, and
+write<sub>2</sub> happens before R<sub>byte</sub>, then
+R<sub>byte</sub> does not see write<sub>1</sub>.</li>
+<li>If R<sub>byte</sub> happens before write<sub>3</sub>, then
+R<sub>byte</sub> does not see write<sub>3</sub>.</li>
+</ul>
+<p>Given that definition, R<sub>byte</sub> is defined as follows:</p>
+<ul class="simple">
+<li>If R is volatile, the result is target-dependent. (Volatile is
+supposed to give guarantees which can support <tt class="docutils literal"><span class="pre">sig_atomic_t</span></tt> in
+C/C++, and may be used for accesses to addresses which do not behave
+like normal memory. It does not generally provide cross-thread
+synchronization.)</li>
+<li>Otherwise, if there is no write to the same byte that happens before
+R<sub>byte</sub>, R<sub>byte</sub> returns <tt class="docutils literal"><span class="pre">undef</span></tt> for that byte.</li>
+<li>Otherwise, if R<sub>byte</sub> may see exactly one write,
+R<sub>byte</sub> returns the value written by that write.</li>
+<li>Otherwise, if R is atomic, and all the writes R<sub>byte</sub> may
+see are atomic, it chooses one of the values written. See the <a class="reference internal" href="#ordering"><em>Atomic
+Memory Ordering Constraints</em></a> section for additional
+constraints on how the choice is made.</li>
+<li>Otherwise R<sub>byte</sub> returns <tt class="docutils literal"><span class="pre">undef</span></tt>.</li>
+</ul>
+<p>R returns the value composed of the series of bytes it read. This
+implies that some bytes within the value may be <tt class="docutils literal"><span class="pre">undef</span></tt> <strong>without</strong>
+the entire value being <tt class="docutils literal"><span class="pre">undef</span></tt>. Note that this only defines the
+semantics of the operation; it doesn’t mean that targets will emit more
+than one instruction to read the series of bytes.</p>
+<p>Note that in cases where none of the atomic intrinsics are used, this
+model places only one restriction on IR transformations on top of what
+is required for single-threaded execution: introducing a store to a byte
+which might not otherwise be stored is not allowed in general.
+(Specifically, in the case where another thread might write to and read
+from an address, introducing a store can change a load that may see
+exactly one write into a load that may see multiple writes.)</p>
+</div>
+<div class="section" id="atomic-memory-ordering-constraints">
+<span id="ordering"></span><h3><a class="toc-backref" href="#id596">Atomic Memory Ordering Constraints</a><a class="headerlink" href="#atomic-memory-ordering-constraints" title="Permalink to this headline">¶</a></h3>
+<p>Atomic instructions (<a class="reference internal" href="#i-cmpxchg"><em>cmpxchg</em></a>,
+<a class="reference internal" href="#i-atomicrmw"><em>atomicrmw</em></a>, <a class="reference internal" href="#i-fence"><em>fence</em></a>,
+<a class="reference internal" href="#i-load"><em>atomic load</em></a>, and <a class="reference internal" href="#i-store"><em>atomic store</em></a>) take
+an ordering parameter that determines which other atomic instructions on
+the same address they <em>synchronize with</em>. These semantics are borrowed
+from Java and C++0x, but are somewhat more colloquial. If these
+descriptions aren’t precise enough, check those specs (see spec
+references in the <a class="reference internal" href="Atomics.html"><em>atomics guide</em></a>).
+<a class="reference internal" href="#i-fence"><em>fence</em></a> instructions treat these orderings somewhat
+differently since they don’t take an address. See that instruction’s
+documentation for details.</p>
+<p>For a simpler introduction to the ordering constraints, see the
+<a class="reference internal" href="Atomics.html"><em>LLVM Atomic Instructions and Concurrency Guide</em></a>.</p>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">unordered</span></tt></dt>
+<dd>The set of values that can be read is governed by the happens-before
+partial order. A value cannot be read unless some operation wrote
+it. This is intended to provide a guarantee strong enough to model
+Java’s non-volatile shared variables. This ordering cannot be
+specified for read-modify-write operations; it is not strong enough
+to make them atomic in any interesting way.</dd>
+<dt><tt class="docutils literal"><span class="pre">monotonic</span></tt></dt>
+<dd>In addition to the guarantees of <tt class="docutils literal"><span class="pre">unordered</span></tt>, there is a single
+total order for modifications by <tt class="docutils literal"><span class="pre">monotonic</span></tt> operations on each
+address. All modification orders must be compatible with the
+happens-before order. There is no guarantee that the modification
+orders can be combined to a global total order for the whole program
+(and this often will not be possible). The read in an atomic
+read-modify-write operation (<a class="reference internal" href="#i-cmpxchg"><em>cmpxchg</em></a> and
+<a class="reference internal" href="#i-atomicrmw"><em>atomicrmw</em></a>) reads the value in the modification
+order immediately before the value it writes. If one atomic read
+happens before another atomic read of the same address, the later
+read must see the same value or a later value in the address’s
+modification order. This disallows reordering of <tt class="docutils literal"><span class="pre">monotonic</span></tt> (or
+stronger) operations on the same address. If an address is written
+<tt class="docutils literal"><span class="pre">monotonic</span></tt>-ally by one thread, and other threads <tt class="docutils literal"><span class="pre">monotonic</span></tt>-ally
+read that address repeatedly, the other threads must eventually see
+the write. This corresponds to the C++0x/C1x
+<tt class="docutils literal"><span class="pre">memory_order_relaxed</span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">acquire</span></tt></dt>
+<dd>In addition to the guarantees of <tt class="docutils literal"><span class="pre">monotonic</span></tt>, a
+<em>synchronizes-with</em> edge may be formed with a <tt class="docutils literal"><span class="pre">release</span></tt> operation.
+This is intended to model C++’s <tt class="docutils literal"><span class="pre">memory_order_acquire</span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">release</span></tt></dt>
+<dd>In addition to the guarantees of <tt class="docutils literal"><span class="pre">monotonic</span></tt>, if this operation
+writes a value which is subsequently read by an <tt class="docutils literal"><span class="pre">acquire</span></tt>
+operation, it <em>synchronizes-with</em> that operation. (This isn’t a
+complete description; see the C++0x definition of a release
+sequence.) This corresponds to the C++0x/C1x
+<tt class="docutils literal"><span class="pre">memory_order_release</span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">acq_rel</span></tt> (acquire+release)</dt>
+<dd>Acts as both an <tt class="docutils literal"><span class="pre">acquire</span></tt> and <tt class="docutils literal"><span class="pre">release</span></tt> operation on its
+address. This corresponds to the C++0x/C1x <tt class="docutils literal"><span class="pre">memory_order_acq_rel</span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">seq_cst</span></tt> (sequentially consistent)</dt>
+<dd>In addition to the guarantees of <tt class="docutils literal"><span class="pre">acq_rel</span></tt> (<tt class="docutils literal"><span class="pre">acquire</span></tt> for an
+operation which only reads, <tt class="docutils literal"><span class="pre">release</span></tt> for an operation which only
+writes), there is a global total order on all
+sequentially-consistent operations on all addresses, which is
+consistent with the <em>happens-before</em> partial order and with the
+modification orders of all the affected addresses. Each
+sequentially-consistent read sees the last preceding write to the
+same address in this global order. This corresponds to the C++0x/C1x
+<tt class="docutils literal"><span class="pre">memory_order_seq_cst</span></tt> and Java volatile.</dd>
+</dl>
+<p id="singlethread">If an atomic operation is marked <tt class="docutils literal"><span class="pre">singlethread</span></tt>, it only <em>synchronizes
+with</em> or participates in modification and seq_cst total orderings with
+other operations running in the same thread (for example, in signal
+handlers).</p>
+</div>
+<div class="section" id="fast-math-flags">
+<span id="fastmath"></span><h3><a class="toc-backref" href="#id597">Fast-Math Flags</a><a class="headerlink" href="#fast-math-flags" title="Permalink to this headline">¶</a></h3>
+<p>LLVM IR floating-point binary ops (<a class="reference internal" href="#i-fadd"><em>fadd</em></a>,
+<a class="reference internal" href="#i-fsub"><em>fsub</em></a>, <a class="reference internal" href="#i-fmul"><em>fmul</em></a>, <a class="reference internal" href="#i-fdiv"><em>fdiv</em></a>,
+<a class="reference internal" href="#i-frem"><em>frem</em></a>) have the following flags that can set to enable
+otherwise unsafe floating point operations</p>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">nnan</span></tt></dt>
+<dd>No NaNs - Allow optimizations to assume the arguments and result are not
+NaN. Such optimizations are required to retain defined behavior over
+NaNs, but the value of the result is undefined.</dd>
+<dt><tt class="docutils literal"><span class="pre">ninf</span></tt></dt>
+<dd>No Infs - Allow optimizations to assume the arguments and result are not
++/-Inf. Such optimizations are required to retain defined behavior over
++/-Inf, but the value of the result is undefined.</dd>
+<dt><tt class="docutils literal"><span class="pre">nsz</span></tt></dt>
+<dd>No Signed Zeros - Allow optimizations to treat the sign of a zero
+argument or result as insignificant.</dd>
+<dt><tt class="docutils literal"><span class="pre">arcp</span></tt></dt>
+<dd>Allow Reciprocal - Allow optimizations to use the reciprocal of an
+argument rather than perform division.</dd>
+<dt><tt class="docutils literal"><span class="pre">fast</span></tt></dt>
+<dd>Fast - Allow algebraically equivalent transformations that may
+dramatically change results in floating point (e.g. reassociate). This
+flag implies all the others.</dd>
+</dl>
+</div>
+</div>
+<div class="section" id="type-system">
+<span id="typesystem"></span><h2><a class="toc-backref" href="#id598">Type System</a><a class="headerlink" href="#type-system" title="Permalink to this headline">¶</a></h2>
+<p>The LLVM type system is one of the most important features of the
+intermediate representation. Being typed enables a number of
+optimizations to be performed on the intermediate representation
+directly, without having to do extra analyses on the side before the
+transformation. A strong type system makes it easier to read the
+generated code and enables novel analyses and transformations that are
+not feasible to perform on normal three address code representations.</p>
+<div class="section" id="type-classifications">
+<span id="typeclassifications"></span><h3><a class="toc-backref" href="#id599">Type Classifications</a><a class="headerlink" href="#type-classifications" title="Permalink to this headline">¶</a></h3>
+<p>The types fall into a few useful classifications:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="50%" />
+<col width="50%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Classification</th>
+<th class="head">Types</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><a class="reference internal" href="#t-integer"><em>integer</em></a></td>
+<td><tt class="docutils literal"><span class="pre">i1</span></tt>, <tt class="docutils literal"><span class="pre">i2</span></tt>, <tt class="docutils literal"><span class="pre">i3</span></tt>, ... <tt class="docutils literal"><span class="pre">i8</span></tt>, ... <tt class="docutils literal"><span class="pre">i16</span></tt>, ... <tt class="docutils literal"><span class="pre">i32</span></tt>, ...
+<tt class="docutils literal"><span class="pre">i64</span></tt>, ...</td>
+</tr>
+<tr class="row-odd"><td><a class="reference internal" href="#t-floating"><em>floating point</em></a></td>
+<td><tt class="docutils literal"><span class="pre">half</span></tt>, <tt class="docutils literal"><span class="pre">float</span></tt>, <tt class="docutils literal"><span class="pre">double</span></tt>, <tt class="docutils literal"><span class="pre">x86_fp80</span></tt>, <tt class="docutils literal"><span class="pre">fp128</span></tt>,
+<tt class="docutils literal"><span class="pre">ppc_fp128</span></tt></td>
+</tr>
+<tr class="row-even"><td>first class</td>
+<td id="t-firstclass"><a class="reference internal" href="#t-integer"><em>integer</em></a>, <a class="reference internal" href="#t-floating"><em>floating point</em></a>,
+<a class="reference internal" href="#t-pointer"><em>pointer</em></a>, <a class="reference internal" href="#t-vector"><em>vector</em></a>,
+<a class="reference internal" href="#t-struct"><em>structure</em></a>, <a class="reference internal" href="#t-array"><em>array</em></a>,
+<a class="reference internal" href="#t-label"><em>label</em></a>, <a class="reference internal" href="#t-metadata"><em>metadata</em></a>.</td>
+</tr>
+<tr class="row-odd"><td><a class="reference internal" href="#t-primitive"><em>primitive</em></a></td>
+<td><a class="reference internal" href="#t-label"><em>label</em></a>,
+<a class="reference internal" href="#t-void"><em>void</em></a>,
+<a class="reference internal" href="#t-integer"><em>integer</em></a>,
+<a class="reference internal" href="#t-floating"><em>floating point</em></a>,
+<a class="reference internal" href="#t-x86mmx"><em>x86mmx</em></a>,
+<a class="reference internal" href="#t-metadata"><em>metadata</em></a>.</td>
+</tr>
+<tr class="row-even"><td><a class="reference internal" href="#t-derived"><em>derived</em></a></td>
+<td><a class="reference internal" href="#t-array"><em>array</em></a>,
+<a class="reference internal" href="#t-function"><em>function</em></a>,
+<a class="reference internal" href="#t-pointer"><em>pointer</em></a>,
+<a class="reference internal" href="#t-struct"><em>structure</em></a>,
+<a class="reference internal" href="#t-vector"><em>vector</em></a>,
+<a class="reference internal" href="#t-opaque"><em>opaque</em></a>.</td>
+</tr>
+</tbody>
+</table>
+<p>The <a class="reference internal" href="#t-firstclass"><em>first class</em></a> types are perhaps the most important.
+Values of these types are the only ones which can be produced by
+instructions.</p>
+</div>
+<div class="section" id="primitive-types">
+<span id="t-primitive"></span><h3><a class="toc-backref" href="#id600">Primitive Types</a><a class="headerlink" href="#primitive-types" title="Permalink to this headline">¶</a></h3>
+<p>The primitive types are the fundamental building blocks of the LLVM
+system.</p>
+<div class="section" id="integer-type">
+<span id="t-integer"></span><h4><a class="toc-backref" href="#id601">Integer Type</a><a class="headerlink" href="#integer-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="overview">
+<h5>Overview:<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h5>
+<p>The integer type is a very simple type that simply specifies an
+arbitrary bit width for the integer type desired. Any bit width from 1
+bit to 2<sup>23</sup>-1 (about 8 million) can be specified.</p>
+</div>
+<div class="section" id="syntax">
+<h5>Syntax:<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">iN</span>
+</pre></div>
+</div>
+<p>The number of bits the integer will occupy is specified by the <tt class="docutils literal"><span class="pre">N</span></tt>
+value.</p>
+</div>
+<div class="section" id="examples">
+<h5>Examples:<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h5>
+<table border="1" class="docutils">
+<colgroup>
+<col width="25%" />
+<col width="75%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">i1</span></tt></td>
+<td>a single-bit integer.</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">i32</span></tt></td>
+<td>a 32-bit integer.</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">i1942652</span></tt></td>
+<td>a really big integer of over 1 million bits.</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="section" id="floating-point-types">
+<span id="t-floating"></span><h4><a class="toc-backref" href="#id602">Floating Point Types</a><a class="headerlink" href="#floating-point-types" title="Permalink to this headline">¶</a></h4>
+<table border="1" class="docutils">
+<colgroup>
+<col width="50%" />
+<col width="50%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Type</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">half</span></tt></td>
+<td>16-bit floating point value</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">float</span></tt></td>
+<td>32-bit floating point value</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">double</span></tt></td>
+<td>64-bit floating point value</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">fp128</span></tt></td>
+<td>128-bit floating point value (112-bit mantissa)</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">x86_fp80</span></tt></td>
+<td>80-bit floating point value (X87)</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">ppc_fp128</span></tt></td>
+<td>128-bit floating point value (two 64-bits)</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="x86mmx-type">
+<span id="t-x86mmx"></span><h4><a class="toc-backref" href="#id603">X86mmx Type</a><a class="headerlink" href="#x86mmx-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id3">
+<h5>Overview:<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h5>
+<p>The x86mmx type represents a value held in an MMX register on an x86
+machine. The operations allowed on it are quite limited: parameters and
+return values, load and store, and bitcast. User-specified MMX
+instructions are represented as intrinsic or asm calls with arguments
+and/or results of this type. There are no arrays, vectors or constants
+of this type.</p>
+</div>
+<div class="section" id="id4">
+<h5>Syntax:<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">x86mmx</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="void-type">
+<span id="t-void"></span><h4><a class="toc-backref" href="#id604">Void Type</a><a class="headerlink" href="#void-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id5">
+<h5>Overview:<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h5>
+<p>The void type does not represent any value and has no size.</p>
+</div>
+<div class="section" id="id6">
+<h5>Syntax:<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">void</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="label-type">
+<span id="t-label"></span><h4><a class="toc-backref" href="#id605">Label Type</a><a class="headerlink" href="#label-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id7">
+<h5>Overview:<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h5>
+<p>The label type represents code labels.</p>
+</div>
+<div class="section" id="id8">
+<h5>Syntax:<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">label</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="metadata-type">
+<span id="t-metadata"></span><h4><a class="toc-backref" href="#id606">Metadata Type</a><a class="headerlink" href="#metadata-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id9">
+<h5>Overview:<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h5>
+<p>The metadata type represents embedded metadata. No derived types may be
+created from metadata except for <a class="reference internal" href="#t-function"><em>function</em></a> arguments.</p>
+</div>
+<div class="section" id="id10">
+<h5>Syntax:<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">metadata</span>
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="derived-types">
+<span id="t-derived"></span><h3><a class="toc-backref" href="#id607">Derived Types</a><a class="headerlink" href="#derived-types" title="Permalink to this headline">¶</a></h3>
+<p>The real power in LLVM comes from the derived types in the system. This
+is what allows a programmer to represent arrays, functions, pointers,
+and other useful types. Each of these types contain one or more element
+types which may be a primitive type, or another derived type. For
+example, it is possible to have a two dimensional array, using an array
+as the element type of another array.</p>
+<div class="section" id="aggregate-types">
+<span id="t-aggregate"></span><h4><a class="toc-backref" href="#id608">Aggregate Types</a><a class="headerlink" href="#aggregate-types" title="Permalink to this headline">¶</a></h4>
+<p>Aggregate Types are a subset of derived types that can contain multiple
+member types. <a class="reference internal" href="#t-array"><em>Arrays</em></a> and <a class="reference internal" href="#t-struct"><em>structs</em></a> are
+aggregate types. <a class="reference internal" href="#t-vector"><em>Vectors</em></a> are not considered to be
+aggregate types.</p>
+</div>
+<div class="section" id="array-type">
+<span id="t-array"></span><h4><a class="toc-backref" href="#id609">Array Type</a><a class="headerlink" href="#array-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id11">
+<h5>Overview:<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h5>
+<p>The array type is a very simple derived type that arranges elements
+sequentially in memory. The array type requires a size (number of
+elements) and an underlying data type.</p>
+</div>
+<div class="section" id="id12">
+<h5>Syntax:<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>[<# elements> x <elementtype>]</pre>
+</div>
+<p>The number of elements is a constant integer value; <tt class="docutils literal"><span class="pre">elementtype</span></tt> may
+be any type with a size.</p>
+</div>
+<div class="section" id="id13">
+<h5>Examples:<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h5>
+<table border="1" class="docutils">
+<colgroup>
+<col width="32%" />
+<col width="68%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">[40</span> <span class="pre">x</span> <span class="pre">i32]</span></tt></td>
+<td>Array of 40 32-bit integer values.</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">[41</span> <span class="pre">x</span> <span class="pre">i32]</span></tt></td>
+<td>Array of 41 32-bit integer values.</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">[4</span> <span class="pre">x</span> <span class="pre">i8]</span></tt></td>
+<td>Array of 4 8-bit integer values.</td>
+</tr>
+</tbody>
+</table>
+<p>Here are some examples of multidimensional arrays:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="33%" />
+<col width="67%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">[3</span> <span class="pre">x</span> <span class="pre">[4</span> <span class="pre">x</span> <span class="pre">i32]]</span></tt></td>
+<td>3x4 array of 32-bit integer values.</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">[12</span> <span class="pre">x</span> <span class="pre">[10</span> <span class="pre">x</span> <span class="pre">float]]</span></tt></td>
+<td>12x10 array of single precision floating point values.</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">[2</span> <span class="pre">x</span> <span class="pre">[3</span> <span class="pre">x</span> <span class="pre">[4</span> <span class="pre">x</span> <span class="pre">i16]]]</span></tt></td>
+<td>2x3x4 array of 16-bit integer values.</td>
+</tr>
+</tbody>
+</table>
+<p>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 “<tt class="docutils literal"><span class="pre">{</span> <span class="pre">i32,</span> <span class="pre">[0</span> <span class="pre">x</span> <span class="pre">float]}</span></tt>”, for
+example.</p>
+</div>
+</div>
+<div class="section" id="function-type">
+<span id="t-function"></span><h4><a class="toc-backref" href="#id610">Function Type</a><a class="headerlink" href="#function-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id14">
+<h5>Overview:<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h5>
+<p>The function type can be thought of as a function signature. It consists of a
+return type and a list of formal parameter types. The return type of a function
+type is a void type or first class type — except for <a class="reference internal" href="#t-label"><em>label</em></a>
+and <a class="reference internal" href="#t-metadata"><em>metadata</em></a> types.</p>
+</div>
+<div class="section" id="id15">
+<h5>Syntax:<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><returntype> (<parameter list>)</pre>
+</div>
+<p>...where ‘<tt class="docutils literal"><span class="pre"><parameter</span> <span class="pre">list></span></tt>‘ is a comma-separated list of type
+specifiers. Optionally, the parameter list may include a type <tt class="docutils literal"><span class="pre">...</span></tt>, which
+indicates that the function takes a variable number of arguments.  Variable
+argument functions can access their arguments with the <a class="reference internal" href="#int-varargs"><em>variable argument
+handling intrinsic</em></a> functions.  ‘<tt class="docutils literal"><span class="pre"><returntype></span></tt>‘ is any type
+except <a class="reference internal" href="#t-label"><em>label</em></a> and <a class="reference internal" href="#t-metadata"><em>metadata</em></a>.</p>
+</div>
+<div class="section" id="id16">
+<h5>Examples:<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h5>
+<table border="1" class="docutils">
+<colgroup>
+<col width="17%" />
+<col width="83%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">i32</span> <span class="pre">(i32)</span></tt></td>
+<td>function taking an <tt class="docutils literal"><span class="pre">i32</span></tt>, returning an <tt class="docutils literal"><span class="pre">i32</span></tt></td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">float</span> <span class="pre">(i16,</span> <span class="pre">i32</span> <span class="pre">*)</span> <span class="pre">*</span></tt></td>
+<td><a class="reference internal" href="#t-pointer"><em>Pointer</em></a> to a function that takes an <tt class="docutils literal"><span class="pre">i16</span></tt> and a <a class="reference internal" href="#t-pointer"><em>pointer</em></a> to <tt class="docutils literal"><span class="pre">i32</span></tt>, returning <tt class="docutils literal"><span class="pre">float</span></tt>.</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">i32</span> <span class="pre">(i8*,</span> <span class="pre">...)</span></tt></td>
+<td>A vararg function that takes at least one <a class="reference internal" href="#t-pointer"><em>pointer</em></a> to <tt class="docutils literal"><span class="pre">i8</span></tt> (char in C), which returns an integer. This is the signature for <tt class="docutils literal"><span class="pre">printf</span></tt> in LLVM.</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">{i32,</span> <span class="pre">i32}</span> <span class="pre">(i32)</span></tt></td>
+<td>A function taking an <tt class="docutils literal"><span class="pre">i32</span></tt>, returning a <a class="reference internal" href="#t-struct"><em>structure</em></a> containing two <tt class="docutils literal"><span class="pre">i32</span></tt> values</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="section" id="structure-type">
+<span id="t-struct"></span><h4><a class="toc-backref" href="#id611">Structure Type</a><a class="headerlink" href="#structure-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id17">
+<h5>Overview:<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h5>
+<p>The structure type is used to represent a collection of data members
+together in memory. The elements of a structure may be any type that has
+a size.</p>
+<p>Structures in memory are accessed using ‘<tt class="docutils literal"><span class="pre">load</span></tt>‘ and ‘<tt class="docutils literal"><span class="pre">store</span></tt>‘ by
+getting a pointer to a field with the ‘<tt class="docutils literal"><span class="pre">getelementptr</span></tt>‘ instruction.
+Structures in registers are accessed using the ‘<tt class="docutils literal"><span class="pre">extractvalue</span></tt>‘ and
+‘<tt class="docutils literal"><span class="pre">insertvalue</span></tt>‘ instructions.</p>
+<p>Structures may optionally be “packed” structures, which indicate that
+the alignment of the struct is one byte, and that there is no padding
+between the elements. In non-packed structs, padding between field types
+is inserted as defined by the DataLayout string in the module, which is
+required to match what the underlying code generator expects.</p>
+<p>Structures can either be “literal” or “identified”. A literal structure
+is defined inline with other types (e.g. <tt class="docutils literal"><span class="pre">{i32,</span> <span class="pre">i32}*</span></tt>) whereas
+identified types are always defined at the top level with a name.
+Literal types are uniqued by their contents and can never be recursive
+or opaque since there is no way to write one. Identified types can be
+recursive, can be opaqued, and are never uniqued.</p>
+</div>
+<div class="section" id="id18">
+<h5>Syntax:<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>%T1 = type { <type list> }     ; Identified normal struct type
+%T2 = type <{ <type list> }>   ; Identified packed struct type</pre>
+</div>
+</div>
+<div class="section" id="id19">
+<h5>Examples:<a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h5>
+<table border="1" class="docutils">
+<colgroup>
+<col width="14%" />
+<col width="86%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">{</span> <span class="pre">i32,</span> <span class="pre">i32,</span> <span class="pre">i32</span> <span class="pre">}</span></tt></td>
+<td>A triple of three <tt class="docutils literal"><span class="pre">i32</span></tt> values</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">{</span> <span class="pre">float,</span> <span class="pre">i32</span> <span class="pre">(i32)</span> <span class="pre">*</span> <span class="pre">}</span></tt></td>
+<td>A pair, where the first element is a <tt class="docutils literal"><span class="pre">float</span></tt> and the second element is a <a class="reference internal" href="#t-pointer"><em>pointer</em></a> to a <a class="reference internal" href="#t-function"><em>function</em></a> that takes an <tt class="docutils literal"><span class="pre">i32</span></tt>, returning an <tt class="docutils literal"><span class="pre">i32</span></tt>.</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre"><{</span> <span class="pre">i8,</span> <span class="pre">i32</span> <span class="pre">}></span></tt></td>
+<td>A packed struct known to be 5 bytes in size.</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="section" id="opaque-structure-types">
+<span id="t-opaque"></span><h4><a class="toc-backref" href="#id612">Opaque Structure Types</a><a class="headerlink" href="#opaque-structure-types" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id20">
+<h5>Overview:<a class="headerlink" href="#id20" title="Permalink to this headline">¶</a></h5>
+<p>Opaque structure types are used to represent named structure types that
+do not have a body specified. This corresponds (for example) to the C
+notion of a forward declared structure.</p>
+</div>
+<div class="section" id="id21">
+<h5>Syntax:<a class="headerlink" href="#id21" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>%X = type opaque
+%52 = type opaque</pre>
+</div>
+</div>
+<div class="section" id="id22">
+<h5>Examples:<a class="headerlink" href="#id22" title="Permalink to this headline">¶</a></h5>
+<table border="1" class="docutils">
+<colgroup>
+<col width="42%" />
+<col width="58%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">opaque</span></tt></td>
+<td>An opaque type.</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="section" id="pointer-type">
+<span id="t-pointer"></span><h4><a class="toc-backref" href="#id613">Pointer Type</a><a class="headerlink" href="#pointer-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id23">
+<h5>Overview:<a class="headerlink" href="#id23" title="Permalink to this headline">¶</a></h5>
+<p>The pointer type is used to specify memory locations. Pointers are
+commonly used to reference objects in memory.</p>
+<p>Pointer types may have an optional address space attribute defining the
+numbered address space where the pointed-to object resides. The default
+address space is number zero. The semantics of non-zero address spaces
+are target-specific.</p>
+<p>Note that LLVM does not permit pointers to void (<tt class="docutils literal"><span class="pre">void*</span></tt>) nor does it
+permit pointers to labels (<tt class="docutils literal"><span class="pre">label*</span></tt>). Use <tt class="docutils literal"><span class="pre">i8*</span></tt> instead.</p>
+</div>
+<div class="section" id="id24">
+<h5>Syntax:<a class="headerlink" href="#id24" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><type> *</pre>
+</div>
+</div>
+<div class="section" id="id25">
+<h5>Examples:<a class="headerlink" href="#id25" title="Permalink to this headline">¶</a></h5>
+<table border="1" class="docutils">
+<colgroup>
+<col width="19%" />
+<col width="81%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">[4</span> <span class="pre">x</span> <span class="pre">i32]*</span></tt></td>
+<td>A <a class="reference internal" href="#t-pointer"><em>pointer</em></a> to <a class="reference internal" href="#t-array"><em>array</em></a> of four <tt class="docutils literal"><span class="pre">i32</span></tt> values.</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">i32</span> <span class="pre">(i32*)</span> <span class="pre">*</span></tt></td>
+<td>A <a class="reference internal" href="#t-pointer"><em>pointer</em></a> to a <a class="reference internal" href="#t-function"><em>function</em></a> that takes an <tt class="docutils literal"><span class="pre">i32*</span></tt>, returning an <tt class="docutils literal"><span class="pre">i32</span></tt>.</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">i32</span> <span class="pre">addrspace(5)*</span></tt></td>
+<td>A <a class="reference internal" href="#t-pointer"><em>pointer</em></a> to an <tt class="docutils literal"><span class="pre">i32</span></tt> value that resides in address space #5.</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="section" id="vector-type">
+<span id="t-vector"></span><h4><a class="toc-backref" href="#id614">Vector Type</a><a class="headerlink" href="#vector-type" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id26">
+<h5>Overview:<a class="headerlink" href="#id26" title="Permalink to this headline">¶</a></h5>
+<p>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. Vector types are considered <a class="reference internal" href="#t-firstclass"><em>first class</em></a>.</p>
+</div>
+<div class="section" id="id27">
+<h5>Syntax:<a class="headerlink" href="#id27" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>< <# elements> x <elementtype> ></pre>
+</div>
+<p>The number of elements is a constant integer value larger than 0;
+elementtype may be any integer or floating point type, or a pointer to
+these types. Vectors of size zero are not allowed.</p>
+</div>
+<div class="section" id="id28">
+<h5>Examples:<a class="headerlink" href="#id28" title="Permalink to this headline">¶</a></h5>
+<table border="1" class="docutils">
+<colgroup>
+<col width="28%" />
+<col width="72%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre"><4</span> <span class="pre">x</span> <span class="pre">i32></span></tt></td>
+<td>Vector of 4 32-bit integer values.</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre"><8</span> <span class="pre">x</span> <span class="pre">float></span></tt></td>
+<td>Vector of 8 32-bit floating-point values.</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre"><2</span> <span class="pre">x</span> <span class="pre">i64></span></tt></td>
+<td>Vector of 2 64-bit integer values.</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre"><4</span> <span class="pre">x</span> <span class="pre">i64*></span></tt></td>
+<td>Vector of 4 pointers to 64-bit integer values.</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="constants">
+<h2><a class="toc-backref" href="#id615">Constants</a><a class="headerlink" href="#constants" title="Permalink to this headline">¶</a></h2>
+<p>LLVM has several different basic types of constants. This section
+describes them all and their syntax.</p>
+<div class="section" id="simple-constants">
+<h3><a class="toc-backref" href="#id616">Simple Constants</a><a class="headerlink" href="#simple-constants" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>Boolean constants</strong></dt>
+<dd>The two strings ‘<tt class="docutils literal"><span class="pre">true</span></tt>‘ and ‘<tt class="docutils literal"><span class="pre">false</span></tt>‘ are both valid constants
+of the <tt class="docutils literal"><span class="pre">i1</span></tt> type.</dd>
+<dt><strong>Integer constants</strong></dt>
+<dd>Standard integers (such as ‘4’) are constants of the
+<a class="reference internal" href="#t-integer"><em>integer</em></a> type. Negative numbers may be used with
+integer types.</dd>
+<dt><strong>Floating point constants</strong></dt>
+<dd>Floating point constants use standard decimal notation (e.g.
+123.421), exponential notation (e.g. 1.23421e+2), or a more precise
+hexadecimal notation (see below). The assembler requires the exact
+decimal value of a floating-point constant. For example, the
+assembler accepts 1.25 but rejects 1.3 because 1.3 is a repeating
+decimal in binary. Floating point constants must have a <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> type.</dd>
+<dt><strong>Null pointer constants</strong></dt>
+<dd>The identifier ‘<tt class="docutils literal"><span class="pre">null</span></tt>‘ is recognized as a null pointer constant
+and must be of <a class="reference internal" href="#t-pointer"><em>pointer type</em></a>.</dd>
+</dl>
+<p>The one non-intuitive notation for constants is the hexadecimal form of
+floating point constants. For example, the form
+‘<tt class="docutils literal"><span class="pre">double</span>    <span class="pre">0x432ff973cafa8000</span></tt>‘ is equivalent to (but harder to read
+than) ‘<tt class="docutils literal"><span class="pre">double</span> <span class="pre">4.5e+15</span></tt>‘. The only time hexadecimal floating point
+constants are required (and the only time that they are generated by the
+disassembler) is when a floating point constant must be emitted but it
+cannot be represented as a decimal floating point number in a reasonable
+number of digits. For example, NaN’s, infinities, and other special
+values are represented in their IEEE hexadecimal format so that assembly
+and disassembly do not cause any bits to change in the constants.</p>
+<p>When using the hexadecimal form, constants of types half, float, and
+double are represented using the 16-digit form shown above (which
+matches the IEEE754 representation for double); half and float values
+must, however, be exactly representable as IEEE 754 half and single
+precision, respectively. Hexadecimal format is always used for long
+double, and there are three forms of long double. The 80-bit format used
+by x86 is represented as <tt class="docutils literal"><span class="pre">0xK</span></tt> followed by 20 hexadecimal digits. The
+128-bit format used by PowerPC (two adjacent doubles) is represented by
+<tt class="docutils literal"><span class="pre">0xM</span></tt> followed by 32 hexadecimal digits. The IEEE 128-bit format is
+represented by <tt class="docutils literal"><span class="pre">0xL</span></tt> followed by 32 hexadecimal digits. Long doubles
+will only work if they match the long double format on your target.
+The IEEE 16-bit format (half precision) is represented by <tt class="docutils literal"><span class="pre">0xH</span></tt>
+followed by 4 hexadecimal digits. All hexadecimal formats are big-endian
+(sign bit at the left).</p>
+<p>There are no constants of type x86mmx.</p>
+</div>
+<div class="section" id="complex-constants">
+<span id="complexconstants"></span><h3><a class="toc-backref" href="#id617">Complex Constants</a><a class="headerlink" href="#complex-constants" title="Permalink to this headline">¶</a></h3>
+<p>Complex constants are a (potentially recursive) combination of simple
+constants and smaller complex constants.</p>
+<dl class="docutils">
+<dt><strong>Structure constants</strong></dt>
+<dd>Structure constants are represented with notation similar to
+structure type definitions (a comma separated list of elements,
+surrounded by braces (<tt class="docutils literal"><span class="pre">{}</span></tt>)). For example:
+“<tt class="docutils literal"><span class="pre">{</span> <span class="pre">i32</span> <span class="pre">4,</span> <span class="pre">float</span> <span class="pre">17.0,</span> <span class="pre">i32*</span> <span class="pre">@G</span> <span class="pre">}</span></tt>”, where “<tt class="docutils literal"><span class="pre">@G</span></tt>” is declared as
+“<tt class="docutils literal"><span class="pre">@G</span> <span class="pre">=</span> <span class="pre">external</span> <span class="pre">global</span> <span class="pre">i32</span></tt>”. Structure constants must have
+<a class="reference internal" href="#t-struct"><em>structure type</em></a>, and the number and types of elements
+must match those specified by the type.</dd>
+<dt><strong>Array constants</strong></dt>
+<dd>Array constants are represented with notation similar to array type
+definitions (a comma separated list of elements, surrounded by
+square brackets (<tt class="docutils literal"><span class="pre">[]</span></tt>)). For example:
+“<tt class="docutils literal"><span class="pre">[</span> <span class="pre">i32</span> <span class="pre">42,</span> <span class="pre">i32</span> <span class="pre">11,</span> <span class="pre">i32</span> <span class="pre">74</span> <span class="pre">]</span></tt>”. Array constants must have
+<a class="reference internal" href="#t-array"><em>array type</em></a>, and the number and types of elements must
+match those specified by the type.</dd>
+<dt><strong>Vector constants</strong></dt>
+<dd>Vector constants are represented with notation similar to vector
+type definitions (a comma separated list of elements, surrounded by
+less-than/greater-than’s (<tt class="docutils literal"><span class="pre"><></span></tt>)). For example:
+“<tt class="docutils literal"><span class="pre"><</span> <span class="pre">i32</span> <span class="pre">42,</span> <span class="pre">i32</span> <span class="pre">11,</span> <span class="pre">i32</span> <span class="pre">74,</span> <span class="pre">i32</span> <span class="pre">100</span> <span class="pre">></span></tt>”. Vector constants
+must have <a class="reference internal" href="#t-vector"><em>vector type</em></a>, and the number and types of
+elements must match those specified by the type.</dd>
+<dt><strong>Zero initialization</strong></dt>
+<dd>The string ‘<tt class="docutils literal"><span class="pre">zeroinitializer</span></tt>‘ can be used to zero initialize a
+value to zero of <em>any</em> type, including scalar and
+<a class="reference internal" href="#t-aggregate"><em>aggregate</em></a> types. This is often used to avoid
+having to print large zero initializers (e.g. for large arrays) and
+is always exactly equivalent to using explicit zero initializers.</dd>
+<dt><strong>Metadata node</strong></dt>
+<dd>A metadata node is a structure-like constant with <a class="reference internal" href="#t-metadata"><em>metadata
+type</em></a>. For example:
+“<tt class="docutils literal"><span class="pre">metadata</span> <span class="pre">!{</span> <span class="pre">i32</span> <span class="pre">0,</span> <span class="pre">metadata</span> <span class="pre">!"test"</span> <span class="pre">}</span></tt>”. Unlike other
+constants that are meant to be interpreted as part of the
+instruction stream, metadata is a place to attach additional
+information such as debug info.</dd>
+</dl>
+</div>
+<div class="section" id="global-variable-and-function-addresses">
+<h3><a class="toc-backref" href="#id618">Global Variable and Function Addresses</a><a class="headerlink" href="#global-variable-and-function-addresses" title="Permalink to this headline">¶</a></h3>
+<p>The addresses of <a class="reference internal" href="#globalvars"><em>global variables</em></a> and
+<a class="reference internal" href="#functionstructure"><em>functions</em></a> are always implicitly valid
+(link-time) constants. These constants are explicitly referenced when
+the <a class="reference internal" href="#identifiers"><em>identifier for the global</em></a> is used and always have
+<a class="reference internal" href="#t-pointer"><em>pointer</em></a> type. For example, the following is a legal LLVM
+file:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="vg">@X</span> <span class="p">=</span> <span class="k">global</span> <span class="k">i32</span> <span class="m">17</span>
+<span class="vg">@Y</span> <span class="p">=</span> <span class="k">global</span> <span class="k">i32</span> <span class="m">42</span>
+<span class="vg">@Z</span> <span class="p">=</span> <span class="k">global</span> <span class="p">[</span><span class="m">2</span> <span class="k">x</span> <span class="k">i32</span><span class="p">*]</span> <span class="p">[</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@X</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@Y</span> <span class="p">]</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="undefined-values">
+<span id="undefvalues"></span><h3><a class="toc-backref" href="#id619">Undefined Values</a><a class="headerlink" href="#undefined-values" title="Permalink to this headline">¶</a></h3>
+<p>The string ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘ can be used anywhere a constant is expected, and
+indicates that the user of the value may receive an unspecified
+bit-pattern. Undefined values may be of any type (other than ‘<tt class="docutils literal"><span class="pre">label</span></tt>‘
+or ‘<tt class="docutils literal"><span class="pre">void</span></tt>‘) and be used anywhere a constant is permitted.</p>
+<p>Undefined values are useful because they indicate to the compiler that
+the program is well defined no matter what value is used. This gives the
+compiler more freedom to optimize. Here are some examples of
+(potentially surprising) transformations that are valid (in pseudo IR):</p>
+<div class="highlight-llvm"><div class="highlight"><pre>  <span class="nv">%A</span> <span class="p">=</span> <span class="k">add</span> <span class="nv">%X</span><span class="p">,</span> <span class="k">undef</span>
+  <span class="nv">%B</span> <span class="p">=</span> <span class="k">sub</span> <span class="nv">%X</span><span class="p">,</span> <span class="k">undef</span>
+  <span class="nv">%C</span> <span class="p">=</span> <span class="k">xor</span> <span class="nv">%X</span><span class="p">,</span> <span class="k">undef</span>
+<span class="nl">Safe:</span>
+  <span class="nv">%A</span> <span class="p">=</span> <span class="k">undef</span>
+  <span class="nv">%B</span> <span class="p">=</span> <span class="k">undef</span>
+  <span class="nv">%C</span> <span class="p">=</span> <span class="k">undef</span>
+</pre></div>
+</div>
+<p>This is safe because all of the output bits are affected by the undef
+bits. Any output bit can have a zero or one depending on the input bits.</p>
+<div class="highlight-llvm"><div class="highlight"><pre>  <span class="nv">%A</span> <span class="p">=</span> <span class="k">or</span> <span class="nv">%X</span><span class="p">,</span> <span class="k">undef</span>
+  <span class="nv">%B</span> <span class="p">=</span> <span class="k">and</span> <span class="nv">%X</span><span class="p">,</span> <span class="k">undef</span>
+<span class="nl">Safe:</span>
+  <span class="nv">%A</span> <span class="p">=</span> <span class="m">-1</span>
+  <span class="nv">%B</span> <span class="p">=</span> <span class="m">0</span>
+<span class="nl">Unsafe:</span>
+  <span class="nv">%A</span> <span class="p">=</span> <span class="k">undef</span>
+  <span class="nv">%B</span> <span class="p">=</span> <span class="k">undef</span>
+</pre></div>
+</div>
+<p>These logical operations have bits that are not always affected by the
+input. For example, if <tt class="docutils literal"><span class="pre">%X</span></tt> has a zero bit, then the output of the
+‘<tt class="docutils literal"><span class="pre">and</span></tt>‘ operation will always be a zero for that bit, no matter what
+the corresponding bit from the ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘ is. As such, it is unsafe to
+optimize or assume that the result of the ‘<tt class="docutils literal"><span class="pre">and</span></tt>‘ is ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘.
+However, it is safe to assume that all bits of the ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘ could be
+0, and optimize the ‘<tt class="docutils literal"><span class="pre">and</span></tt>‘ to 0. Likewise, it is safe to assume that
+all the bits of the ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘ operand to the ‘<tt class="docutils literal"><span class="pre">or</span></tt>‘ could be set,
+allowing the ‘<tt class="docutils literal"><span class="pre">or</span></tt>‘ to be folded to -1.</p>
+<div class="highlight-llvm"><div class="highlight"><pre>  <span class="nv">%A</span> <span class="p">=</span> <span class="k">select</span> <span class="k">undef</span><span class="p">,</span> <span class="nv">%X</span><span class="p">,</span> <span class="nv">%Y</span>
+  <span class="nv">%B</span> <span class="p">=</span> <span class="k">select</span> <span class="k">undef</span><span class="p">,</span> <span class="m">42</span><span class="p">,</span> <span class="nv">%Y</span>
+  <span class="nv">%C</span> <span class="p">=</span> <span class="k">select</span> <span class="nv">%X</span><span class="p">,</span> <span class="nv">%Y</span><span class="p">,</span> <span class="k">undef</span>
+<span class="nl">Safe:</span>
+  <span class="nv">%A</span> <span class="p">=</span> <span class="nv">%X</span>     <span class="p">(</span><span class="k">or</span> <span class="nv">%Y</span><span class="p">)</span>
+  <span class="nv">%B</span> <span class="p">=</span> <span class="m">42</span>     <span class="p">(</span><span class="k">or</span> <span class="nv">%Y</span><span class="p">)</span>
+  <span class="nv">%C</span> <span class="p">=</span> <span class="nv">%Y</span>
+<span class="nl">Unsafe:</span>
+  <span class="nv">%A</span> <span class="p">=</span> <span class="k">undef</span>
+  <span class="nv">%B</span> <span class="p">=</span> <span class="k">undef</span>
+  <span class="nv">%C</span> <span class="p">=</span> <span class="k">undef</span>
+</pre></div>
+</div>
+<p>This set of examples shows that undefined ‘<tt class="docutils literal"><span class="pre">select</span></tt>‘ (and conditional
+branch) conditions can go <em>either way</em>, but they have to come from one
+of the two operands. In the <tt class="docutils literal"><span class="pre">%A</span></tt> example, if <tt class="docutils literal"><span class="pre">%X</span></tt> and <tt class="docutils literal"><span class="pre">%Y</span></tt> were
+both known to have a clear low bit, then <tt class="docutils literal"><span class="pre">%A</span></tt> would have to have a
+cleared low bit. However, in the <tt class="docutils literal"><span class="pre">%C</span></tt> example, the optimizer is
+allowed to assume that the ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘ operand could be the same as
+<tt class="docutils literal"><span class="pre">%Y</span></tt>, allowing the whole ‘<tt class="docutils literal"><span class="pre">select</span></tt>‘ to be eliminated.</p>
+<div class="highlight-llvm"><pre>  %A = xor undef, undef
+
+  %B = undef
+  %C = xor %B, %B
+
+  %D = undef
+  %E = icmp lt %D, 4
+  %F = icmp gte %D, 4
+
+Safe:
+  %A = undef
+  %B = undef
+  %C = undef
+  %D = undef
+  %E = undef
+  %F = undef</pre>
+</div>
+<p>This example points out that two ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘ operands are not
+necessarily the same. This can be surprising to people (and also matches
+C semantics) where they assume that “<tt class="docutils literal"><span class="pre">X^X</span></tt>” is always zero, even if
+<tt class="docutils literal"><span class="pre">X</span></tt> is undefined. This isn’t true for a number of reasons, but the
+short answer is that an ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘ “variable” can arbitrarily change
+its value over its “live range”. This is true because the variable
+doesn’t actually <em>have a live range</em>. Instead, the value is logically
+read from arbitrary registers that happen to be around when needed, so
+the value is not necessarily consistent over time. In fact, <tt class="docutils literal"><span class="pre">%A</span></tt> and
+<tt class="docutils literal"><span class="pre">%C</span></tt> need to have the same semantics or the core LLVM “replace all
+uses with” concept would not hold.</p>
+<div class="highlight-llvm"><div class="highlight"><pre>  <span class="nv">%A</span> <span class="p">=</span> <span class="k">fdiv</span> <span class="k">undef</span><span class="p">,</span> <span class="nv">%X</span>
+  <span class="nv">%B</span> <span class="p">=</span> <span class="k">fdiv</span> <span class="nv">%X</span><span class="p">,</span> <span class="k">undef</span>
+<span class="nl">Safe:</span>
+  <span class="nv">%A</span> <span class="p">=</span> <span class="k">undef</span>
+<span class="nl">b:</span> <span class="k">unreachable</span>
+</pre></div>
+</div>
+<p>These examples show the crucial difference between an <em>undefined value</em>
+and <em>undefined behavior</em>. An undefined value (like ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘) is
+allowed to have an arbitrary bit-pattern. This means that the <tt class="docutils literal"><span class="pre">%A</span></tt>
+operation can be constant folded to ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘, because the ‘<tt class="docutils literal"><span class="pre">undef</span></tt>‘
+could be an SNaN, and <tt class="docutils literal"><span class="pre">fdiv</span></tt> is not (currently) defined on SNaN’s.
+However, in the second example, we can make a more aggressive
+assumption: because the <tt class="docutils literal"><span class="pre">undef</span></tt> is allowed to be an arbitrary value,
+we are allowed to assume that it could be zero. Since a divide by zero
+has <em>undefined behavior</em>, we are allowed to assume that the operation
+does not execute at all. This allows us to delete the divide and all
+code after it. Because the undefined operation “can’t happen”, the
+optimizer can assume that it occurs in dead code.</p>
+<div class="highlight-llvm"><pre>a:  store undef -> %X
+b:  store %X -> undef
+Safe:
+a: <deleted>
+b: unreachable</pre>
+</div>
+<p>These examples reiterate the <tt class="docutils literal"><span class="pre">fdiv</span></tt> example: a store <em>of</em> an undefined
+value 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 <em>to</em> an undefined location could clobber
+arbitrary memory, therefore, it has undefined behavior.</p>
+</div>
+<div class="section" id="poison-values">
+<span id="poisonvalues"></span><h3><a class="toc-backref" href="#id620">Poison Values</a><a class="headerlink" href="#poison-values" title="Permalink to this headline">¶</a></h3>
+<p>Poison values are similar to <a class="reference internal" href="#undefvalues"><em>undef values</em></a>, however
+they also represent the fact that an instruction or constant expression
+which cannot evoke side effects has nevertheless detected a condition
+which results in undefined behavior.</p>
+<p>There is currently no way of representing a poison value in the IR; they
+only exist when produced by operations such as <a class="reference internal" href="#i-add"><em>add</em></a> with
+the <tt class="docutils literal"><span class="pre">nsw</span></tt> flag.</p>
+<p>Poison value behavior is defined in terms of value <em>dependence</em>:</p>
+<ul class="simple">
+<li>Values other than <a class="reference internal" href="#i-phi"><em>phi</em></a> nodes depend on their operands.</li>
+<li><a class="reference internal" href="#i-phi"><em>Phi</em></a> nodes depend on the operand corresponding to
+their dynamic predecessor basic block.</li>
+<li>Function arguments depend on the corresponding actual argument values
+in the dynamic callers of their functions.</li>
+<li><a class="reference internal" href="#i-call"><em>Call</em></a> instructions depend on the <a class="reference internal" href="#i-ret"><em>ret</em></a>
+instructions that dynamically transfer control back to them.</li>
+<li><a class="reference internal" href="#i-invoke"><em>Invoke</em></a> instructions depend on the
+<a class="reference internal" href="#i-ret"><em>ret</em></a>, <a class="reference internal" href="#i-resume"><em>resume</em></a>, or exception-throwing
+call instructions that dynamically transfer control back to them.</li>
+<li>Non-volatile loads and stores depend on the most recent stores to all
+of the referenced memory addresses, following the order in the IR
+(including loads and stores implied by intrinsics such as
+<a class="reference internal" href="#int-memcpy"><em>@llvm.memcpy</em></a>.)</li>
+<li>An instruction with externally visible side effects depends on the
+most recent preceding instruction with externally visible side
+effects, following the order in the IR. (This includes <a class="reference internal" href="#volatile"><em>volatile
+operations</em></a>.)</li>
+<li>An instruction <em>control-depends</em> on a <a class="reference internal" href="#terminators"><em>terminator
+instruction</em></a> if the terminator instruction has
+multiple successors and the instruction is always executed when
+control transfers to one of the successors, and may not be executed
+when control is transferred to another.</li>
+<li>Additionally, an instruction also <em>control-depends</em> on a terminator
+instruction if the set of instructions it otherwise depends on would
+be different if the terminator had transferred control to a different
+successor.</li>
+<li>Dependence is transitive.</li>
+</ul>
+<p>Poison Values have the same behavior as <a class="reference internal" href="#undefvalues"><em>undef values</em></a>,
+with the additional affect that any instruction which has a <em>dependence</em>
+on a poison value has undefined behavior.</p>
+<p>Here are some examples:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nl">entry:</span>
+  <span class="nv">%poison</span> <span class="p">=</span> <span class="k">sub</span> <span class="k">nuw</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="m">1</span>           <span class="c">; Results in a poison value.</span>
+  <span class="nv">%still_poison</span> <span class="p">=</span> <span class="k">and</span> <span class="k">i32</span> <span class="nv">%poison</span><span class="p">,</span> <span class="m">0</span>   <span class="c">; 0, but also poison.</span>
+  <span class="nv">%poison_yet_again</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@h</span><span class="p">,</span> <span class="k">i32</span> <span class="nv">%still_poison</span>
+  <span class="k">store</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%poison_yet_again</span>  <span class="c">; memory at @h[0] is poisoned</span>
+
+  <span class="k">store</span> <span class="k">i32</span> <span class="nv">%poison</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@g</span>           <span class="c">; Poison value stored to memory.</span>
+  <span class="nv">%poison2</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@g</span>              <span class="c">; Poison value loaded back from memory.</span>
+
+  <span class="k">store</span> <span class="k">volatile</span> <span class="k">i32</span> <span class="nv">%poison</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@g</span>  <span class="c">; External observation; undefined behavior.</span>
+
+  <span class="nv">%narrowaddr</span> <span class="p">=</span> <span class="k">bitcast</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@g</span> <span class="k">to</span> <span class="k">i16</span><span class="p">*</span>
+  <span class="nv">%wideaddr</span> <span class="p">=</span> <span class="k">bitcast</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@g</span> <span class="k">to</span> <span class="k">i64</span><span class="p">*</span>
+  <span class="nv">%poison3</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i16</span><span class="p">*</span> <span class="nv">%narrowaddr</span>     <span class="c">; Returns a poison value.</span>
+  <span class="nv">%poison4</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i64</span><span class="p">*</span> <span class="nv">%wideaddr</span>       <span class="c">; Returns a poison value.</span>
+
+  <span class="nv">%cmp</span> <span class="p">=</span> <span class="k">icmp</span> <span class="k">slt</span> <span class="k">i32</span> <span class="nv">%poison</span><span class="p">,</span> <span class="m">0</span>       <span class="c">; Returns a poison value.</span>
+  <span class="k">br</span> <span class="k">i1</span> <span class="nv">%cmp</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%true</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%end</span>  <span class="c">; Branch to either destination.</span>
+
+<span class="nl">true:</span>
+  <span class="k">store</span> <span class="k">volatile</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@g</span>        <span class="c">; This is control-dependent on %cmp, so</span>
+                                       <span class="c">; it has undefined behavior.</span>
+  <span class="k">br</span> <span class="kt">label</span> <span class="nv">%end</span>
+
+<span class="nl">end:</span>
+  <span class="nv">%p</span> <span class="p">=</span> <span class="k">phi</span> <span class="k">i32</span> <span class="p">[</span> <span class="m">0</span><span class="p">,</span> <span class="nv">%entry</span> <span class="p">],</span> <span class="p">[</span> <span class="m">1</span><span class="p">,</span> <span class="nv">%true</span> <span class="p">]</span>
+                                       <span class="c">; Both edges into this PHI are</span>
+                                       <span class="c">; control-dependent on %cmp, so this</span>
+                                       <span class="c">; always results in a poison value.</span>
+
+  <span class="k">store</span> <span class="k">volatile</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@g</span>        <span class="c">; This would depend on the store in %true</span>
+                                       <span class="c">; if %cmp is true, or the store in %entry</span>
+                                       <span class="c">; otherwise, so this is undefined behavior.</span>
+
+  <span class="k">br</span> <span class="k">i1</span> <span class="nv">%cmp</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%second_true</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%second_end</span>
+                                       <span class="c">; The same branch again, but this time the</span>
+                                       <span class="c">; true block doesn't have side effects.</span>
+
+<span class="nl">second_true:</span>
+  <span class="c">; No side effects!</span>
+  <span class="k">ret</span> <span class="kt">void</span>
+
+<span class="nl">second_end:</span>
+  <span class="k">store</span> <span class="k">volatile</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@g</span>        <span class="c">; This time, the instruction always depends</span>
+                                       <span class="c">; on the store in %end. Also, it is</span>
+                                       <span class="c">; control-equivalent to %end, so this is</span>
+                                       <span class="c">; well-defined (ignoring earlier undefined</span>
+                                       <span class="c">; behavior in this example).</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="addresses-of-basic-blocks">
+<span id="blockaddress"></span><h3><a class="toc-backref" href="#id621">Addresses of Basic Blocks</a><a class="headerlink" href="#addresses-of-basic-blocks" title="Permalink to this headline">¶</a></h3>
+<p><tt class="docutils literal"><span class="pre">blockaddress(@function,</span> <span class="pre">%block)</span></tt></p>
+<p>The ‘<tt class="docutils literal"><span class="pre">blockaddress</span></tt>‘ constant computes the address of the specified
+basic block in the specified function, and always has an <tt class="docutils literal"><span class="pre">i8*</span></tt> type.
+Taking the address of the entry block is illegal.</p>
+<p>This value only has defined behavior when used as an operand to the
+‘<a class="reference internal" href="#i-indirectbr"><em>indirectbr</em></a>‘ instruction, or for comparisons
+against null. Pointer equality tests between labels addresses results in
+undefined behavior — though, again, comparison against null is ok, and
+no label is equal to the null pointer. This may be passed around as an
+opaque pointer sized value as long as the bits are not inspected. This
+allows <tt class="docutils literal"><span class="pre">ptrtoint</span></tt> and arithmetic to be performed on these values so
+long as the original value is reconstituted before the <tt class="docutils literal"><span class="pre">indirectbr</span></tt>
+instruction.</p>
+<p>Finally, some targets may provide defined semantics when using the value
+as the operand to an inline assembly, but that is target specific.</p>
+</div>
+<div class="section" id="constant-expressions">
+<span id="constantexprs"></span><h3><a class="toc-backref" href="#id622">Constant Expressions</a><a class="headerlink" href="#constant-expressions" title="Permalink to this headline">¶</a></h3>
+<p>Constant expressions are used to allow expressions involving other
+constants to be used as constants. Constant expressions may be of any
+<a class="reference internal" href="#t-firstclass"><em>first class</em></a> type and may involve any LLVM operation
+that does not have side effects (e.g. load and call are not supported).
+The following is the syntax for constant expressions:</p>
+<dl class="docutils">
+<dt><tt class="docutils literal"><span class="pre">trunc</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Truncate a constant to another type. The bit size of CST must be
+larger than the bit size of TYPE. Both types must be integers.</dd>
+<dt><tt class="docutils literal"><span class="pre">zext</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Zero extend a constant to another type. The bit size of CST must be
+smaller than the bit size of TYPE. Both types must be integers.</dd>
+<dt><tt class="docutils literal"><span class="pre">sext</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Sign extend a constant to another type. The bit size of CST must be
+smaller than the bit size of TYPE. Both types must be integers.</dd>
+<dt><tt class="docutils literal"><span class="pre">fptrunc</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Truncate a floating point constant to another floating point type.
+The size of CST must be larger than the size of TYPE. Both types
+must be floating point.</dd>
+<dt><tt class="docutils literal"><span class="pre">fpext</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Floating point extend a constant to another type. The size of CST
+must be smaller or equal to the size of TYPE. Both types must be
+floating point.</dd>
+<dt><tt class="docutils literal"><span class="pre">fptoui</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Convert a floating point constant to the corresponding unsigned
+integer constant. TYPE must be a scalar or vector integer type. CST
+must be of scalar or vector floating point type. Both CST and TYPE
+must be scalars, or vectors of the same number of elements. If the
+value won’t fit in the integer type, the results are undefined.</dd>
+<dt><tt class="docutils literal"><span class="pre">fptosi</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Convert a floating point constant to the corresponding signed
+integer constant. TYPE must be a scalar or vector integer type. CST
+must be of scalar or vector floating point type. Both CST and TYPE
+must be scalars, or vectors of the same number of elements. If the
+value won’t fit in the integer type, the results are undefined.</dd>
+<dt><tt class="docutils literal"><span class="pre">uitofp</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Convert an unsigned integer constant to the corresponding floating
+point constant. TYPE must be a scalar or vector floating point type.
+CST must be of scalar or vector integer type. Both CST and TYPE must
+be scalars, or vectors of the same number of elements. If the value
+won’t fit in the floating point type, the results are undefined.</dd>
+<dt><tt class="docutils literal"><span class="pre">sitofp</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Convert a signed integer constant to the corresponding floating
+point constant. TYPE must be a scalar or vector floating point type.
+CST must be of scalar or vector integer type. Both CST and TYPE must
+be scalars, or vectors of the same number of elements. If the value
+won’t fit in the floating point type, the results are undefined.</dd>
+<dt><tt class="docutils literal"><span class="pre">ptrtoint</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Convert a pointer typed constant to the corresponding integer
+constant. <tt class="docutils literal"><span class="pre">TYPE</span></tt> must be an integer type. <tt class="docutils literal"><span class="pre">CST</span></tt> must be of
+pointer type. The <tt class="docutils literal"><span class="pre">CST</span></tt> value is zero extended, truncated, or
+unchanged to make it fit in <tt class="docutils literal"><span class="pre">TYPE</span></tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">inttoptr</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Convert an integer constant to a pointer constant. TYPE must be a
+pointer type. CST must be of integer type. The CST value is zero
+extended, truncated, or unchanged to make it fit in a pointer size.
+This one is <em>really</em> dangerous!</dd>
+<dt><tt class="docutils literal"><span class="pre">bitcast</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Convert a constant, CST, to another TYPE. The constraints of the
+operands are the same as those for the <a class="reference internal" href="#i-bitcast"><em>bitcast
+instruction</em></a>.</dd>
+<dt><tt class="docutils literal"><span class="pre">addrspacecast</span> <span class="pre">(CST</span> <span class="pre">to</span> <span class="pre">TYPE)</span></tt></dt>
+<dd>Convert a constant pointer or constant vector of pointer, CST, to another
+TYPE in a different address space. The constraints of the operands are the
+same as those for the <a class="reference internal" href="#i-addrspacecast"><em>addrspacecast instruction</em></a>.</dd>
+<dt><tt class="docutils literal"><span class="pre">getelementptr</span> <span class="pre">(CSTPTR,</span> <span class="pre">IDX0,</span> <span class="pre">IDX1,</span> <span class="pre">...)</span></tt>, <tt class="docutils literal"><span class="pre">getelementptr</span> <span class="pre">inbounds</span> <span class="pre">(CSTPTR,</span> <span class="pre">IDX0,</span> <span class="pre">IDX1,</span> <span class="pre">...)</span></tt></dt>
+<dd>Perform the <a class="reference internal" href="#i-getelementptr"><em>getelementptr operation</em></a> on
+constants. As with the <a class="reference internal" href="#i-getelementptr"><em>getelementptr</em></a>
+instruction, the index list may have zero or more indexes, which are
+required to make sense for the type of “CSTPTR”.</dd>
+<dt><tt class="docutils literal"><span class="pre">select</span> <span class="pre">(COND,</span> <span class="pre">VAL1,</span> <span class="pre">VAL2)</span></tt></dt>
+<dd>Perform the <a class="reference internal" href="#i-select"><em>select operation</em></a> on constants.</dd>
+<dt><tt class="docutils literal"><span class="pre">icmp</span> <span class="pre">COND</span> <span class="pre">(VAL1,</span> <span class="pre">VAL2)</span></tt></dt>
+<dd>Performs the <a class="reference internal" href="#i-icmp"><em>icmp operation</em></a> on constants.</dd>
+<dt><tt class="docutils literal"><span class="pre">fcmp</span> <span class="pre">COND</span> <span class="pre">(VAL1,</span> <span class="pre">VAL2)</span></tt></dt>
+<dd>Performs the <a class="reference internal" href="#i-fcmp"><em>fcmp operation</em></a> on constants.</dd>
+<dt><tt class="docutils literal"><span class="pre">extractelement</span> <span class="pre">(VAL,</span> <span class="pre">IDX)</span></tt></dt>
+<dd>Perform the <a class="reference internal" href="#i-extractelement"><em>extractelement operation</em></a> on
+constants.</dd>
+<dt><tt class="docutils literal"><span class="pre">insertelement</span> <span class="pre">(VAL,</span> <span class="pre">ELT,</span> <span class="pre">IDX)</span></tt></dt>
+<dd>Perform the <a class="reference internal" href="#i-insertelement"><em>insertelement operation</em></a> on
+constants.</dd>
+<dt><tt class="docutils literal"><span class="pre">shufflevector</span> <span class="pre">(VEC1,</span> <span class="pre">VEC2,</span> <span class="pre">IDXMASK)</span></tt></dt>
+<dd>Perform the <a class="reference internal" href="#i-shufflevector"><em>shufflevector operation</em></a> on
+constants.</dd>
+<dt><tt class="docutils literal"><span class="pre">extractvalue</span> <span class="pre">(VAL,</span> <span class="pre">IDX0,</span> <span class="pre">IDX1,</span> <span class="pre">...)</span></tt></dt>
+<dd>Perform the <a class="reference internal" href="#i-extractvalue"><em>extractvalue operation</em></a> on
+constants. The index list is interpreted in a similar manner as
+indices in a ‘<a class="reference internal" href="#i-getelementptr"><em>getelementptr</em></a>‘ operation. At
+least one index value must be specified.</dd>
+<dt><tt class="docutils literal"><span class="pre">insertvalue</span> <span class="pre">(VAL,</span> <span class="pre">ELT,</span> <span class="pre">IDX0,</span> <span class="pre">IDX1,</span> <span class="pre">...)</span></tt></dt>
+<dd>Perform the <a class="reference internal" href="#i-insertvalue"><em>insertvalue operation</em></a> on constants.
+The index list is interpreted in a similar manner as indices in a
+‘<a class="reference internal" href="#i-getelementptr"><em>getelementptr</em></a>‘ operation. At least one index
+value must be specified.</dd>
+<dt><tt class="docutils literal"><span class="pre">OPCODE</span> <span class="pre">(LHS,</span> <span class="pre">RHS)</span></tt></dt>
+<dd>Perform the specified operation of the LHS and RHS constants. OPCODE
+may be any of the <a class="reference internal" href="#binaryops"><em>binary</em></a> or <a class="reference internal" href="#bitwiseops"><em>bitwise
+binary</em></a> operations. The constraints on operands are
+the same as those for the corresponding instruction (e.g. no bitwise
+operations on floating point values are allowed).</dd>
+</dl>
+</div>
+</div>
+<div class="section" id="other-values">
+<h2><a class="toc-backref" href="#id623">Other Values</a><a class="headerlink" href="#other-values" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="inline-assembler-expressions">
+<span id="inlineasmexprs"></span><h3><a class="toc-backref" href="#id624">Inline Assembler Expressions</a><a class="headerlink" href="#inline-assembler-expressions" title="Permalink to this headline">¶</a></h3>
+<p>LLVM supports inline assembler expressions (as opposed to <a class="reference internal" href="#moduleasm"><em>Module-Level
+Inline Assembly</em></a>) through the use of a special value. This
+value represents the inline assembler as a string (containing the
+instructions to emit), a list of operand constraints (stored as a
+string), a flag that indicates whether or not the inline asm expression
+has side effects, and a flag indicating whether the function containing
+the asm needs to align its stack conservatively. An example inline
+assembler expression is:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">i32</span> <span class="p">(</span><span class="k">i32</span><span class="p">)</span> <span class="k">asm</span> <span class="s">"bswap $0"</span><span class="p">,</span> <span class="s">"=r,r"</span>
+</pre></div>
+</div>
+<p>Inline assembler expressions may <strong>only</strong> be used as the callee operand
+of a <a class="reference internal" href="#i-call"><em>call</em></a> or an <a class="reference internal" href="#i-invoke"><em>invoke</em></a> instruction.
+Thus, typically we have:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">call</span> <span class="k">i32</span> <span class="k">asm</span> <span class="s">"bswap $0"</span><span class="p">,</span> <span class="s">"=r,r"</span><span class="p">(</span><span class="k">i32</span> <span class="nv">%Y</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Inline asms with side effects not visible in the constraint list must be
+marked as having side effects. This is done through the use of the
+‘<tt class="docutils literal"><span class="pre">sideeffect</span></tt>‘ keyword, like so:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">call</span> <span class="kt">void</span> <span class="k">asm</span> <span class="k">sideeffect</span> <span class="s">"eieio"</span><span class="p">,</span> <span class="s">""</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>In some cases inline asms will contain code that will not work unless
+the stack is aligned in some way, such as calls or SSE instructions on
+x86, yet will not contain code that does that alignment within the asm.
+The compiler should make conservative assumptions about what the asm
+might contain and should generate its usual stack alignment code in the
+prologue if the ‘<tt class="docutils literal"><span class="pre">alignstack</span></tt>‘ keyword is present:</p>
+<div class="highlight-llvm"><pre>call void asm alignstack "eieio", ""()</pre>
+</div>
+<p>Inline asms also support using non-standard assembly dialects. The
+assumed dialect is ATT. When the ‘<tt class="docutils literal"><span class="pre">inteldialect</span></tt>‘ keyword is present,
+the inline asm is using the Intel dialect. Currently, ATT and Intel are
+the only supported dialects. An example is:</p>
+<div class="highlight-llvm"><pre>call void asm inteldialect "eieio", ""()</pre>
+</div>
+<p>If multiple keywords appear the ‘<tt class="docutils literal"><span class="pre">sideeffect</span></tt>‘ keyword must come
+first, the ‘<tt class="docutils literal"><span class="pre">alignstack</span></tt>‘ keyword second and the ‘<tt class="docutils literal"><span class="pre">inteldialect</span></tt>‘
+keyword last.</p>
+<div class="section" id="inline-asm-metadata">
+<h4><a class="toc-backref" href="#id625">Inline Asm Metadata</a><a class="headerlink" href="#inline-asm-metadata" title="Permalink to this headline">¶</a></h4>
+<p>The call instructions that wrap inline asm nodes may have a
+“<tt class="docutils literal"><span class="pre">!srcloc</span></tt>” MDNode attached to it that contains a list of constant
+integers. If present, the code generator will use the integer as the
+location cookie value when report errors through the <tt class="docutils literal"><span class="pre">LLVMContext</span></tt>
+error reporting mechanisms. This allows a front-end to correlate backend
+errors that occur with inline asm back to the source code that produced
+it. For example:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">call</span> <span class="kt">void</span> <span class="k">asm</span> <span class="k">sideeffect</span> <span class="s">"something bad"</span><span class="p">,</span> <span class="s">""</span><span class="p">(),</span> <span class="nv">!srcloc</span> <span class="nv-Anonymous">!42</span>
+<span class="p">...</span>
+<span class="nv-Anonymous">!42</span> <span class="p">=</span> <span class="p">!{</span> <span class="k">i32</span> <span class="m">1234567</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>It is up to the front-end to make sense of the magic numbers it places
+in the IR. If the MDNode contains multiple constants, the code generator
+will use the one that corresponds to the line of the asm that the error
+occurs on.</p>
+</div>
+</div>
+<div class="section" id="metadata-nodes-and-metadata-strings">
+<span id="metadata"></span><h3><a class="toc-backref" href="#id626">Metadata Nodes and Metadata Strings</a><a class="headerlink" href="#metadata-nodes-and-metadata-strings" title="Permalink to this headline">¶</a></h3>
+<p>LLVM IR allows metadata to be attached to instructions in the program
+that can convey extra information about the code to the optimizers and
+code generator. One example application of metadata is source-level
+debug information. There are two metadata primitives: strings and nodes.
+All metadata has the <tt class="docutils literal"><span class="pre">metadata</span></tt> type and is identified in syntax by a
+preceding exclamation point (‘<tt class="docutils literal"><span class="pre">!</span></tt>‘).</p>
+<p>A metadata string is a string surrounded by double quotes. It can
+contain any character by escaping non-printable characters with
+“<tt class="docutils literal"><span class="pre">\xx</span></tt>” where “<tt class="docutils literal"><span class="pre">xx</span></tt>” is the two digit hex code. For example:
+“<tt class="docutils literal"><span class="pre">!"test\00"</span></tt>”.</p>
+<p>Metadata nodes are represented with notation similar to structure
+constants (a comma separated list of elements, surrounded by braces and
+preceded by an exclamation point). Metadata nodes can have any values as
+their operand. For example:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="p">!{</span> <span class="kt">metadata</span> <span class="nv">!"test\00"</span><span class="p">,</span> <span class="k">i32</span> <span class="m">10</span><span class="p">}</span>
+</pre></div>
+</div>
+<p>A <a class="reference internal" href="#namedmetadatastructure"><em>named metadata</em></a> is a collection of
+metadata nodes, which can be looked up in the module symbol table. For
+example:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">!foo</span> <span class="p">=</span>  <span class="kt">metadata</span> <span class="p">!{</span><span class="nv-Anonymous">!4</span><span class="p">,</span> <span class="nv-Anonymous">!3</span><span class="p">}</span>
+</pre></div>
+</div>
+<p>Metadata can be used as function arguments. Here <tt class="docutils literal"><span class="pre">llvm.dbg.value</span></tt>
+function is using two metadata arguments:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">call</span> <span class="kt">void</span> <span class="vg">@llvm.dbg.value</span><span class="p">(</span><span class="kt">metadata</span> <span class="nv-Anonymous">!24</span><span class="p">,</span> <span class="k">i64</span> <span class="m">0</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!25</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Metadata can be attached with an instruction. Here metadata <tt class="docutils literal"><span class="pre">!21</span></tt> is
+attached to the <tt class="docutils literal"><span class="pre">add</span></tt> instruction using the <tt class="docutils literal"><span class="pre">!dbg</span></tt> identifier:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%indvar.next</span> <span class="p">=</span> <span class="k">add</span> <span class="k">i64</span> <span class="nv">%indvar</span><span class="p">,</span> <span class="m">1</span><span class="p">,</span> <span class="nv">!dbg</span> <span class="nv-Anonymous">!21</span>
+</pre></div>
+</div>
+<p>More information about specific metadata nodes recognized by the
+optimizers and code generator is found below.</p>
+<div class="section" id="tbaa-metadata">
+<h4><a class="toc-backref" href="#id627">‘<tt class="docutils literal"><span class="pre">tbaa</span></tt>‘ Metadata</a><a class="headerlink" href="#tbaa-metadata" title="Permalink to this headline">¶</a></h4>
+<p>In LLVM IR, memory does not have types, so LLVM’s own type system is not
+suitable for doing TBAA. Instead, metadata is added to the IR to
+describe a type system of a higher level language. This can be used to
+implement typical C/C++ TBAA, but it can also be used to implement
+custom alias analysis behavior for other languages.</p>
+<p>The current metadata format is very simple. TBAA metadata nodes have up
+to three fields, e.g.:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv">!"an example type tree"</span> <span class="p">}</span>
+<span class="nv-Anonymous">!1</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv">!"int"</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!0</span> <span class="p">}</span>
+<span class="nv-Anonymous">!2</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv">!"float"</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!0</span> <span class="p">}</span>
+<span class="nv-Anonymous">!3</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv">!"const float"</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!2</span><span class="p">,</span> <span class="k">i64</span> <span class="m">1</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>The first field is an identity field. It can be any value, usually a
+metadata string, which uniquely identifies the type. The most important
+name in the tree is the name of the root node. Two trees with different
+root node names are entirely disjoint, even if they have leaves with
+common names.</p>
+<p>The second field identifies the type’s parent node in the tree, or is
+null or omitted for a root node. A type is considered to alias all of
+its descendants and all of its ancestors in the tree. Also, a type is
+considered to alias all types in other trees, so that bitcode produced
+from multiple front-ends is handled conservatively.</p>
+<p>If the third field is present, it’s an integer which if equal to 1
+indicates that the type is “constant” (meaning
+<tt class="docutils literal"><span class="pre">pointsToConstantMemory</span></tt> should return true; see <a class="reference external" href="AliasAnalysis.html#OtherItfs">other useful
+AliasAnalysis methods</a>).</p>
+</div>
+<div class="section" id="tbaa-struct-metadata">
+<h4><a class="toc-backref" href="#id628">‘<tt class="docutils literal"><span class="pre">tbaa.struct</span></tt>‘ Metadata</a><a class="headerlink" href="#tbaa-struct-metadata" title="Permalink to this headline">¶</a></h4>
+<p>The <a class="reference internal" href="#int-memcpy"><em>llvm.memcpy</em></a> is often used to implement
+aggregate assignment operations in C and similar languages, however it
+is defined to copy a contiguous region of memory, which is more than
+strictly necessary for aggregate types which contain holes due to
+padding. Also, it doesn’t contain any TBAA information about the fields
+of the aggregate.</p>
+<p><tt class="docutils literal"><span class="pre">!tbaa.struct</span></tt> metadata can describe which memory subregions in a
+memcpy are padding and what the TBAA tags of the struct are.</p>
+<p>The current metadata format is very simple. <tt class="docutils literal"><span class="pre">!tbaa.struct</span></tt> metadata
+nodes are a list of operands which are in conceptual groups of three.
+For each group of three, the first operand gives the byte offset of a
+field in bytes, the second gives its size in bytes, and the third gives
+its tbaa tag. e.g.:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">!4</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="k">i64</span> <span class="m">0</span><span class="p">,</span> <span class="k">i64</span> <span class="m">4</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!1</span><span class="p">,</span> <span class="k">i64</span> <span class="m">8</span><span class="p">,</span> <span class="k">i64</span> <span class="m">4</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!2</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>This describes a struct with two fields. The first is at offset 0 bytes
+with size 4 bytes, and has tbaa tag !1. The second is at offset 8 bytes
+and has size 4 bytes and has tbaa tag !2.</p>
+<p>Note that the fields need not be contiguous. In this example, there is a
+4 byte gap between the two fields. This gap represents padding which
+does not carry useful data and need not be preserved.</p>
+</div>
+<div class="section" id="fpmath-metadata">
+<h4><a class="toc-backref" href="#id629">‘<tt class="docutils literal"><span class="pre">fpmath</span></tt>‘ Metadata</a><a class="headerlink" href="#fpmath-metadata" title="Permalink to this headline">¶</a></h4>
+<p><tt class="docutils literal"><span class="pre">fpmath</span></tt> metadata may be attached to any instruction of floating point
+type. It can be used to express the maximum acceptable error in the
+result of that instruction, in ULPs, thus potentially allowing the
+compiler to use a more efficient but less accurate method of computing
+it. ULP is defined as follows:</p>
+<blockquote>
+<div>If <tt class="docutils literal"><span class="pre">x</span></tt> is a real number that lies between two finite consecutive
+floating-point numbers <tt class="docutils literal"><span class="pre">a</span></tt> and <tt class="docutils literal"><span class="pre">b</span></tt>, without being equal to one
+of them, then <tt class="docutils literal"><span class="pre">ulp(x)</span> <span class="pre">=</span> <span class="pre">|b</span> <span class="pre">-</span> <span class="pre">a|</span></tt>, otherwise <tt class="docutils literal"><span class="pre">ulp(x)</span></tt> is the
+distance between the two non-equal finite floating-point numbers
+nearest <tt class="docutils literal"><span class="pre">x</span></tt>. Moreover, <tt class="docutils literal"><span class="pre">ulp(NaN)</span></tt> is <tt class="docutils literal"><span class="pre">NaN</span></tt>.</div></blockquote>
+<p>The metadata node shall consist of a single positive floating point
+number representing the maximum relative error, for example:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">float</span> <span class="m">2.5</span> <span class="p">}</span> <span class="c">; maximum acceptable inaccuracy is 2.5 ULPs</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="range-metadata">
+<h4><a class="toc-backref" href="#id630">‘<tt class="docutils literal"><span class="pre">range</span></tt>‘ Metadata</a><a class="headerlink" href="#range-metadata" title="Permalink to this headline">¶</a></h4>
+<p><tt class="docutils literal"><span class="pre">range</span></tt> metadata may be attached only to loads of integer types. It
+expresses the possible ranges the loaded value is in. The ranges are
+represented with a flattened list of integers. The loaded value is known
+to be in the union of the ranges defined by each consecutive pair. Each
+pair has the following properties:</p>
+<ul class="simple">
+<li>The type must match the type loaded by the instruction.</li>
+<li>The pair <tt class="docutils literal"><span class="pre">a,b</span></tt> represents the range <tt class="docutils literal"><span class="pre">[a,b)</span></tt>.</li>
+<li>Both <tt class="docutils literal"><span class="pre">a</span></tt> and <tt class="docutils literal"><span class="pre">b</span></tt> are constants.</li>
+<li>The range is allowed to wrap.</li>
+<li>The range should not represent the full or empty set. That is,
+<tt class="docutils literal"><span class="pre">a!=b</span></tt>.</li>
+</ul>
+<p>In addition, the pairs must be in signed order of the lower bound and
+they must be non-contiguous.</p>
+<p>Examples:</p>
+<div class="highlight-llvm"><div class="highlight"><pre>  <span class="nv">%a</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i8</span><span class="p">*</span> <span class="nv">%x</span><span class="p">,</span> <span class="k">align</span> <span class="m">1</span><span class="p">,</span> <span class="nv">!range</span> <span class="nv-Anonymous">!0</span> <span class="c">; Can only be 0 or 1</span>
+  <span class="nv">%b</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i8</span><span class="p">*</span> <span class="nv">%y</span><span class="p">,</span> <span class="k">align</span> <span class="m">1</span><span class="p">,</span> <span class="nv">!range</span> <span class="nv-Anonymous">!1</span> <span class="c">; Can only be 255 (-1), 0 or 1</span>
+  <span class="nv">%c</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i8</span><span class="p">*</span> <span class="nv">%z</span><span class="p">,</span> <span class="k">align</span> <span class="m">1</span><span class="p">,</span> <span class="nv">!range</span> <span class="nv-Anonymous">!2</span> <span class="c">; Can only be 0, 1, 3, 4 or 5</span>
+  <span class="nv">%d</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i8</span><span class="p">*</span> <span class="nv">%z</span><span class="p">,</span> <span class="k">align</span> <span class="m">1</span><span class="p">,</span> <span class="nv">!range</span> <span class="nv-Anonymous">!3</span> <span class="c">; Can only be -2, -1, 3, 4 or 5</span>
+<span class="p">...</span>
+<span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="k">i8</span> <span class="m">0</span><span class="p">,</span> <span class="k">i8</span> <span class="m">2</span> <span class="p">}</span>
+<span class="nv-Anonymous">!1</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="k">i8</span> <span class="m">255</span><span class="p">,</span> <span class="k">i8</span> <span class="m">2</span> <span class="p">}</span>
+<span class="nv-Anonymous">!2</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="k">i8</span> <span class="m">0</span><span class="p">,</span> <span class="k">i8</span> <span class="m">2</span><span class="p">,</span> <span class="k">i8</span> <span class="m">3</span><span class="p">,</span> <span class="k">i8</span> <span class="m">6</span> <span class="p">}</span>
+<span class="nv-Anonymous">!3</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="k">i8</span> <span class="m">-2</span><span class="p">,</span> <span class="k">i8</span> <span class="m">0</span><span class="p">,</span> <span class="k">i8</span> <span class="m">3</span><span class="p">,</span> <span class="k">i8</span> <span class="m">6</span> <span class="p">}</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="llvm-loop">
+<h4><a class="toc-backref" href="#id631">‘<tt class="docutils literal"><span class="pre">llvm.loop</span></tt>‘</a><a class="headerlink" href="#llvm-loop" title="Permalink to this headline">¶</a></h4>
+<p>It is sometimes useful to attach information to loop constructs. Currently,
+loop metadata is implemented as metadata attached to the branch instruction
+in the loop latch block. This type of metadata refer to a metadata node that is
+guaranteed to be separate for each loop. The loop identifier metadata is
+specified with the name <tt class="docutils literal"><span class="pre">llvm.loop</span></tt>.</p>
+<p>The loop identifier metadata is implemented using a metadata that refers to
+itself to avoid merging it with any other identifier metadata, e.g.,
+during module linkage or function inlining. That is, each loop should refer
+to their own identification metadata even if they reside in separate functions.
+The following example contains loop identifier metadata for two separate loop
+constructs:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!0</span> <span class="p">}</span>
+<span class="nv-Anonymous">!1</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!1</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>The loop identifier metadata can be used to specify additional per-loop
+metadata. Any operands after the first operand can be treated as user-defined
+metadata. For example the <tt class="docutils literal"><span class="pre">llvm.vectorizer.unroll</span></tt> metadata is understood
+by the loop vectorizer to indicate how many times to unroll the loop:</p>
+<div class="highlight-llvm"><div class="highlight"><pre>  <span class="k">br</span> <span class="k">i1</span> <span class="nv">%exitcond</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%._crit_edge</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%.lr.ph</span><span class="p">,</span> <span class="nv">!llvm.loop</span> <span class="nv-Anonymous">!0</span>
+<span class="p">...</span>
+<span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!0</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!1</span> <span class="p">}</span>
+<span class="nv-Anonymous">!1</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv">!"llvm.vectorizer.unroll"</span><span class="p">,</span> <span class="k">i32</span> <span class="m">2</span> <span class="p">}</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="llvm-mem">
+<h4><a class="toc-backref" href="#id632">‘<tt class="docutils literal"><span class="pre">llvm.mem</span></tt>‘</a><a class="headerlink" href="#llvm-mem" title="Permalink to this headline">¶</a></h4>
+<p>Metadata types used to annotate memory accesses with information helpful
+for optimizations are prefixed with <tt class="docutils literal"><span class="pre">llvm.mem</span></tt>.</p>
+</div>
+<div class="section" id="llvm-mem-parallel-loop-access-metadata">
+<h4><a class="toc-backref" href="#id633">‘<tt class="docutils literal"><span class="pre">llvm.mem.parallel_loop_access</span></tt>‘ Metadata</a><a class="headerlink" href="#llvm-mem-parallel-loop-access-metadata" title="Permalink to this headline">¶</a></h4>
+<p>For a loop to be parallel, in addition to using
+the <tt class="docutils literal"><span class="pre">llvm.loop</span></tt> metadata to mark the loop latch branch instruction,
+also all of the memory accessing instructions in the loop body need to be
+marked with the <tt class="docutils literal"><span class="pre">llvm.mem.parallel_loop_access</span></tt> metadata. If there
+is at least one memory accessing instruction not marked with the metadata,
+the loop must be considered a sequential loop. This causes parallel loops to be
+converted to sequential loops due to optimization passes that are unaware of
+the parallel semantics and that insert new memory instructions to the loop
+body.</p>
+<p>Example of a loop that is considered parallel due to its correct use of
+both <tt class="docutils literal"><span class="pre">llvm.loop</span></tt> and <tt class="docutils literal"><span class="pre">llvm.mem.parallel_loop_access</span></tt>
+metadata types that refer to the same loop identifier metadata.</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nl">for.body:</span>
+  <span class="p">...</span>
+  <span class="nv-Anonymous">%0</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%arrayidx</span><span class="p">,</span> <span class="k">align</span> <span class="m">4</span><span class="p">,</span> <span class="nv">!llvm.mem.parallel_loop_access</span> <span class="nv-Anonymous">!0</span>
+  <span class="p">...</span>
+  <span class="k">store</span> <span class="k">i32</span> <span class="nv-Anonymous">%0</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%arrayidx4</span><span class="p">,</span> <span class="k">align</span> <span class="m">4</span><span class="p">,</span> <span class="nv">!llvm.mem.parallel_loop_access</span> <span class="nv-Anonymous">!0</span>
+  <span class="p">...</span>
+  <span class="k">br</span> <span class="k">i1</span> <span class="nv">%exitcond</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%for.end</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%for.body</span><span class="p">,</span> <span class="nv">!llvm.loop</span> <span class="nv-Anonymous">!0</span>
+
+<span class="nl">for.end:</span>
+<span class="p">...</span>
+<span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!0</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>It is also possible to have nested parallel loops. In that case the
+memory accesses refer to a list of loop identifier metadata nodes instead of
+the loop identifier metadata node directly:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nl">outer.for.body:</span>
+<span class="p">...</span>
+
+<span class="nl">inner.for.body:</span>
+  <span class="p">...</span>
+  <span class="nv-Anonymous">%0</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%arrayidx</span><span class="p">,</span> <span class="k">align</span> <span class="m">4</span><span class="p">,</span> <span class="nv">!llvm.mem.parallel_loop_access</span> <span class="nv-Anonymous">!0</span>
+  <span class="p">...</span>
+  <span class="k">store</span> <span class="k">i32</span> <span class="nv-Anonymous">%0</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%arrayidx4</span><span class="p">,</span> <span class="k">align</span> <span class="m">4</span><span class="p">,</span> <span class="nv">!llvm.mem.parallel_loop_access</span> <span class="nv-Anonymous">!0</span>
+  <span class="p">...</span>
+  <span class="k">br</span> <span class="k">i1</span> <span class="nv">%exitcond</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%inner.for.end</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%inner.for.body</span><span class="p">,</span> <span class="nv">!llvm.loop</span> <span class="nv-Anonymous">!1</span>
+
+<span class="nl">inner.for.end:</span>
+  <span class="p">...</span>
+  <span class="nv-Anonymous">%0</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%arrayidx</span><span class="p">,</span> <span class="k">align</span> <span class="m">4</span><span class="p">,</span> <span class="nv">!llvm.mem.parallel_loop_access</span> <span class="nv-Anonymous">!0</span>
+  <span class="p">...</span>
+  <span class="k">store</span> <span class="k">i32</span> <span class="nv-Anonymous">%0</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%arrayidx4</span><span class="p">,</span> <span class="k">align</span> <span class="m">4</span><span class="p">,</span> <span class="nv">!llvm.mem.parallel_loop_access</span> <span class="nv-Anonymous">!0</span>
+  <span class="p">...</span>
+  <span class="k">br</span> <span class="k">i1</span> <span class="nv">%exitcond</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%outer.for.end</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%outer.for.body</span><span class="p">,</span> <span class="nv">!llvm.loop</span> <span class="nv-Anonymous">!2</span>
+
+<span class="nl">outer.for.end:</span>                                          <span class="c">; preds = %for.body</span>
+<span class="p">...</span>
+<span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!1</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!2</span> <span class="p">}</span> <span class="c">; a list of loop identifiers</span>
+<span class="nv-Anonymous">!1</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!1</span> <span class="p">}</span> <span class="c">; an identifier for the inner loop</span>
+<span class="nv-Anonymous">!2</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv-Anonymous">!2</span> <span class="p">}</span> <span class="c">; an identifier for the outer loop</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="llvm-vectorizer">
+<h4><a class="toc-backref" href="#id634">‘<tt class="docutils literal"><span class="pre">llvm.vectorizer</span></tt>‘</a><a class="headerlink" href="#llvm-vectorizer" title="Permalink to this headline">¶</a></h4>
+<p>Metadata prefixed with <tt class="docutils literal"><span class="pre">llvm.vectorizer</span></tt> is used to control per-loop
+vectorization parameters such as vectorization factor and unroll factor.</p>
+<p><tt class="docutils literal"><span class="pre">llvm.vectorizer</span></tt> metadata should be used in conjunction with <tt class="docutils literal"><span class="pre">llvm.loop</span></tt>
+loop identification metadata.</p>
+</div>
+<div class="section" id="llvm-vectorizer-unroll-metadata">
+<h4><a class="toc-backref" href="#id635">‘<tt class="docutils literal"><span class="pre">llvm.vectorizer.unroll</span></tt>‘ Metadata</a><a class="headerlink" href="#llvm-vectorizer-unroll-metadata" title="Permalink to this headline">¶</a></h4>
+<p>This metadata instructs the loop vectorizer to unroll the specified
+loop exactly <tt class="docutils literal"><span class="pre">N</span></tt> times.</p>
+<p>The first operand is the string <tt class="docutils literal"><span class="pre">llvm.vectorizer.unroll</span></tt> and the second
+operand is an integer specifying the unroll factor. For example:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv">!"llvm.vectorizer.unroll"</span><span class="p">,</span> <span class="k">i32</span> <span class="m">4</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>Note that setting <tt class="docutils literal"><span class="pre">llvm.vectorizer.unroll</span></tt> to 1 disables unrolling of the
+loop.</p>
+<p>If <tt class="docutils literal"><span class="pre">llvm.vectorizer.unroll</span></tt> is set to 0 then the amount of unrolling will be
+determined automatically.</p>
+</div>
+<div class="section" id="llvm-vectorizer-width-metadata">
+<h4><a class="toc-backref" href="#id636">‘<tt class="docutils literal"><span class="pre">llvm.vectorizer.width</span></tt>‘ Metadata</a><a class="headerlink" href="#llvm-vectorizer-width-metadata" title="Permalink to this headline">¶</a></h4>
+<p>This metadata sets the target width of the vectorizer to <tt class="docutils literal"><span class="pre">N</span></tt>. Without
+this metadata, the vectorizer will choose a width automatically.
+Regardless of this metadata, the vectorizer will only vectorize loops if
+it believes it is valid to do so.</p>
+<p>The first operand is the string <tt class="docutils literal"><span class="pre">llvm.vectorizer.width</span></tt> and the second
+operand is an integer specifying the width. For example:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="kt">metadata</span> <span class="nv">!"llvm.vectorizer.width"</span><span class="p">,</span> <span class="k">i32</span> <span class="m">4</span> <span class="p">}</span>
+</pre></div>
+</div>
+<p>Note that setting <tt class="docutils literal"><span class="pre">llvm.vectorizer.width</span></tt> to 1 disables vectorization of the
+loop.</p>
+<p>If <tt class="docutils literal"><span class="pre">llvm.vectorizer.width</span></tt> is set to 0 then the width will be determined
+automatically.</p>
+</div>
+</div>
+</div>
+<div class="section" id="module-flags-metadata">
+<h2><a class="toc-backref" href="#id637">Module Flags Metadata</a><a class="headerlink" href="#module-flags-metadata" title="Permalink to this headline">¶</a></h2>
+<p>Information about the module as a whole is difficult to convey to LLVM’s
+subsystems. The LLVM IR isn’t sufficient to transmit this information.
+The <tt class="docutils literal"><span class="pre">llvm.module.flags</span></tt> named metadata exists in order to facilitate
+this. These flags are in the form of key / value pairs — much like a
+dictionary — making it easy for any subsystem who cares about a flag to
+look it up.</p>
+<p>The <tt class="docutils literal"><span class="pre">llvm.module.flags</span></tt> metadata contains a list of metadata triplets.
+Each triplet has the following form:</p>
+<ul class="simple">
+<li>The first element is a <em>behavior</em> flag, which specifies the behavior
+when two (or more) modules are merged together, and it encounters two
+(or more) metadata with the same ID. The supported behaviors are
+described below.</li>
+<li>The second element is a metadata string that is a unique ID for the
+metadata. Each module may only have one flag entry for each unique ID (not
+including entries with the <strong>Require</strong> behavior).</li>
+<li>The third element is the value of the flag.</li>
+</ul>
+<p>When two (or more) modules are merged together, the resulting
+<tt class="docutils literal"><span class="pre">llvm.module.flags</span></tt> metadata is the union of the modules’ flags. That is, for
+each unique metadata ID string, there will be exactly one entry in the merged
+modules <tt class="docutils literal"><span class="pre">llvm.module.flags</span></tt> metadata table, and the value for that entry will
+be determined by the merge behavior flag, as described below. The only exception
+is that entries with the <em>Require</em> behavior are always preserved.</p>
+<p>The following behaviors are supported:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="10%" />
+<col width="90%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Value</th>
+<th class="head">Behavior</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td>1</td>
+<td><dl class="first last docutils">
+<dt><strong>Error</strong></dt>
+<dd>Emits an error if two values disagree, otherwise the resulting value
+is that of the operands.</dd>
+</dl>
+</td>
+</tr>
+<tr class="row-odd"><td>2</td>
+<td><dl class="first last docutils">
+<dt><strong>Warning</strong></dt>
+<dd>Emits a warning if two values disagree. The result value will be the
+operand for the flag from the first module being linked.</dd>
+</dl>
+</td>
+</tr>
+<tr class="row-even"><td>3</td>
+<td><dl class="first last docutils">
+<dt><strong>Require</strong></dt>
+<dd>Adds a requirement that another module flag be present and have a
+specified value after linking is performed. The value must be a
+metadata pair, where the first element of the pair is the ID of the
+module flag to be restricted, and the second element of the pair is
+the value the module flag should be restricted to. This behavior can
+be used to restrict the allowable results (via triggering of an
+error) of linking IDs with the <strong>Override</strong> behavior.</dd>
+</dl>
+</td>
+</tr>
+<tr class="row-odd"><td>4</td>
+<td><dl class="first last docutils">
+<dt><strong>Override</strong></dt>
+<dd>Uses the specified value, regardless of the behavior or value of the
+other module. If both modules specify <strong>Override</strong>, but the values
+differ, an error will be emitted.</dd>
+</dl>
+</td>
+</tr>
+<tr class="row-even"><td>5</td>
+<td><dl class="first last docutils">
+<dt><strong>Append</strong></dt>
+<dd>Appends the two values, which are required to be metadata nodes.</dd>
+</dl>
+</td>
+</tr>
+<tr class="row-odd"><td>6</td>
+<td><dl class="first last docutils">
+<dt><strong>AppendUnique</strong></dt>
+<dd>Appends the two values, which are required to be metadata
+nodes. However, duplicate entries in the second list are dropped
+during the append operation.</dd>
+</dl>
+</td>
+</tr>
+</tbody>
+</table>
+<p>It is an error for a particular unique flag ID to have multiple behaviors,
+except in the case of <strong>Require</strong> (which adds restrictions on another metadata
+value) or <strong>Override</strong>.</p>
+<p>An example of module flags:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">!0</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="k">i32</span> <span class="m">1</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv">!"foo"</span><span class="p">,</span> <span class="k">i32</span> <span class="m">1</span> <span class="p">}</span>
+<span class="nv-Anonymous">!1</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="k">i32</span> <span class="m">4</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv">!"bar"</span><span class="p">,</span> <span class="k">i32</span> <span class="m">37</span> <span class="p">}</span>
+<span class="nv-Anonymous">!2</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="k">i32</span> <span class="m">2</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv">!"qux"</span><span class="p">,</span> <span class="k">i32</span> <span class="m">42</span> <span class="p">}</span>
+<span class="nv-Anonymous">!3</span> <span class="p">=</span> <span class="kt">metadata</span> <span class="p">!{</span> <span class="k">i32</span> <span class="m">3</span><span class="p">,</span> <span class="kt">metadata</span> <span class="nv">!"qux"</span><span class="p">,</span>
+  <span class="kt">metadata</span> <span class="p">!{</span>
+    <span class="kt">metadata</span> <span class="nv">!"foo"</span><span class="p">,</span> <span class="k">i32</span> <span class="m">1</span>
+  <span class="p">}</span>
+<span class="p">}</span>
+<span class="nv">!llvm.module.flags</span> <span class="p">=</span> <span class="p">!{</span> <span class="nv-Anonymous">!0</span><span class="p">,</span> <span class="nv-Anonymous">!1</span><span class="p">,</span> <span class="nv-Anonymous">!2</span><span class="p">,</span> <span class="nv-Anonymous">!3</span> <span class="p">}</span>
+</pre></div>
+</div>
+<ul>
+<li><p class="first">Metadata <tt class="docutils literal"><span class="pre">!0</span></tt> has the ID <tt class="docutils literal"><span class="pre">!"foo"</span></tt> and the value ‘1’. The behavior
+if two or more <tt class="docutils literal"><span class="pre">!"foo"</span></tt> flags are seen is to emit an error if their
+values are not equal.</p>
+</li>
+<li><p class="first">Metadata <tt class="docutils literal"><span class="pre">!1</span></tt> has the ID <tt class="docutils literal"><span class="pre">!"bar"</span></tt> and the value ‘37’. The
+behavior if two or more <tt class="docutils literal"><span class="pre">!"bar"</span></tt> flags are seen is to use the value
+‘37’.</p>
+</li>
+<li><p class="first">Metadata <tt class="docutils literal"><span class="pre">!2</span></tt> has the ID <tt class="docutils literal"><span class="pre">!"qux"</span></tt> and the value ‘42’. The
+behavior if two or more <tt class="docutils literal"><span class="pre">!"qux"</span></tt> flags are seen is to emit a
+warning if their values are not equal.</p>
+</li>
+<li><p class="first">Metadata <tt class="docutils literal"><span class="pre">!3</span></tt> has the ID <tt class="docutils literal"><span class="pre">!"qux"</span></tt> and the value:</p>
+<div class="highlight-python"><pre>metadata !{ metadata !"foo", i32 1 }</pre>
+</div>
+<p>The behavior is to emit an error if the <tt class="docutils literal"><span class="pre">llvm.module.flags</span></tt> does not
+contain a flag with the ID <tt class="docutils literal"><span class="pre">!"foo"</span></tt> that has the value ‘1’ after linking is
+performed.</p>
+</li>
+</ul>
+<div class="section" id="objective-c-garbage-collection-module-flags-metadata">
+<h3><a class="toc-backref" href="#id638">Objective-C Garbage Collection Module Flags Metadata</a><a class="headerlink" href="#objective-c-garbage-collection-module-flags-metadata" title="Permalink to this headline">¶</a></h3>
+<p>On the Mach-O platform, Objective-C stores metadata about garbage
+collection in a special section called “image info”. The metadata
+consists of a version number and a bitmask specifying what types of
+garbage collection are supported (if any) by the file. If two or more
+modules are linked together their garbage collection metadata needs to
+be merged rather than appended together.</p>
+<p>The Objective-C garbage collection module flags metadata consists of the
+following key-value pairs:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="30%" />
+<col width="70%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Key</th>
+<th class="head">Value</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">Version</span></tt></td>
+<td><strong>[Required]</strong> — The Objective-C ABI version. Valid values are 1 and 2.</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">Image</span> <span class="pre">Info</span> <span class="pre">Version</span></tt></td>
+<td><strong>[Required]</strong> — The version of the image info section. Currently
+always 0.</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">Image</span> <span class="pre">Info</span> <span class="pre">Section</span></tt></td>
+<td><strong>[Required]</strong> — The section to place the metadata. Valid values are
+<tt class="docutils literal"><span class="pre">"__OBJC,</span> <span class="pre">__image_info,</span> <span class="pre">regular"</span></tt> for Objective-C ABI version 1, and
+<tt class="docutils literal"><span class="pre">"__DATA,__objc_imageinfo,</span> <span class="pre">regular,</span> <span class="pre">no_dead_strip"</span></tt> for
+Objective-C ABI version 2.</td>
+</tr>
+<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">Garbage</span> <span class="pre">Collection</span></tt></td>
+<td><strong>[Required]</strong> — Specifies whether garbage collection is supported or
+not. Valid values are 0, for no garbage collection, and 2, for garbage
+collection supported.</td>
+</tr>
+<tr class="row-even"><td><tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">GC</span> <span class="pre">Only</span></tt></td>
+<td><strong>[Optional]</strong> — Specifies that only garbage collection is supported.
+If present, its value must be 6. This flag requires that the
+<tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">Garbage</span> <span class="pre">Collection</span></tt> flag have the value 2.</td>
+</tr>
+</tbody>
+</table>
+<p>Some important flag interactions:</p>
+<ul class="simple">
+<li>If a module with <tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">Garbage</span> <span class="pre">Collection</span></tt> set to 0 is
+merged with a module with <tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">Garbage</span> <span class="pre">Collection</span></tt> set to
+2, then the resulting module has the
+<tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">Garbage</span> <span class="pre">Collection</span></tt> flag set to 0.</li>
+<li>A module with <tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">Garbage</span> <span class="pre">Collection</span></tt> set to 0 cannot be
+merged with a module with <tt class="docutils literal"><span class="pre">Objective-C</span> <span class="pre">GC</span> <span class="pre">Only</span></tt> set to 6.</li>
+</ul>
+</div>
+<div class="section" id="automatic-linker-flags-module-flags-metadata">
+<h3><a class="toc-backref" href="#id639">Automatic Linker Flags Module Flags Metadata</a><a class="headerlink" href="#automatic-linker-flags-module-flags-metadata" title="Permalink to this headline">¶</a></h3>
+<p>Some targets support embedding flags to the linker inside individual object
+files. Typically this is used in conjunction with language extensions which
+allow source files to explicitly declare the libraries they depend on, and have
+these automatically be transmitted to the linker via object files.</p>
+<p>These flags are encoded in the IR using metadata in the module flags section,
+using the <tt class="docutils literal"><span class="pre">Linker</span> <span class="pre">Options</span></tt> key. The merge behavior for this flag is required
+to be <tt class="docutils literal"><span class="pre">AppendUnique</span></tt>, and the value for the key is expected to be a metadata
+node which should be a list of other metadata nodes, each of which should be a
+list of metadata strings defining linker options.</p>
+<p>For example, the following metadata section specifies two separate sets of
+linker options, presumably to link against <tt class="docutils literal"><span class="pre">libz</span></tt> and the <tt class="docutils literal"><span class="pre">Cocoa</span></tt>
+framework:</p>
+<div class="highlight-python"><pre>!0 = metadata !{ i32 6, metadata !"Linker Options",
+   metadata !{
+      metadata !{ metadata !"-lz" },
+      metadata !{ metadata !"-framework", metadata !"Cocoa" } } }
+!llvm.module.flags = !{ !0 }</pre>
+</div>
+<p>The metadata encoding as lists of lists of options, as opposed to a collapsed
+list of options, is chosen so that the IR encoding can use multiple option
+strings to specify e.g., a single library, while still having that specifier be
+preserved as an atomic element that can be recognized by a target specific
+assembly writer or object file emitter.</p>
+<p>Each individual option is required to be either a valid option for the target’s
+linker, or an option that is reserved by the target specific assembly writer or
+object file emitter. No other aspect of these options is defined by the IR.</p>
+</div>
+</div>
+<div class="section" id="intrinsic-global-variables">
+<span id="intrinsicglobalvariables"></span><h2><a class="toc-backref" href="#id640">Intrinsic Global Variables</a><a class="headerlink" href="#intrinsic-global-variables" title="Permalink to this headline">¶</a></h2>
+<p>LLVM has a number of “magic” global variables that contain data that
+affect code generation or other IR semantics. These are documented here.
+All globals of this sort should have a section specified as
+“<tt class="docutils literal"><span class="pre">llvm.metadata</span></tt>”. This section and all globals that start with
+“<tt class="docutils literal"><span class="pre">llvm.</span></tt>” are reserved for use by LLVM.</p>
+<div class="section" id="the-llvm-used-global-variable">
+<span id="gv-llvmused"></span><h3><a class="toc-backref" href="#id641">The ‘<tt class="docutils literal"><span class="pre">llvm.used</span></tt>‘ Global Variable</a><a class="headerlink" href="#the-llvm-used-global-variable" title="Permalink to this headline">¶</a></h3>
+<p>The <tt class="docutils literal"><span class="pre">@llvm.used</span></tt> global is an array which has
+<a class="reference internal" href="#linkage-appending"><em>appending linkage</em></a>. This array contains a list of
+pointers to named global variables, functions and aliases which may optionally
+have a pointer cast formed of bitcast or getelementptr. For example, a legal
+use of it is:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="vg">@X</span> <span class="p">=</span> <span class="k">global</span> <span class="k">i8</span> <span class="m">4</span>
+<span class="vg">@Y</span> <span class="p">=</span> <span class="k">global</span> <span class="k">i32</span> <span class="m">123</span>
+
+<span class="vg">@llvm.used</span> <span class="p">=</span> <span class="k">appending</span> <span class="k">global</span> <span class="p">[</span><span class="m">2</span> <span class="k">x</span> <span class="k">i8</span><span class="p">*]</span> <span class="p">[</span>
+   <span class="k">i8</span><span class="p">*</span> <span class="vg">@X</span><span class="p">,</span>
+   <span class="k">i8</span><span class="p">*</span> <span class="k">bitcast</span> <span class="p">(</span><span class="k">i32</span><span class="p">*</span> <span class="vg">@Y</span> <span class="k">to</span> <span class="k">i8</span><span class="p">*)</span>
+<span class="p">],</span> <span class="k">section</span> <span class="s">"llvm.metadata"</span>
+</pre></div>
+</div>
+<p>If a symbol appears in the <tt class="docutils literal"><span class="pre">@llvm.used</span></tt> list, then the compiler, assembler,
+and linker are required to treat the symbol as if there is a reference to the
+symbol that it cannot see (which is why they have to be named). For example, if
+a variable has internal linkage and no references other than that from the
+<tt class="docutils literal"><span class="pre">@llvm.used</span></tt> list, it cannot be deleted. This is commonly used to represent
+references from inline asms and other things the compiler cannot “see”, and
+corresponds to “<tt class="docutils literal"><span class="pre">attribute((used))</span></tt>” in GNU C.</p>
+<p>On some targets, the code generator must emit a directive to the
+assembler or object file to prevent the assembler and linker from
+molesting the symbol.</p>
+</div>
+<div class="section" id="the-llvm-compiler-used-global-variable">
+<span id="gv-llvmcompilerused"></span><h3><a class="toc-backref" href="#id642">The ‘<tt class="docutils literal"><span class="pre">llvm.compiler.used</span></tt>‘ Global Variable</a><a class="headerlink" href="#the-llvm-compiler-used-global-variable" title="Permalink to this headline">¶</a></h3>
+<p>The <tt class="docutils literal"><span class="pre">@llvm.compiler.used</span></tt> directive is the same as the <tt class="docutils literal"><span class="pre">@llvm.used</span></tt>
+directive, except that it only prevents the compiler from touching the
+symbol. On targets that support it, this allows an intelligent linker to
+optimize references to the symbol without being impeded as it would be
+by <tt class="docutils literal"><span class="pre">@llvm.used</span></tt>.</p>
+<p>This is a rare construct that should only be used in rare circumstances,
+and should not be exposed to source languages.</p>
+</div>
+<div class="section" id="the-llvm-global-ctors-global-variable">
+<span id="gv-llvmglobalctors"></span><h3><a class="toc-backref" href="#id643">The ‘<tt class="docutils literal"><span class="pre">llvm.global_ctors</span></tt>‘ Global Variable</a><a class="headerlink" href="#the-llvm-global-ctors-global-variable" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">%0</span> <span class="p">=</span> <span class="k">type</span> <span class="p">{</span> <span class="k">i32</span><span class="p">,</span> <span class="kt">void</span> <span class="p">()*</span> <span class="p">}</span>
+<span class="vg">@llvm.global_ctors</span> <span class="p">=</span> <span class="k">appending</span> <span class="k">global</span> <span class="p">[</span><span class="m">1</span> <span class="k">x</span> <span class="nv-Anonymous">%0</span><span class="p">]</span> <span class="p">[</span><span class="nv-Anonymous">%0</span> <span class="p">{</span> <span class="k">i32</span> <span class="m">65535</span><span class="p">,</span> <span class="kt">void</span> <span class="p">()*</span> <span class="vg">@ctor</span> <span class="p">}]</span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">@llvm.global_ctors</span></tt> array contains a list of constructor
+functions and associated priorities. The functions referenced by this
+array will be called in ascending order of priority (i.e. lowest first)
+when the module is loaded. The order of functions with the same priority
+is not defined.</p>
+</div>
+<div class="section" id="the-llvm-global-dtors-global-variable">
+<span id="llvmglobaldtors"></span><h3><a class="toc-backref" href="#id644">The ‘<tt class="docutils literal"><span class="pre">llvm.global_dtors</span></tt>‘ Global Variable</a><a class="headerlink" href="#the-llvm-global-dtors-global-variable" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv-Anonymous">%0</span> <span class="p">=</span> <span class="k">type</span> <span class="p">{</span> <span class="k">i32</span><span class="p">,</span> <span class="kt">void</span> <span class="p">()*</span> <span class="p">}</span>
+<span class="vg">@llvm.global_dtors</span> <span class="p">=</span> <span class="k">appending</span> <span class="k">global</span> <span class="p">[</span><span class="m">1</span> <span class="k">x</span> <span class="nv-Anonymous">%0</span><span class="p">]</span> <span class="p">[</span><span class="nv-Anonymous">%0</span> <span class="p">{</span> <span class="k">i32</span> <span class="m">65535</span><span class="p">,</span> <span class="kt">void</span> <span class="p">()*</span> <span class="vg">@dtor</span> <span class="p">}]</span>
+</pre></div>
+</div>
+<p>The <tt class="docutils literal"><span class="pre">@llvm.global_dtors</span></tt> array contains a list of destructor functions
+and associated priorities. The functions referenced by this array will
+be called in descending order of priority (i.e. highest first) when the
+module is loaded. The order of functions with the same priority is not
+defined.</p>
+</div>
+</div>
+<div class="section" id="instruction-reference">
+<h2><a class="toc-backref" href="#id645">Instruction Reference</a><a class="headerlink" href="#instruction-reference" title="Permalink to this headline">¶</a></h2>
+<p>The LLVM instruction set consists of several different classifications
+of instructions: <a class="reference internal" href="#terminators"><em>terminator instructions</em></a>, <a class="reference internal" href="#binaryops"><em>binary
+instructions</em></a>, <a class="reference internal" href="#bitwiseops"><em>bitwise binary
+instructions</em></a>, <a class="reference internal" href="#memoryops"><em>memory instructions</em></a>, and
+<a class="reference internal" href="#otherops"><em>other instructions</em></a>.</p>
+<div class="section" id="terminator-instructions">
+<span id="terminators"></span><h3><a class="toc-backref" href="#id646">Terminator Instructions</a><a class="headerlink" href="#terminator-instructions" title="Permalink to this headline">¶</a></h3>
+<p>As mentioned <a class="reference internal" href="#functionstructure"><em>previously</em></a>, every basic block in a
+program ends with a “Terminator” instruction, which indicates which
+block should be executed after the current block is finished. These
+terminator instructions typically yield a ‘<tt class="docutils literal"><span class="pre">void</span></tt>‘ value: they produce
+control flow, not values (the one exception being the
+‘<a class="reference internal" href="#i-invoke"><em>invoke</em></a>‘ instruction).</p>
+<p>The terminator instructions are: ‘<a class="reference internal" href="#i-ret"><em>ret</em></a>‘,
+‘<a class="reference internal" href="#i-br"><em>br</em></a>‘, ‘<a class="reference internal" href="#i-switch"><em>switch</em></a>‘,
+‘<a class="reference internal" href="#i-indirectbr"><em>indirectbr</em></a>‘, ‘<a class="reference internal" href="#i-invoke"><em>invoke</em></a>‘,
+‘<a class="reference internal" href="#i-resume"><em>resume</em></a>‘, and ‘<a class="reference internal" href="#i-unreachable"><em>unreachable</em></a>‘.</p>
+<div class="section" id="ret-instruction">
+<span id="i-ret"></span><h4><a class="toc-backref" href="#id647">‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ Instruction</a><a class="headerlink" href="#ret-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id29">
+<h5>Syntax:<a class="headerlink" href="#id29" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>ret <type> <value>       ; Return a value from a non-void function
+ret void                 ; Return from void function</pre>
+</div>
+</div>
+<div class="section" id="id30">
+<h5>Overview:<a class="headerlink" href="#id30" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ instruction is used to return control flow (and optionally
+a value) from a function back to the caller.</p>
+<p>There are two forms of the ‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ instruction: one that returns a
+value and then causes control flow, and one that just causes control
+flow to occur.</p>
+</div>
+<div class="section" id="arguments">
+<h5>Arguments:<a class="headerlink" href="#arguments" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ instruction optionally accepts a single argument, the
+return value. The type of the return value must be a ‘<a class="reference internal" href="#t-firstclass"><em>first
+class</em></a>‘ type.</p>
+<p>A function is not <a class="reference internal" href="#wellformed"><em>well formed</em></a> if it it has a non-void
+return type and contains a ‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ instruction with no return value or
+a return value with a type that does not match its type, or if it has a
+void return type and contains a ‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ instruction with a return
+value.</p>
+</div>
+<div class="section" id="semantics">
+<h5>Semantics:<a class="headerlink" href="#semantics" title="Permalink to this headline">¶</a></h5>
+<p>When the ‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ instruction is executed, control flow returns back to
+the calling function’s context. If the caller is a
+“<a class="reference internal" href="#i-call"><em>call</em></a>” instruction, execution continues at the
+instruction after the call. If the caller was an
+“<a class="reference internal" href="#i-invoke"><em>invoke</em></a>” 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.</p>
+</div>
+<div class="section" id="example">
+<h5>Example:<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">ret</span> <span class="k">i32</span> <span class="m">5</span>                       <span class="c">; Return an integer value of 5</span>
+<span class="k">ret</span> <span class="kt">void</span>                        <span class="c">; Return from a void function</span>
+<span class="k">ret</span> <span class="p">{</span> <span class="k">i32</span><span class="p">,</span> <span class="k">i8</span> <span class="p">}</span> <span class="p">{</span> <span class="k">i32</span> <span class="m">4</span><span class="p">,</span> <span class="k">i8</span> <span class="m">2</span> <span class="p">}</span> <span class="c">; Return a struct of values 4 and 2</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="br-instruction">
+<span id="i-br"></span><h4><a class="toc-backref" href="#id648">‘<tt class="docutils literal"><span class="pre">br</span></tt>‘ Instruction</a><a class="headerlink" href="#br-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id31">
+<h5>Syntax:<a class="headerlink" href="#id31" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>br i1 <cond>, label <iftrue>, label <iffalse>
+br label <dest>          ; Unconditional branch</pre>
+</div>
+</div>
+<div class="section" id="id32">
+<h5>Overview:<a class="headerlink" href="#id32" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">br</span></tt>‘ instruction is used to cause control flow to transfer to a
+different basic block in the current function. There are two forms of
+this instruction, corresponding to a conditional branch and an
+unconditional branch.</p>
+</div>
+<div class="section" id="id33">
+<h5>Arguments:<a class="headerlink" href="#id33" title="Permalink to this headline">¶</a></h5>
+<p>The conditional branch form of the ‘<tt class="docutils literal"><span class="pre">br</span></tt>‘ instruction takes a single
+‘<tt class="docutils literal"><span class="pre">i1</span></tt>‘ value and two ‘<tt class="docutils literal"><span class="pre">label</span></tt>‘ values. The unconditional form of the
+‘<tt class="docutils literal"><span class="pre">br</span></tt>‘ instruction takes a single ‘<tt class="docutils literal"><span class="pre">label</span></tt>‘ value as a target.</p>
+</div>
+<div class="section" id="id34">
+<h5>Semantics:<a class="headerlink" href="#id34" title="Permalink to this headline">¶</a></h5>
+<p>Upon execution of a conditional ‘<tt class="docutils literal"><span class="pre">br</span></tt>‘ instruction, the ‘<tt class="docutils literal"><span class="pre">i1</span></tt>‘
+argument is evaluated. If the value is <tt class="docutils literal"><span class="pre">true</span></tt>, control flows to the
+‘<tt class="docutils literal"><span class="pre">iftrue</span></tt>‘ <tt class="docutils literal"><span class="pre">label</span></tt> argument. If “cond” is <tt class="docutils literal"><span class="pre">false</span></tt>, control flows
+to the ‘<tt class="docutils literal"><span class="pre">iffalse</span></tt>‘ <tt class="docutils literal"><span class="pre">label</span></tt> argument.</p>
+</div>
+<div class="section" id="id35">
+<h5>Example:<a class="headerlink" href="#id35" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nl">Test:</span>
+  <span class="nv">%cond</span> <span class="p">=</span> <span class="k">icmp</span> <span class="k">eq</span> <span class="k">i32</span> <span class="nv">%a</span><span class="p">,</span> <span class="nv">%b</span>
+  <span class="k">br</span> <span class="k">i1</span> <span class="nv">%cond</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%IfEqual</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%IfUnequal</span>
+<span class="nl">IfEqual:</span>
+  <span class="k">ret</span> <span class="k">i32</span> <span class="m">1</span>
+<span class="nl">IfUnequal:</span>
+  <span class="k">ret</span> <span class="k">i32</span> <span class="m">0</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="switch-instruction">
+<span id="i-switch"></span><h4><a class="toc-backref" href="#id649">‘<tt class="docutils literal"><span class="pre">switch</span></tt>‘ Instruction</a><a class="headerlink" href="#switch-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id36">
+<h5>Syntax:<a class="headerlink" href="#id36" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>switch <intty> <value>, label <defaultdest> [ <intty> <val>, label <dest> ... ]</pre>
+</div>
+</div>
+<div class="section" id="id37">
+<h5>Overview:<a class="headerlink" href="#id37" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">switch</span></tt>‘ instruction is used to transfer control flow to one of
+several different places. It is a generalization of the ‘<tt class="docutils literal"><span class="pre">br</span></tt>‘
+instruction, allowing a branch to occur to one of many possible
+destinations.</p>
+</div>
+<div class="section" id="id38">
+<h5>Arguments:<a class="headerlink" href="#id38" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">switch</span></tt>‘ instruction uses three parameters: an integer
+comparison value ‘<tt class="docutils literal"><span class="pre">value</span></tt>‘, a default ‘<tt class="docutils literal"><span class="pre">label</span></tt>‘ destination, and an
+array of pairs of comparison value constants and ‘<tt class="docutils literal"><span class="pre">label</span></tt>‘s. The table
+is not allowed to contain duplicate constant entries.</p>
+</div>
+<div class="section" id="id39">
+<h5>Semantics:<a class="headerlink" href="#id39" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">switch</span></tt> instruction specifies a table of values and destinations.
+When the ‘<tt class="docutils literal"><span class="pre">switch</span></tt>‘ instruction is executed, this table is searched
+for the given value. If the value is found, control flow is transferred
+to the corresponding destination; otherwise, control flow is transferred
+to the default destination.</p>
+</div>
+<div class="section" id="implementation">
+<h5>Implementation:<a class="headerlink" href="#implementation" title="Permalink to this headline">¶</a></h5>
+<p>Depending on properties of the target machine and the particular
+<tt class="docutils literal"><span class="pre">switch</span></tt> instruction, this instruction may be code generated in
+different ways. For example, it could be generated as a series of
+chained conditional branches or with a lookup table.</p>
+</div>
+<div class="section" id="id40">
+<h5>Example:<a class="headerlink" href="#id40" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="c">; Emulate a conditional br instruction</span>
+<span class="nv">%Val</span> <span class="p">=</span> <span class="k">zext</span> <span class="k">i1</span> <span class="nv">%value</span> <span class="k">to</span> <span class="k">i32</span>
+<span class="k">switch</span> <span class="k">i32</span> <span class="nv">%Val</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%truedest</span> <span class="p">[</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%falsedest</span> <span class="p">]</span>
+
+<span class="c">; Emulate an unconditional br instruction</span>
+<span class="k">switch</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%dest</span> <span class="p">[</span> <span class="p">]</span>
+
+<span class="c">; Implement a jump table:</span>
+<span class="k">switch</span> <span class="k">i32</span> <span class="nv">%val</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%otherwise</span> <span class="p">[</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%onzero</span>
+                                    <span class="k">i32</span> <span class="m">1</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%onone</span>
+                                    <span class="k">i32</span> <span class="m">2</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%ontwo</span> <span class="p">]</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="indirectbr-instruction">
+<span id="i-indirectbr"></span><h4><a class="toc-backref" href="#id650">‘<tt class="docutils literal"><span class="pre">indirectbr</span></tt>‘ Instruction</a><a class="headerlink" href="#indirectbr-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id41">
+<h5>Syntax:<a class="headerlink" href="#id41" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>indirectbr <somety>* <address>, [ label <dest1>, label <dest2>, ... ]</pre>
+</div>
+</div>
+<div class="section" id="id42">
+<h5>Overview:<a class="headerlink" href="#id42" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">indirectbr</span></tt>‘ instruction implements an indirect branch to a
+label within the current function, whose address is specified by
+“<tt class="docutils literal"><span class="pre">address</span></tt>”. Address must be derived from a
+<a class="reference internal" href="#blockaddress"><em>blockaddress</em></a> constant.</p>
+</div>
+<div class="section" id="id43">
+<h5>Arguments:<a class="headerlink" href="#id43" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">address</span></tt>‘ argument is the address of the label to jump to. The
+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.</p>
+<p>This destination list is required so that dataflow analysis has an
+accurate understanding of the CFG.</p>
+</div>
+<div class="section" id="id44">
+<h5>Semantics:<a class="headerlink" href="#id44" title="Permalink to this headline">¶</a></h5>
+<p>Control transfers to the block specified in the address argument. All
+possible destination blocks must be listed in the label list, otherwise
+this instruction has undefined behavior. This implies that jumps to
+labels defined in other functions have undefined behavior as well.</p>
+</div>
+<div class="section" id="id45">
+<h5>Implementation:<a class="headerlink" href="#id45" title="Permalink to this headline">¶</a></h5>
+<p>This is typically implemented with a jump through a register.</p>
+</div>
+<div class="section" id="id46">
+<h5>Example:<a class="headerlink" href="#id46" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>indirectbr i8* %Addr, [ label %bb1, label %bb2, label %bb3 ]</pre>
+</div>
+</div>
+</div>
+<div class="section" id="invoke-instruction">
+<span id="i-invoke"></span><h4><a class="toc-backref" href="#id651">‘<tt class="docutils literal"><span class="pre">invoke</span></tt>‘ Instruction</a><a class="headerlink" href="#invoke-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id47">
+<h5>Syntax:<a class="headerlink" href="#id47" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = invoke [cconv] [ret attrs] <ptr to function ty> <function ptr val>(<function args>) [fn attrs]
+              to label <normal label> unwind label <exception label></pre>
+</div>
+</div>
+<div class="section" id="id48">
+<h5>Overview:<a class="headerlink" href="#id48" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">invoke</span></tt>‘ instruction causes control to transfer to a specified
+function, with the possibility of control flow transfer to either the
+‘<tt class="docutils literal"><span class="pre">normal</span></tt>‘ label or the ‘<tt class="docutils literal"><span class="pre">exception</span></tt>‘ label. If the callee function
+returns with the “<tt class="docutils literal"><span class="pre">ret</span></tt>” instruction, control flow will return to the
+“normal” label. If the callee (or any indirect callees) returns via the
+“<a class="reference internal" href="#i-resume"><em>resume</em></a>” instruction or other exception handling
+mechanism, control is interrupted and continued at the dynamically
+nearest “exception” label.</p>
+<p>The ‘<tt class="docutils literal"><span class="pre">exception</span></tt>‘ label is a <a class="reference external" href="ExceptionHandling.html#overview">landing
+pad</a> for the exception. As such,
+‘<tt class="docutils literal"><span class="pre">exception</span></tt>‘ label is required to have the
+“<a class="reference internal" href="#i-landingpad"><em>landingpad</em></a>” instruction, which contains the
+information about the behavior of the program after unwinding happens,
+as its first non-PHI instruction. The restrictions on the
+“<tt class="docutils literal"><span class="pre">landingpad</span></tt>” instruction’s tightly couples it to the “<tt class="docutils literal"><span class="pre">invoke</span></tt>”
+instruction, so that the important information contained within the
+“<tt class="docutils literal"><span class="pre">landingpad</span></tt>” instruction can’t be lost through normal code motion.</p>
+</div>
+<div class="section" id="id49">
+<h5>Arguments:<a class="headerlink" href="#id49" title="Permalink to this headline">¶</a></h5>
+<p>This instruction requires several arguments:</p>
+<ol class="arabic simple">
+<li>The optional “cconv” marker indicates which <a class="reference internal" href="#callingconv"><em>calling
+convention</em></a> the call should use. If none is
+specified, the call defaults to using C calling conventions.</li>
+<li>The optional <a class="reference internal" href="#paramattrs"><em>Parameter Attributes</em></a> list for return
+values. Only ‘<tt class="docutils literal"><span class="pre">zeroext</span></tt>‘, ‘<tt class="docutils literal"><span class="pre">signext</span></tt>‘, and ‘<tt class="docutils literal"><span class="pre">inreg</span></tt>‘ attributes
+are valid here.</li>
+<li>‘<tt class="docutils literal"><span class="pre">ptr</span> <span class="pre">to</span> <span class="pre">function</span> <span class="pre">ty</span></tt>‘: shall be the signature of the pointer to
+function value being invoked. In most cases, this is a direct
+function invocation, but indirect <tt class="docutils literal"><span class="pre">invoke</span></tt>‘s are just as possible,
+branching off an arbitrary pointer to function value.</li>
+<li>‘<tt class="docutils literal"><span class="pre">function</span> <span class="pre">ptr</span> <span class="pre">val</span></tt>‘: An LLVM value containing a pointer to a
+function to be invoked.</li>
+<li>‘<tt class="docutils literal"><span class="pre">function</span> <span class="pre">args</span></tt>‘: argument list whose types match the function
+signature argument types and parameter attributes. All arguments must
+be of <a class="reference internal" href="#t-firstclass"><em>first class</em></a> type. If the function signature
+indicates the function accepts a variable number of arguments, the
+extra arguments can be specified.</li>
+<li>‘<tt class="docutils literal"><span class="pre">normal</span> <span class="pre">label</span></tt>‘: the label reached when the called function
+executes a ‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ instruction.</li>
+<li>‘<tt class="docutils literal"><span class="pre">exception</span> <span class="pre">label</span></tt>‘: the label reached when a callee returns via
+the <a class="reference internal" href="#i-resume"><em>resume</em></a> instruction or other exception handling
+mechanism.</li>
+<li>The optional <a class="reference internal" href="#fnattrs"><em>function attributes</em></a> list. Only
+‘<tt class="docutils literal"><span class="pre">noreturn</span></tt>‘, ‘<tt class="docutils literal"><span class="pre">nounwind</span></tt>‘, ‘<tt class="docutils literal"><span class="pre">readonly</span></tt>‘ and ‘<tt class="docutils literal"><span class="pre">readnone</span></tt>‘
+attributes are valid here.</li>
+</ol>
+</div>
+<div class="section" id="id50">
+<h5>Semantics:<a class="headerlink" href="#id50" title="Permalink to this headline">¶</a></h5>
+<p>This instruction is designed to operate as a standard ‘<tt class="docutils literal"><span class="pre">call</span></tt>‘
+instruction in most regards. The primary difference is that it
+establishes an association with a label, which is used by the runtime
+library to unwind the stack.</p>
+<p>This instruction is used in languages with destructors to ensure that
+proper cleanup is performed in the case of either a <tt class="docutils literal"><span class="pre">longjmp</span></tt> or a
+thrown exception. Additionally, this is important for implementation of
+‘<tt class="docutils literal"><span class="pre">catch</span></tt>‘ clauses in high-level languages that support them.</p>
+<p>For the purposes of the SSA form, the definition of the value returned
+by the ‘<tt class="docutils literal"><span class="pre">invoke</span></tt>‘ instruction is deemed to occur on the edge from the
+current block to the “normal” label. If the callee unwinds then no
+return value is available.</p>
+</div>
+<div class="section" id="id51">
+<h5>Example:<a class="headerlink" href="#id51" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%retval</span> <span class="p">=</span> <span class="k">invoke</span> <span class="k">i32</span> <span class="vg">@Test</span><span class="p">(</span><span class="k">i32</span> <span class="m">15</span><span class="p">)</span> <span class="k">to</span> <span class="kt">label</span> <span class="nv">%Continue</span>
+            <span class="k">unwind</span> <span class="kt">label</span> <span class="nv">%TestCleanup</span>              <span class="c">; {i32}:retval set</span>
+<span class="nv">%retval</span> <span class="p">=</span> <span class="k">invoke</span> <span class="k">coldcc</span> <span class="k">i32</span> <span class="nv">%Testfnptr</span><span class="p">(</span><span class="k">i32</span> <span class="m">15</span><span class="p">)</span> <span class="k">to</span> <span class="kt">label</span> <span class="nv">%Continue</span>
+            <span class="k">unwind</span> <span class="kt">label</span> <span class="nv">%TestCleanup</span>              <span class="c">; {i32}:retval set</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="resume-instruction">
+<span id="i-resume"></span><h4><a class="toc-backref" href="#id652">‘<tt class="docutils literal"><span class="pre">resume</span></tt>‘ Instruction</a><a class="headerlink" href="#resume-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id52">
+<h5>Syntax:<a class="headerlink" href="#id52" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>resume <type> <value></pre>
+</div>
+</div>
+<div class="section" id="id53">
+<h5>Overview:<a class="headerlink" href="#id53" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">resume</span></tt>‘ instruction is a terminator instruction that has no
+successors.</p>
+</div>
+<div class="section" id="id54">
+<h5>Arguments:<a class="headerlink" href="#id54" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">resume</span></tt>‘ instruction requires one argument, which must have the
+same type as the result of any ‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ instruction in the same
+function.</p>
+</div>
+<div class="section" id="id55">
+<h5>Semantics:<a class="headerlink" href="#id55" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">resume</span></tt>‘ instruction resumes propagation of an existing
+(in-flight) exception whose unwinding was interrupted with a
+<a class="reference internal" href="#i-landingpad"><em>landingpad</em></a> instruction.</p>
+</div>
+<div class="section" id="id56">
+<h5>Example:<a class="headerlink" href="#id56" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>resume { i8*, i32 } %exn</pre>
+</div>
+</div>
+</div>
+<div class="section" id="unreachable-instruction">
+<span id="i-unreachable"></span><h4><a class="toc-backref" href="#id653">‘<tt class="docutils literal"><span class="pre">unreachable</span></tt>‘ Instruction</a><a class="headerlink" href="#unreachable-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id57">
+<h5>Syntax:<a class="headerlink" href="#id57" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">unreachable</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="id58">
+<h5>Overview:<a class="headerlink" href="#id58" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">unreachable</span></tt>‘ instruction has no defined semantics. This
+instruction is used to inform the optimizer that a particular portion of
+the code is not reachable. This can be used to indicate that the code
+after a no-return function cannot be reached, and other facts.</p>
+</div>
+<div class="section" id="id59">
+<h5>Semantics:<a class="headerlink" href="#id59" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">unreachable</span></tt>‘ instruction has no defined semantics.</p>
+</div>
+</div>
+</div>
+<div class="section" id="binary-operations">
+<span id="binaryops"></span><h3><a class="toc-backref" href="#id654">Binary Operations</a><a class="headerlink" href="#binary-operations" title="Permalink to this headline">¶</a></h3>
+<p>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 produce a single value. The operands might represent multiple
+data, as is the case with the <a class="reference internal" href="#t-vector"><em>vector</em></a> data type. The
+result value has the same type as its operands.</p>
+<p>There are several different binary operators:</p>
+<div class="section" id="add-instruction">
+<span id="i-add"></span><h4><a class="toc-backref" href="#id655">‘<tt class="docutils literal"><span class="pre">add</span></tt>‘ Instruction</a><a class="headerlink" href="#add-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id60">
+<h5>Syntax:<a class="headerlink" href="#id60" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = add <ty> <op1>, <op2>          ; yields {ty}:result
+<result> = add nuw <ty> <op1>, <op2>      ; yields {ty}:result
+<result> = add nsw <ty> <op1>, <op2>      ; yields {ty}:result
+<result> = add nuw nsw <ty> <op1>, <op2>  ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id61">
+<h5>Overview:<a class="headerlink" href="#id61" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">add</span></tt>‘ instruction returns the sum of its two operands.</p>
+</div>
+<div class="section" id="id62">
+<h5>Arguments:<a class="headerlink" href="#id62" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">add</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id63">
+<h5>Semantics:<a class="headerlink" href="#id63" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is the integer sum of the two operands.</p>
+<p>If the sum has unsigned overflow, the result returned is the
+mathematical result modulo 2<sup>n</sup>, where n is the bit width of
+the result.</p>
+<p>Because LLVM integers use a two’s complement representation, this
+instruction is appropriate for both signed and unsigned integers.</p>
+<p><tt class="docutils literal"><span class="pre">nuw</span></tt> and <tt class="docutils literal"><span class="pre">nsw</span></tt> stand for “No Unsigned Wrap” and “No Signed Wrap”,
+respectively. If the <tt class="docutils literal"><span class="pre">nuw</span></tt> and/or <tt class="docutils literal"><span class="pre">nsw</span></tt> keywords are present, the
+result value of the <tt class="docutils literal"><span class="pre">add</span></tt> is a <a class="reference internal" href="#poisonvalues"><em>poison value</em></a> if
+unsigned and/or signed overflow, respectively, occurs.</p>
+</div>
+<div class="section" id="id64">
+<h5>Example:<a class="headerlink" href="#id64" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = add i32 4, %var          ; yields {i32}:result = 4 + %var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="fadd-instruction">
+<span id="i-fadd"></span><h4><a class="toc-backref" href="#id656">‘<tt class="docutils literal"><span class="pre">fadd</span></tt>‘ Instruction</a><a class="headerlink" href="#fadd-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id65">
+<h5>Syntax:<a class="headerlink" href="#id65" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = fadd [fast-math flags]* <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id66">
+<h5>Overview:<a class="headerlink" href="#id66" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fadd</span></tt>‘ instruction returns the sum of its two operands.</p>
+</div>
+<div class="section" id="id67">
+<h5>Arguments:<a class="headerlink" href="#id67" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">fadd</span></tt>‘ instruction must be <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of floating point values.
+Both arguments must have identical types.</p>
+</div>
+<div class="section" id="id68">
+<h5>Semantics:<a class="headerlink" href="#id68" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is the floating point sum of the two operands. This
+instruction can also take any number of <a class="reference internal" href="#fastmath"><em>fast-math flags</em></a>,
+which are optimization hints to enable otherwise unsafe floating point
+optimizations:</p>
+</div>
+<div class="section" id="id69">
+<h5>Example:<a class="headerlink" href="#id69" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = fadd float 4.0, %var          ; yields {float}:result = 4.0 + %var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="sub-instruction">
+<h4><a class="toc-backref" href="#id657">‘<tt class="docutils literal"><span class="pre">sub</span></tt>‘ Instruction</a><a class="headerlink" href="#sub-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id70">
+<h5>Syntax:<a class="headerlink" href="#id70" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = sub <ty> <op1>, <op2>          ; yields {ty}:result
+<result> = sub nuw <ty> <op1>, <op2>      ; yields {ty}:result
+<result> = sub nsw <ty> <op1>, <op2>      ; yields {ty}:result
+<result> = sub nuw nsw <ty> <op1>, <op2>  ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id71">
+<h5>Overview:<a class="headerlink" href="#id71" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">sub</span></tt>‘ instruction returns the difference of its two operands.</p>
+<p>Note that the ‘<tt class="docutils literal"><span class="pre">sub</span></tt>‘ instruction is used to represent the ‘<tt class="docutils literal"><span class="pre">neg</span></tt>‘
+instruction present in most other intermediate representations.</p>
+</div>
+<div class="section" id="id72">
+<h5>Arguments:<a class="headerlink" href="#id72" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">sub</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id73">
+<h5>Semantics:<a class="headerlink" href="#id73" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is the integer difference of the two operands.</p>
+<p>If the difference has unsigned overflow, the result returned is the
+mathematical result modulo 2<sup>n</sup>, where n is the bit width of
+the result.</p>
+<p>Because LLVM integers use a two’s complement representation, this
+instruction is appropriate for both signed and unsigned integers.</p>
+<p><tt class="docutils literal"><span class="pre">nuw</span></tt> and <tt class="docutils literal"><span class="pre">nsw</span></tt> stand for “No Unsigned Wrap” and “No Signed Wrap”,
+respectively. If the <tt class="docutils literal"><span class="pre">nuw</span></tt> and/or <tt class="docutils literal"><span class="pre">nsw</span></tt> keywords are present, the
+result value of the <tt class="docutils literal"><span class="pre">sub</span></tt> is a <a class="reference internal" href="#poisonvalues"><em>poison value</em></a> if
+unsigned and/or signed overflow, respectively, occurs.</p>
+</div>
+<div class="section" id="id74">
+<h5>Example:<a class="headerlink" href="#id74" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = sub i32 4, %var          ; yields {i32}:result = 4 - %var
+<result> = sub i32 0, %val          ; yields {i32}:result = -%var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="fsub-instruction">
+<span id="i-fsub"></span><h4><a class="toc-backref" href="#id658">‘<tt class="docutils literal"><span class="pre">fsub</span></tt>‘ Instruction</a><a class="headerlink" href="#fsub-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id75">
+<h5>Syntax:<a class="headerlink" href="#id75" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = fsub [fast-math flags]* <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id76">
+<h5>Overview:<a class="headerlink" href="#id76" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fsub</span></tt>‘ instruction returns the difference of its two operands.</p>
+<p>Note that the ‘<tt class="docutils literal"><span class="pre">fsub</span></tt>‘ instruction is used to represent the ‘<tt class="docutils literal"><span class="pre">fneg</span></tt>‘
+instruction present in most other intermediate representations.</p>
+</div>
+<div class="section" id="id77">
+<h5>Arguments:<a class="headerlink" href="#id77" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">fsub</span></tt>‘ instruction must be <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of floating point values.
+Both arguments must have identical types.</p>
+</div>
+<div class="section" id="id78">
+<h5>Semantics:<a class="headerlink" href="#id78" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is the floating point difference of the two operands.
+This instruction can also take any number of <a class="reference internal" href="#fastmath"><em>fast-math
+flags</em></a>, which are optimization hints to enable otherwise
+unsafe floating point optimizations:</p>
+</div>
+<div class="section" id="id79">
+<h5>Example:<a class="headerlink" href="#id79" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = fsub float 4.0, %var           ; yields {float}:result = 4.0 - %var
+<result> = fsub float -0.0, %val          ; yields {float}:result = -%var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="mul-instruction">
+<h4><a class="toc-backref" href="#id659">‘<tt class="docutils literal"><span class="pre">mul</span></tt>‘ Instruction</a><a class="headerlink" href="#mul-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id80">
+<h5>Syntax:<a class="headerlink" href="#id80" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = mul <ty> <op1>, <op2>          ; yields {ty}:result
+<result> = mul nuw <ty> <op1>, <op2>      ; yields {ty}:result
+<result> = mul nsw <ty> <op1>, <op2>      ; yields {ty}:result
+<result> = mul nuw nsw <ty> <op1>, <op2>  ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id81">
+<h5>Overview:<a class="headerlink" href="#id81" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">mul</span></tt>‘ instruction returns the product of its two operands.</p>
+</div>
+<div class="section" id="id82">
+<h5>Arguments:<a class="headerlink" href="#id82" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">mul</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id83">
+<h5>Semantics:<a class="headerlink" href="#id83" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is the integer product of the two operands.</p>
+<p>If the result of the multiplication has unsigned overflow, the result
+returned is the mathematical result modulo 2<sup>n</sup>, where n is the
+bit width of the result.</p>
+<p>Because LLVM integers use a two’s complement representation, and the
+result is the same width as the operands, this instruction returns the
+correct result for both signed and unsigned integers. If a full product
+(e.g. <tt class="docutils literal"><span class="pre">i32</span></tt> * <tt class="docutils literal"><span class="pre">i32</span></tt> -> <tt class="docutils literal"><span class="pre">i64</span></tt>) is needed, the operands should be
+sign-extended or zero-extended as appropriate to the width of the full
+product.</p>
+<p><tt class="docutils literal"><span class="pre">nuw</span></tt> and <tt class="docutils literal"><span class="pre">nsw</span></tt> stand for “No Unsigned Wrap” and “No Signed Wrap”,
+respectively. If the <tt class="docutils literal"><span class="pre">nuw</span></tt> and/or <tt class="docutils literal"><span class="pre">nsw</span></tt> keywords are present, the
+result value of the <tt class="docutils literal"><span class="pre">mul</span></tt> is a <a class="reference internal" href="#poisonvalues"><em>poison value</em></a> if
+unsigned and/or signed overflow, respectively, occurs.</p>
+</div>
+<div class="section" id="id84">
+<h5>Example:<a class="headerlink" href="#id84" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = mul i32 4, %var          ; yields {i32}:result = 4 * %var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="fmul-instruction">
+<span id="i-fmul"></span><h4><a class="toc-backref" href="#id660">‘<tt class="docutils literal"><span class="pre">fmul</span></tt>‘ Instruction</a><a class="headerlink" href="#fmul-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id85">
+<h5>Syntax:<a class="headerlink" href="#id85" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = fmul [fast-math flags]* <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id86">
+<h5>Overview:<a class="headerlink" href="#id86" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fmul</span></tt>‘ instruction returns the product of its two operands.</p>
+</div>
+<div class="section" id="id87">
+<h5>Arguments:<a class="headerlink" href="#id87" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">fmul</span></tt>‘ instruction must be <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of floating point values.
+Both arguments must have identical types.</p>
+</div>
+<div class="section" id="id88">
+<h5>Semantics:<a class="headerlink" href="#id88" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is the floating point product of the two operands.
+This instruction can also take any number of <a class="reference internal" href="#fastmath"><em>fast-math
+flags</em></a>, which are optimization hints to enable otherwise
+unsafe floating point optimizations:</p>
+</div>
+<div class="section" id="id89">
+<h5>Example:<a class="headerlink" href="#id89" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = fmul float 4.0, %var          ; yields {float}:result = 4.0 * %var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="udiv-instruction">
+<h4><a class="toc-backref" href="#id661">‘<tt class="docutils literal"><span class="pre">udiv</span></tt>‘ Instruction</a><a class="headerlink" href="#udiv-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id90">
+<h5>Syntax:<a class="headerlink" href="#id90" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = udiv <ty> <op1>, <op2>         ; yields {ty}:result
+<result> = udiv exact <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id91">
+<h5>Overview:<a class="headerlink" href="#id91" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">udiv</span></tt>‘ instruction returns the quotient of its two operands.</p>
+</div>
+<div class="section" id="id92">
+<h5>Arguments:<a class="headerlink" href="#id92" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">udiv</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id93">
+<h5>Semantics:<a class="headerlink" href="#id93" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is the unsigned integer quotient of the two operands.</p>
+<p>Note that unsigned integer division and signed integer division are
+distinct operations; for signed integer division, use ‘<tt class="docutils literal"><span class="pre">sdiv</span></tt>‘.</p>
+<p>Division by zero leads to undefined behavior.</p>
+<p>If the <tt class="docutils literal"><span class="pre">exact</span></tt> keyword is present, the result value of the <tt class="docutils literal"><span class="pre">udiv</span></tt> is
+a <a class="reference internal" href="#poisonvalues"><em>poison value</em></a> if %op1 is not a multiple of %op2 (as
+such, “((a udiv exact b) mul b) == a”).</p>
+</div>
+<div class="section" id="id94">
+<h5>Example:<a class="headerlink" href="#id94" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = udiv i32 4, %var          ; yields {i32}:result = 4 / %var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="sdiv-instruction">
+<h4><a class="toc-backref" href="#id662">‘<tt class="docutils literal"><span class="pre">sdiv</span></tt>‘ Instruction</a><a class="headerlink" href="#sdiv-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id95">
+<h5>Syntax:<a class="headerlink" href="#id95" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = sdiv <ty> <op1>, <op2>         ; yields {ty}:result
+<result> = sdiv exact <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id96">
+<h5>Overview:<a class="headerlink" href="#id96" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">sdiv</span></tt>‘ instruction returns the quotient of its two operands.</p>
+</div>
+<div class="section" id="id97">
+<h5>Arguments:<a class="headerlink" href="#id97" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">sdiv</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id98">
+<h5>Semantics:<a class="headerlink" href="#id98" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is the signed integer quotient of the two operands
+rounded towards zero.</p>
+<p>Note that signed integer division and unsigned integer division are
+distinct operations; for unsigned integer division, use ‘<tt class="docutils literal"><span class="pre">udiv</span></tt>‘.</p>
+<p>Division by zero leads to undefined behavior. Overflow also leads to
+undefined behavior; this is a rare case, but can occur, for example, by
+doing a 32-bit division of -2147483648 by -1.</p>
+<p>If the <tt class="docutils literal"><span class="pre">exact</span></tt> keyword is present, the result value of the <tt class="docutils literal"><span class="pre">sdiv</span></tt> is
+a <a class="reference internal" href="#poisonvalues"><em>poison value</em></a> if the result would be rounded.</p>
+</div>
+<div class="section" id="id99">
+<h5>Example:<a class="headerlink" href="#id99" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = sdiv i32 4, %var          ; yields {i32}:result = 4 / %var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="fdiv-instruction">
+<span id="i-fdiv"></span><h4><a class="toc-backref" href="#id663">‘<tt class="docutils literal"><span class="pre">fdiv</span></tt>‘ Instruction</a><a class="headerlink" href="#fdiv-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id100">
+<h5>Syntax:<a class="headerlink" href="#id100" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = fdiv [fast-math flags]* <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id101">
+<h5>Overview:<a class="headerlink" href="#id101" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fdiv</span></tt>‘ instruction returns the quotient of its two operands.</p>
+</div>
+<div class="section" id="id102">
+<h5>Arguments:<a class="headerlink" href="#id102" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">fdiv</span></tt>‘ instruction must be <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of floating point values.
+Both arguments must have identical types.</p>
+</div>
+<div class="section" id="id103">
+<h5>Semantics:<a class="headerlink" href="#id103" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is the floating point quotient of the two operands.
+This instruction can also take any number of <a class="reference internal" href="#fastmath"><em>fast-math
+flags</em></a>, which are optimization hints to enable otherwise
+unsafe floating point optimizations:</p>
+</div>
+<div class="section" id="id104">
+<h5>Example:<a class="headerlink" href="#id104" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = fdiv float 4.0, %var          ; yields {float}:result = 4.0 / %var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="urem-instruction">
+<h4><a class="toc-backref" href="#id664">‘<tt class="docutils literal"><span class="pre">urem</span></tt>‘ Instruction</a><a class="headerlink" href="#urem-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id105">
+<h5>Syntax:<a class="headerlink" href="#id105" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = urem <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id106">
+<h5>Overview:<a class="headerlink" href="#id106" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">urem</span></tt>‘ instruction returns the remainder from the unsigned
+division of its two arguments.</p>
+</div>
+<div class="section" id="id107">
+<h5>Arguments:<a class="headerlink" href="#id107" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">urem</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id108">
+<h5>Semantics:<a class="headerlink" href="#id108" title="Permalink to this headline">¶</a></h5>
+<p>This instruction returns the unsigned integer <em>remainder</em> of a division.
+This instruction always performs an unsigned division to get the
+remainder.</p>
+<p>Note that unsigned integer remainder and signed integer remainder are
+distinct operations; for signed integer remainder, use ‘<tt class="docutils literal"><span class="pre">srem</span></tt>‘.</p>
+<p>Taking the remainder of a division by zero leads to undefined behavior.</p>
+</div>
+<div class="section" id="id109">
+<h5>Example:<a class="headerlink" href="#id109" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = urem i32 4, %var          ; yields {i32}:result = 4 % %var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="srem-instruction">
+<h4><a class="toc-backref" href="#id665">‘<tt class="docutils literal"><span class="pre">srem</span></tt>‘ Instruction</a><a class="headerlink" href="#srem-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id110">
+<h5>Syntax:<a class="headerlink" href="#id110" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = srem <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id111">
+<h5>Overview:<a class="headerlink" href="#id111" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">srem</span></tt>‘ instruction returns the remainder from the signed
+division of its two operands. This instruction can also take
+<a class="reference internal" href="#t-vector"><em>vector</em></a> versions of the values in which case the elements
+must be integers.</p>
+</div>
+<div class="section" id="id112">
+<h5>Arguments:<a class="headerlink" href="#id112" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">srem</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id113">
+<h5>Semantics:<a class="headerlink" href="#id113" title="Permalink to this headline">¶</a></h5>
+<p>This instruction returns the <em>remainder</em> of a division (where the result
+is either zero or has the same sign as the dividend, <tt class="docutils literal"><span class="pre">op1</span></tt>), not the
+<em>modulo</em> operator (where the result is either zero or has the same sign
+as the divisor, <tt class="docutils literal"><span class="pre">op2</span></tt>) of a value. For more information about the
+difference, see <a class="reference external" href="http://mathforum.org/dr.math/problems/anne.4.28.99.html">The Math
+Forum</a>. For a
+table of how this is implemented in various languages, please see
+<a class="reference external" href="http://en.wikipedia.org/wiki/Modulo_operation">Wikipedia: modulo
+operation</a>.</p>
+<p>Note that signed integer remainder and unsigned integer remainder are
+distinct operations; for unsigned integer remainder, use ‘<tt class="docutils literal"><span class="pre">urem</span></tt>‘.</p>
+<p>Taking the remainder of a division by zero leads to undefined behavior.
+Overflow also leads to undefined behavior; this is a rare case, but can
+occur, for example, by taking the remainder of a 32-bit division of
+-2147483648 by -1. (The remainder doesn’t actually overflow, but this
+rule lets srem be implemented using instructions that return both the
+result of the division and the remainder.)</p>
+</div>
+<div class="section" id="id114">
+<h5>Example:<a class="headerlink" href="#id114" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = srem i32 4, %var          ; yields {i32}:result = 4 % %var</pre>
+</div>
+</div>
+</div>
+<div class="section" id="frem-instruction">
+<span id="i-frem"></span><h4><a class="toc-backref" href="#id666">‘<tt class="docutils literal"><span class="pre">frem</span></tt>‘ Instruction</a><a class="headerlink" href="#frem-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id115">
+<h5>Syntax:<a class="headerlink" href="#id115" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = frem [fast-math flags]* <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id116">
+<h5>Overview:<a class="headerlink" href="#id116" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">frem</span></tt>‘ instruction returns the remainder from the division of
+its two operands.</p>
+</div>
+<div class="section" id="id117">
+<h5>Arguments:<a class="headerlink" href="#id117" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">frem</span></tt>‘ instruction must be <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of floating point values.
+Both arguments must have identical types.</p>
+</div>
+<div class="section" id="id118">
+<h5>Semantics:<a class="headerlink" href="#id118" title="Permalink to this headline">¶</a></h5>
+<p>This instruction returns the <em>remainder</em> of a division. The remainder
+has the same sign as the dividend. This instruction can also take any
+number of <a class="reference internal" href="#fastmath"><em>fast-math flags</em></a>, which are optimization hints
+to enable otherwise unsafe floating point optimizations:</p>
+</div>
+<div class="section" id="id119">
+<h5>Example:<a class="headerlink" href="#id119" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = frem float 4.0, %var          ; yields {float}:result = 4.0 % %var</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="bitwise-binary-operations">
+<span id="bitwiseops"></span><h3><a class="toc-backref" href="#id667">Bitwise Binary Operations</a><a class="headerlink" href="#bitwise-binary-operations" title="Permalink to this headline">¶</a></h3>
+<p>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 strength reduced from other instructions. They require two
+operands of the same type, execute an operation on them, and produce a
+single value. The resulting value is the same type as its operands.</p>
+<div class="section" id="shl-instruction">
+<h4><a class="toc-backref" href="#id668">‘<tt class="docutils literal"><span class="pre">shl</span></tt>‘ Instruction</a><a class="headerlink" href="#shl-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id120">
+<h5>Syntax:<a class="headerlink" href="#id120" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = shl <ty> <op1>, <op2>           ; yields {ty}:result
+<result> = shl nuw <ty> <op1>, <op2>       ; yields {ty}:result
+<result> = shl nsw <ty> <op1>, <op2>       ; yields {ty}:result
+<result> = shl nuw nsw <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id121">
+<h5>Overview:<a class="headerlink" href="#id121" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">shl</span></tt>‘ instruction returns the first operand shifted to the left
+a specified number of bits.</p>
+</div>
+<div class="section" id="id122">
+<h5>Arguments:<a class="headerlink" href="#id122" title="Permalink to this headline">¶</a></h5>
+<p>Both arguments to the ‘<tt class="docutils literal"><span class="pre">shl</span></tt>‘ instruction must be the same
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer type.
+‘<tt class="docutils literal"><span class="pre">op2</span></tt>‘ is treated as an unsigned value.</p>
+</div>
+<div class="section" id="id123">
+<h5>Semantics:<a class="headerlink" href="#id123" title="Permalink to this headline">¶</a></h5>
+<p>The value produced is <tt class="docutils literal"><span class="pre">op1</span></tt> * 2<sup>op2</sup> mod 2<sup>n</sup>,
+where <tt class="docutils literal"><span class="pre">n</span></tt> is the width of the result. If <tt class="docutils literal"><span class="pre">op2</span></tt> is (statically or
+dynamically) negative or equal to or larger than the number of bits in
+<tt class="docutils literal"><span class="pre">op1</span></tt>, the result is undefined. If the arguments are vectors, each
+vector element of <tt class="docutils literal"><span class="pre">op1</span></tt> is shifted by the corresponding shift amount
+in <tt class="docutils literal"><span class="pre">op2</span></tt>.</p>
+<p>If the <tt class="docutils literal"><span class="pre">nuw</span></tt> keyword is present, then the shift produces a <a class="reference internal" href="#poisonvalues"><em>poison
+value</em></a> if it shifts out any non-zero bits. If the
+<tt class="docutils literal"><span class="pre">nsw</span></tt> keyword is present, then the shift produces a <a class="reference internal" href="#poisonvalues"><em>poison
+value</em></a> if it shifts out any bits that disagree with the
+resultant sign bit. As such, NUW/NSW have the same semantics as they
+would if the shift were expressed as a mul instruction with the same
+nsw/nuw bits in (mul %op1, (shl 1, %op2)).</p>
+</div>
+<div class="section" id="id124">
+<h5>Example:<a class="headerlink" href="#id124" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = shl i32 4, %var   ; yields {i32}: 4 << %var
+<result> = shl i32 4, 2      ; yields {i32}: 16
+<result> = shl i32 1, 10     ; yields {i32}: 1024
+<result> = shl i32 1, 32     ; undefined
+<result> = shl <2 x i32> < i32 1, i32 1>, < i32 1, i32 2>   ; yields: result=<2 x i32> < i32 2, i32 4></pre>
+</div>
+</div>
+</div>
+<div class="section" id="lshr-instruction">
+<h4><a class="toc-backref" href="#id669">‘<tt class="docutils literal"><span class="pre">lshr</span></tt>‘ Instruction</a><a class="headerlink" href="#lshr-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id125">
+<h5>Syntax:<a class="headerlink" href="#id125" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = lshr <ty> <op1>, <op2>         ; yields {ty}:result
+<result> = lshr exact <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id126">
+<h5>Overview:<a class="headerlink" href="#id126" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">lshr</span></tt>‘ instruction (logical shift right) returns the first
+operand shifted to the right a specified number of bits with zero fill.</p>
+</div>
+<div class="section" id="id127">
+<h5>Arguments:<a class="headerlink" href="#id127" title="Permalink to this headline">¶</a></h5>
+<p>Both arguments to the ‘<tt class="docutils literal"><span class="pre">lshr</span></tt>‘ instruction must be the same
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer type.
+‘<tt class="docutils literal"><span class="pre">op2</span></tt>‘ is treated as an unsigned value.</p>
+</div>
+<div class="section" id="id128">
+<h5>Semantics:<a class="headerlink" href="#id128" title="Permalink to this headline">¶</a></h5>
+<p>This instruction always performs a logical shift right operation. The
+most significant bits of the result will be filled with zero bits after
+the shift. If <tt class="docutils literal"><span class="pre">op2</span></tt> is (statically or dynamically) equal to or larger
+than the number of bits in <tt class="docutils literal"><span class="pre">op1</span></tt>, the result is undefined. If the
+arguments are vectors, each vector element of <tt class="docutils literal"><span class="pre">op1</span></tt> is shifted by the
+corresponding shift amount in <tt class="docutils literal"><span class="pre">op2</span></tt>.</p>
+<p>If the <tt class="docutils literal"><span class="pre">exact</span></tt> keyword is present, the result value of the <tt class="docutils literal"><span class="pre">lshr</span></tt> is
+a <a class="reference internal" href="#poisonvalues"><em>poison value</em></a> if any of the bits shifted out are
+non-zero.</p>
+</div>
+<div class="section" id="id129">
+<h5>Example:<a class="headerlink" href="#id129" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = lshr i32 4, 1   ; yields {i32}:result = 2
+<result> = lshr i32 4, 2   ; yields {i32}:result = 1
+<result> = lshr i8  4, 3   ; yields {i8}:result = 0
+<result> = lshr i8 -2, 1   ; yields {i8}:result = 0x7F
+<result> = lshr i32 1, 32  ; undefined
+<result> = lshr <2 x i32> < i32 -2, i32 4>, < i32 1, i32 2>   ; yields: result=<2 x i32> < i32 0x7FFFFFFF, i32 1></pre>
+</div>
+</div>
+</div>
+<div class="section" id="ashr-instruction">
+<h4><a class="toc-backref" href="#id670">‘<tt class="docutils literal"><span class="pre">ashr</span></tt>‘ Instruction</a><a class="headerlink" href="#ashr-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id130">
+<h5>Syntax:<a class="headerlink" href="#id130" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = ashr <ty> <op1>, <op2>         ; yields {ty}:result
+<result> = ashr exact <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id131">
+<h5>Overview:<a class="headerlink" href="#id131" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">ashr</span></tt>‘ instruction (arithmetic shift right) returns the first
+operand shifted to the right a specified number of bits with sign
+extension.</p>
+</div>
+<div class="section" id="id132">
+<h5>Arguments:<a class="headerlink" href="#id132" title="Permalink to this headline">¶</a></h5>
+<p>Both arguments to the ‘<tt class="docutils literal"><span class="pre">ashr</span></tt>‘ instruction must be the same
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer type.
+‘<tt class="docutils literal"><span class="pre">op2</span></tt>‘ is treated as an unsigned value.</p>
+</div>
+<div class="section" id="id133">
+<h5>Semantics:<a class="headerlink" href="#id133" title="Permalink to this headline">¶</a></h5>
+<p>This instruction always performs an arithmetic shift right operation,
+The most significant bits of the result will be filled with the sign bit
+of <tt class="docutils literal"><span class="pre">op1</span></tt>. If <tt class="docutils literal"><span class="pre">op2</span></tt> is (statically or dynamically) equal to or larger
+than the number of bits in <tt class="docutils literal"><span class="pre">op1</span></tt>, the result is undefined. If the
+arguments are vectors, each vector element of <tt class="docutils literal"><span class="pre">op1</span></tt> is shifted by the
+corresponding shift amount in <tt class="docutils literal"><span class="pre">op2</span></tt>.</p>
+<p>If the <tt class="docutils literal"><span class="pre">exact</span></tt> keyword is present, the result value of the <tt class="docutils literal"><span class="pre">ashr</span></tt> is
+a <a class="reference internal" href="#poisonvalues"><em>poison value</em></a> if any of the bits shifted out are
+non-zero.</p>
+</div>
+<div class="section" id="id134">
+<h5>Example:<a class="headerlink" href="#id134" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = ashr i32 4, 1   ; yields {i32}:result = 2
+<result> = ashr i32 4, 2   ; yields {i32}:result = 1
+<result> = ashr i8  4, 3   ; yields {i8}:result = 0
+<result> = ashr i8 -2, 1   ; yields {i8}:result = -1
+<result> = ashr i32 1, 32  ; undefined
+<result> = ashr <2 x i32> < i32 -2, i32 4>, < i32 1, i32 3>   ; yields: result=<2 x i32> < i32 -1, i32 0></pre>
+</div>
+</div>
+</div>
+<div class="section" id="and-instruction">
+<h4><a class="toc-backref" href="#id671">‘<tt class="docutils literal"><span class="pre">and</span></tt>‘ Instruction</a><a class="headerlink" href="#and-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id135">
+<h5>Syntax:<a class="headerlink" href="#id135" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = and <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id136">
+<h5>Overview:<a class="headerlink" href="#id136" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">and</span></tt>‘ instruction returns the bitwise logical and of its two
+operands.</p>
+</div>
+<div class="section" id="id137">
+<h5>Arguments:<a class="headerlink" href="#id137" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">and</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id138">
+<h5>Semantics:<a class="headerlink" href="#id138" title="Permalink to this headline">¶</a></h5>
+<p>The truth table used for the ‘<tt class="docutils literal"><span class="pre">and</span></tt>‘ instruction is:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="33%" />
+<col width="33%" />
+<col width="33%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td>In0</td>
+<td>In1</td>
+<td>Out</td>
+</tr>
+<tr class="row-even"><td>0</td>
+<td>0</td>
+<td>0</td>
+</tr>
+<tr class="row-odd"><td>0</td>
+<td>1</td>
+<td>0</td>
+</tr>
+<tr class="row-even"><td>1</td>
+<td>0</td>
+<td>0</td>
+</tr>
+<tr class="row-odd"><td>1</td>
+<td>1</td>
+<td>1</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id139">
+<h5>Example:<a class="headerlink" href="#id139" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><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</pre>
+</div>
+</div>
+</div>
+<div class="section" id="or-instruction">
+<h4><a class="toc-backref" href="#id672">‘<tt class="docutils literal"><span class="pre">or</span></tt>‘ Instruction</a><a class="headerlink" href="#or-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id140">
+<h5>Syntax:<a class="headerlink" href="#id140" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = or <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id141">
+<h5>Overview:<a class="headerlink" href="#id141" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">or</span></tt>‘ instruction returns the bitwise logical inclusive or of its
+two operands.</p>
+</div>
+<div class="section" id="id142">
+<h5>Arguments:<a class="headerlink" href="#id142" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">or</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id143">
+<h5>Semantics:<a class="headerlink" href="#id143" title="Permalink to this headline">¶</a></h5>
+<p>The truth table used for the ‘<tt class="docutils literal"><span class="pre">or</span></tt>‘ instruction is:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="33%" />
+<col width="33%" />
+<col width="33%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td>In0</td>
+<td>In1</td>
+<td>Out</td>
+</tr>
+<tr class="row-even"><td>0</td>
+<td>0</td>
+<td>0</td>
+</tr>
+<tr class="row-odd"><td>0</td>
+<td>1</td>
+<td>1</td>
+</tr>
+<tr class="row-even"><td>1</td>
+<td>0</td>
+<td>1</td>
+</tr>
+<tr class="row-odd"><td>1</td>
+<td>1</td>
+<td>1</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id144">
+<h5>Example:<a class="headerlink" href="#id144" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><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</pre>
+</div>
+</div>
+</div>
+<div class="section" id="xor-instruction">
+<h4><a class="toc-backref" href="#id673">‘<tt class="docutils literal"><span class="pre">xor</span></tt>‘ Instruction</a><a class="headerlink" href="#xor-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id145">
+<h5>Syntax:<a class="headerlink" href="#id145" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = xor <ty> <op1>, <op2>   ; yields {ty}:result</pre>
+</div>
+</div>
+<div class="section" id="id146">
+<h5>Overview:<a class="headerlink" href="#id146" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">xor</span></tt>‘ instruction returns the bitwise logical exclusive or of
+its two operands. The <tt class="docutils literal"><span class="pre">xor</span></tt> is used to implement the “one’s
+complement” operation, which is the “~” operator in C.</p>
+</div>
+<div class="section" id="id147">
+<h5>Arguments:<a class="headerlink" href="#id147" title="Permalink to this headline">¶</a></h5>
+<p>The two arguments to the ‘<tt class="docutils literal"><span class="pre">xor</span></tt>‘ instruction must be
+<a class="reference internal" href="#t-integer"><em>integer</em></a> or <a class="reference internal" href="#t-vector"><em>vector</em></a> of integer values. Both
+arguments must have identical types.</p>
+</div>
+<div class="section" id="id148">
+<h5>Semantics:<a class="headerlink" href="#id148" title="Permalink to this headline">¶</a></h5>
+<p>The truth table used for the ‘<tt class="docutils literal"><span class="pre">xor</span></tt>‘ instruction is:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="33%" />
+<col width="33%" />
+<col width="33%" />
+</colgroup>
+<tbody valign="top">
+<tr class="row-odd"><td>In0</td>
+<td>In1</td>
+<td>Out</td>
+</tr>
+<tr class="row-even"><td>0</td>
+<td>0</td>
+<td>0</td>
+</tr>
+<tr class="row-odd"><td>0</td>
+<td>1</td>
+<td>1</td>
+</tr>
+<tr class="row-even"><td>1</td>
+<td>0</td>
+<td>1</td>
+</tr>
+<tr class="row-odd"><td>1</td>
+<td>1</td>
+<td>0</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id149">
+<h5>Example:<a class="headerlink" href="#id149" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><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</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="vector-operations">
+<h3><a class="toc-backref" href="#id674">Vector Operations</a><a class="headerlink" href="#vector-operations" title="Permalink to this headline">¶</a></h3>
+<p>LLVM supports several instructions to represent vector operations in a
+target-independent manner. These instructions cover the element-access
+and vector-specific operations needed to process vectors effectively.
+While LLVM does directly support these vector operations, many
+sophisticated algorithms will want to use target-specific intrinsics to
+take full advantage of a specific target.</p>
+<div class="section" id="extractelement-instruction">
+<span id="i-extractelement"></span><h4><a class="toc-backref" href="#id675">‘<tt class="docutils literal"><span class="pre">extractelement</span></tt>‘ Instruction</a><a class="headerlink" href="#extractelement-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id150">
+<h5>Syntax:<a class="headerlink" href="#id150" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = extractelement <n x <ty>> <val>, i32 <idx>    ; yields <ty></pre>
+</div>
+</div>
+<div class="section" id="id151">
+<h5>Overview:<a class="headerlink" href="#id151" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">extractelement</span></tt>‘ instruction extracts a single scalar element
+from a vector at a specified index.</p>
+</div>
+<div class="section" id="id152">
+<h5>Arguments:<a class="headerlink" href="#id152" title="Permalink to this headline">¶</a></h5>
+<p>The first operand of an ‘<tt class="docutils literal"><span class="pre">extractelement</span></tt>‘ instruction is a value of
+<a class="reference internal" href="#t-vector"><em>vector</em></a> type. The second operand is an index indicating
+the position from which to extract the element. The index may be a
+variable.</p>
+</div>
+<div class="section" id="id153">
+<h5>Semantics:<a class="headerlink" href="#id153" title="Permalink to this headline">¶</a></h5>
+<p>The result is a scalar of the same type as the element type of <tt class="docutils literal"><span class="pre">val</span></tt>.
+Its value is the value at position <tt class="docutils literal"><span class="pre">idx</span></tt> of <tt class="docutils literal"><span class="pre">val</span></tt>. If <tt class="docutils literal"><span class="pre">idx</span></tt>
+exceeds the length of <tt class="docutils literal"><span class="pre">val</span></tt>, the results are undefined.</p>
+</div>
+<div class="section" id="id154">
+<h5>Example:<a class="headerlink" href="#id154" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = extractelement <4 x i32> %vec, i32 0    ; yields i32</pre>
+</div>
+</div>
+</div>
+<div class="section" id="insertelement-instruction">
+<span id="i-insertelement"></span><h4><a class="toc-backref" href="#id676">‘<tt class="docutils literal"><span class="pre">insertelement</span></tt>‘ Instruction</a><a class="headerlink" href="#insertelement-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id155">
+<h5>Syntax:<a class="headerlink" href="#id155" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = insertelement <n x <ty>> <val>, <ty> <elt>, i32 <idx>    ; yields <n x <ty>></pre>
+</div>
+</div>
+<div class="section" id="id156">
+<h5>Overview:<a class="headerlink" href="#id156" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">insertelement</span></tt>‘ instruction inserts a scalar element into a
+vector at a specified index.</p>
+</div>
+<div class="section" id="id157">
+<h5>Arguments:<a class="headerlink" href="#id157" title="Permalink to this headline">¶</a></h5>
+<p>The first operand of an ‘<tt class="docutils literal"><span class="pre">insertelement</span></tt>‘ instruction is a value of
+<a class="reference internal" href="#t-vector"><em>vector</em></a> type. The second operand is a scalar value whose
+type must equal the element type of the first operand. The third operand
+is an index indicating the position at which to insert the value. The
+index may be a variable.</p>
+</div>
+<div class="section" id="id158">
+<h5>Semantics:<a class="headerlink" href="#id158" title="Permalink to this headline">¶</a></h5>
+<p>The result is a vector of the same type as <tt class="docutils literal"><span class="pre">val</span></tt>. Its element values
+are those of <tt class="docutils literal"><span class="pre">val</span></tt> except at position <tt class="docutils literal"><span class="pre">idx</span></tt>, where it gets the value
+<tt class="docutils literal"><span class="pre">elt</span></tt>. If <tt class="docutils literal"><span class="pre">idx</span></tt> exceeds the length of <tt class="docutils literal"><span class="pre">val</span></tt>, the results are
+undefined.</p>
+</div>
+<div class="section" id="id159">
+<h5>Example:<a class="headerlink" href="#id159" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = insertelement <4 x i32> %vec, i32 1, i32 0    ; yields <4 x i32></pre>
+</div>
+</div>
+</div>
+<div class="section" id="shufflevector-instruction">
+<span id="i-shufflevector"></span><h4><a class="toc-backref" href="#id677">‘<tt class="docutils literal"><span class="pre">shufflevector</span></tt>‘ Instruction</a><a class="headerlink" href="#shufflevector-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id160">
+<h5>Syntax:<a class="headerlink" href="#id160" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask>    ; yields <m x <ty>></pre>
+</div>
+</div>
+<div class="section" id="id161">
+<h5>Overview:<a class="headerlink" href="#id161" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">shufflevector</span></tt>‘ instruction constructs a permutation of elements
+from two input vectors, returning a vector with the same element type as
+the input and length that is the same as the shuffle mask.</p>
+</div>
+<div class="section" id="id162">
+<h5>Arguments:<a class="headerlink" href="#id162" title="Permalink to this headline">¶</a></h5>
+<p>The first two operands of a ‘<tt class="docutils literal"><span class="pre">shufflevector</span></tt>‘ instruction are vectors
+with the same type. The third argument is a shuffle mask whose element
+type is always ‘i32’. The result of the instruction is a vector whose
+length is the same as the shuffle mask and whose element type is the
+same as the element type of the first two operands.</p>
+<p>The shuffle mask operand is required to be a constant vector with either
+constant integer or undef values.</p>
+</div>
+<div class="section" id="id163">
+<h5>Semantics:<a class="headerlink" href="#id163" title="Permalink to this headline">¶</a></h5>
+<p>The elements of the two input vectors are numbered from left to right
+across both of the vectors. The shuffle mask operand specifies, for each
+element of the result vector, which element of the two input vectors the
+result element gets. The element selector may be undef (meaning “don’t
+care”) and the second operand may be undef if performing a shuffle from
+only one vector.</p>
+</div>
+<div class="section" id="id164">
+<h5>Example:<a class="headerlink" href="#id164" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><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.
+<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,
+                        <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7 >  ; yields <8 x i32></pre>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="aggregate-operations">
+<h3><a class="toc-backref" href="#id678">Aggregate Operations</a><a class="headerlink" href="#aggregate-operations" title="Permalink to this headline">¶</a></h3>
+<p>LLVM supports several instructions for working with
+<a class="reference internal" href="#t-aggregate"><em>aggregate</em></a> values.</p>
+<div class="section" id="extractvalue-instruction">
+<span id="i-extractvalue"></span><h4><a class="toc-backref" href="#id679">‘<tt class="docutils literal"><span class="pre">extractvalue</span></tt>‘ Instruction</a><a class="headerlink" href="#extractvalue-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id165">
+<h5>Syntax:<a class="headerlink" href="#id165" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = extractvalue <aggregate type> <val>, <idx>{, <idx>}*</pre>
+</div>
+</div>
+<div class="section" id="id166">
+<h5>Overview:<a class="headerlink" href="#id166" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">extractvalue</span></tt>‘ instruction extracts the value of a member field
+from an <a class="reference internal" href="#t-aggregate"><em>aggregate</em></a> value.</p>
+</div>
+<div class="section" id="id167">
+<h5>Arguments:<a class="headerlink" href="#id167" title="Permalink to this headline">¶</a></h5>
+<p>The first operand of an ‘<tt class="docutils literal"><span class="pre">extractvalue</span></tt>‘ instruction is a value of
+<a class="reference internal" href="#t-struct"><em>struct</em></a> or <a class="reference internal" href="#t-array"><em>array</em></a> type. The operands are
+constant indices to specify which value to extract in a similar manner
+as indices in a ‘<tt class="docutils literal"><span class="pre">getelementptr</span></tt>‘ instruction.</p>
+<p>The major differences to <tt class="docutils literal"><span class="pre">getelementptr</span></tt> indexing are:</p>
+<ul class="simple">
+<li>Since the value being indexed is not a pointer, the first index is
+omitted and assumed to be zero.</li>
+<li>At least one index must be specified.</li>
+<li>Not only struct indices but also array indices must be in bounds.</li>
+</ul>
+</div>
+<div class="section" id="id168">
+<h5>Semantics:<a class="headerlink" href="#id168" title="Permalink to this headline">¶</a></h5>
+<p>The result is the value at the position in the aggregate specified by
+the index operands.</p>
+</div>
+<div class="section" id="id169">
+<h5>Example:<a class="headerlink" href="#id169" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = extractvalue {i32, float} %agg, 0    ; yields i32</pre>
+</div>
+</div>
+</div>
+<div class="section" id="insertvalue-instruction">
+<span id="i-insertvalue"></span><h4><a class="toc-backref" href="#id680">‘<tt class="docutils literal"><span class="pre">insertvalue</span></tt>‘ Instruction</a><a class="headerlink" href="#insertvalue-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id170">
+<h5>Syntax:<a class="headerlink" href="#id170" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = insertvalue <aggregate type> <val>, <ty> <elt>, <idx>{, <idx>}*    ; yields <aggregate type></pre>
+</div>
+</div>
+<div class="section" id="id171">
+<h5>Overview:<a class="headerlink" href="#id171" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">insertvalue</span></tt>‘ instruction inserts a value into a member field in
+an <a class="reference internal" href="#t-aggregate"><em>aggregate</em></a> value.</p>
+</div>
+<div class="section" id="id172">
+<h5>Arguments:<a class="headerlink" href="#id172" title="Permalink to this headline">¶</a></h5>
+<p>The first operand of an ‘<tt class="docutils literal"><span class="pre">insertvalue</span></tt>‘ instruction is a value of
+<a class="reference internal" href="#t-struct"><em>struct</em></a> or <a class="reference internal" href="#t-array"><em>array</em></a> type. The second operand is
+a first-class value to insert. The following operands are constant
+indices indicating the position at which to insert the value in a
+similar manner as indices in a ‘<tt class="docutils literal"><span class="pre">extractvalue</span></tt>‘ instruction. The value
+to insert must have the same type as the value identified by the
+indices.</p>
+</div>
+<div class="section" id="id173">
+<h5>Semantics:<a class="headerlink" href="#id173" title="Permalink to this headline">¶</a></h5>
+<p>The result is an aggregate of the same type as <tt class="docutils literal"><span class="pre">val</span></tt>. Its value is
+that of <tt class="docutils literal"><span class="pre">val</span></tt> except that the value at the position specified by the
+indices is that of <tt class="docutils literal"><span class="pre">elt</span></tt>.</p>
+</div>
+<div class="section" id="id174">
+<h5>Example:<a class="headerlink" href="#id174" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%agg1</span> <span class="p">=</span> <span class="k">insertvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="kt">float</span><span class="p">}</span> <span class="k">undef</span><span class="p">,</span> <span class="k">i32</span> <span class="m">1</span><span class="p">,</span> <span class="m">0</span>              <span class="c">; yields {i32 1, float undef}</span>
+<span class="nv">%agg2</span> <span class="p">=</span> <span class="k">insertvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="kt">float</span><span class="p">}</span> <span class="nv">%agg1</span><span class="p">,</span> <span class="kt">float</span> <span class="nv">%val</span><span class="p">,</span> <span class="m">1</span>         <span class="c">; yields {i32 1, float %val}</span>
+<span class="nv">%agg3</span> <span class="p">=</span> <span class="k">insertvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="p">{</span><span class="kt">float</span><span class="p">}}</span> <span class="nv">%agg1</span><span class="p">,</span> <span class="kt">float</span> <span class="nv">%val</span><span class="p">,</span> <span class="m">1</span><span class="p">,</span> <span class="m">0</span>    <span class="c">; yields {i32 1, float %val}</span>
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="memory-access-and-addressing-operations">
+<span id="memoryops"></span><h3><a class="toc-backref" href="#id681">Memory Access and Addressing Operations</a><a class="headerlink" href="#memory-access-and-addressing-operations" title="Permalink to this headline">¶</a></h3>
+<p>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.</p>
+<div class="section" id="alloca-instruction">
+<span id="i-alloca"></span><h4><a class="toc-backref" href="#id682">‘<tt class="docutils literal"><span class="pre">alloca</span></tt>‘ Instruction</a><a class="headerlink" href="#alloca-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id175">
+<h5>Syntax:<a class="headerlink" href="#id175" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = alloca <type>[, <ty> <NumElements>][, align <alignment>]     ; yields {type*}:result</pre>
+</div>
+</div>
+<div class="section" id="id176">
+<h5>Overview:<a class="headerlink" href="#id176" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">alloca</span></tt>‘ instruction allocates memory on the stack frame of the
+currently executing function, to be automatically released when this
+function returns to its caller. The object is always allocated in the
+generic address space (address space zero).</p>
+</div>
+<div class="section" id="id177">
+<h5>Arguments:<a class="headerlink" href="#id177" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">alloca</span></tt>‘ instruction allocates <tt class="docutils literal"><span class="pre">sizeof(<type>)*NumElements</span></tt>
+bytes of memory on the runtime stack, returning a pointer of the
+appropriate type to the program. If “NumElements” is specified, it is
+the number of elements allocated, otherwise “NumElements” is defaulted
+to be one. If a constant alignment is specified, the value result of the
+allocation is guaranteed to be aligned to at least that boundary. If not
+specified, or if zero, the target can choose to align the allocation on
+any convenient boundary compatible with the type.</p>
+<p>‘<tt class="docutils literal"><span class="pre">type</span></tt>‘ may be any sized type.</p>
+</div>
+<div class="section" id="id178">
+<h5>Semantics:<a class="headerlink" href="#id178" title="Permalink to this headline">¶</a></h5>
+<p>Memory is allocated; a pointer is returned. The operation is undefined
+if there is insufficient stack space for the allocation. ‘<tt class="docutils literal"><span class="pre">alloca</span></tt>‘d
+memory is automatically released when the function returns. The
+‘<tt class="docutils literal"><span class="pre">alloca</span></tt>‘ instruction is commonly used to represent automatic
+variables that must have an address available. When the function returns
+(either with the <tt class="docutils literal"><span class="pre">ret</span></tt> or <tt class="docutils literal"><span class="pre">resume</span></tt> instructions), the memory is
+reclaimed. Allocating zero bytes is legal, but the result is undefined.
+The order in which memory is allocated (ie., which way the stack grows)
+is not specified.</p>
+</div>
+<div class="section" id="id179">
+<h5>Example:<a class="headerlink" href="#id179" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%ptr</span> <span class="p">=</span> <span class="k">alloca</span> <span class="k">i32</span>                             <span class="c">; yields {i32*}:ptr</span>
+<span class="nv">%ptr</span> <span class="p">=</span> <span class="k">alloca</span> <span class="k">i32</span><span class="p">,</span> <span class="k">i32</span> <span class="m">4</span>                      <span class="c">; yields {i32*}:ptr</span>
+<span class="nv">%ptr</span> <span class="p">=</span> <span class="k">alloca</span> <span class="k">i32</span><span class="p">,</span> <span class="k">i32</span> <span class="m">4</span><span class="p">,</span> <span class="k">align</span> <span class="m">1024</span>          <span class="c">; yields {i32*}:ptr</span>
+<span class="nv">%ptr</span> <span class="p">=</span> <span class="k">alloca</span> <span class="k">i32</span><span class="p">,</span> <span class="k">align</span> <span class="m">1024</span>                 <span class="c">; yields {i32*}:ptr</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="load-instruction">
+<span id="i-load"></span><h4><a class="toc-backref" href="#id683">‘<tt class="docutils literal"><span class="pre">load</span></tt>‘ Instruction</a><a class="headerlink" href="#load-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id180">
+<h5>Syntax:<a class="headerlink" href="#id180" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = load [volatile] <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>][, !invariant.load !<index>]
+<result> = load atomic [volatile] <ty>* <pointer> [singlethread] <ordering>, align <alignment>
+!<index> = !{ i32 1 }</pre>
+</div>
+</div>
+<div class="section" id="id181">
+<h5>Overview:<a class="headerlink" href="#id181" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">load</span></tt>‘ instruction is used to read from memory.</p>
+</div>
+<div class="section" id="id182">
+<h5>Arguments:<a class="headerlink" href="#id182" title="Permalink to this headline">¶</a></h5>
+<p>The argument to the <tt class="docutils literal"><span class="pre">load</span></tt> instruction specifies the memory address
+from which to load. The pointer must point to a <a class="reference internal" href="#t-firstclass"><em>first
+class</em></a> type. If the <tt class="docutils literal"><span class="pre">load</span></tt> is marked as <tt class="docutils literal"><span class="pre">volatile</span></tt>,
+then the optimizer is not allowed to modify the number or order of
+execution of this <tt class="docutils literal"><span class="pre">load</span></tt> with other <a class="reference internal" href="#volatile"><em>volatile
+operations</em></a>.</p>
+<p>If the <tt class="docutils literal"><span class="pre">load</span></tt> is marked as <tt class="docutils literal"><span class="pre">atomic</span></tt>, it takes an extra
+<a class="reference internal" href="#ordering"><em>ordering</em></a> and optional <tt class="docutils literal"><span class="pre">singlethread</span></tt> argument. The
+<tt class="docutils literal"><span class="pre">release</span></tt> and <tt class="docutils literal"><span class="pre">acq_rel</span></tt> orderings are not valid on <tt class="docutils literal"><span class="pre">load</span></tt>
+instructions. Atomic loads produce <a class="reference internal" href="#memmodel"><em>defined</em></a> results
+when they may see multiple atomic stores. The type of the pointee must
+be an integer type whose bit width is a power of two greater than or
+equal to eight and less than or equal to a target-specific size limit.
+<tt class="docutils literal"><span class="pre">align</span></tt> must be explicitly specified on atomic loads, and the load has
+undefined behavior if the alignment is not set to a value which is at
+least the size in bytes of the pointee. <tt class="docutils literal"><span class="pre">!nontemporal</span></tt> does not have
+any defined semantics for atomic loads.</p>
+<p>The optional constant <tt class="docutils literal"><span class="pre">align</span></tt> argument specifies the alignment of the
+operation (that is, the alignment of the memory address). A value of 0
+or an omitted <tt class="docutils literal"><span class="pre">align</span></tt> argument means that the operation has the ABI
+alignment for the target. It is the responsibility of the code emitter
+to ensure that the alignment information is correct. Overestimating the
+alignment results in undefined behavior. Underestimating the alignment
+may produce less efficient code. An alignment of 1 is always safe.</p>
+<p>The optional <tt class="docutils literal"><span class="pre">!nontemporal</span></tt> metadata must reference a single
+metadata name <tt class="docutils literal"><span class="pre"><index></span></tt> corresponding to a metadata node with one
+<tt class="docutils literal"><span class="pre">i32</span></tt> entry of value 1. The existence of the <tt class="docutils literal"><span class="pre">!nontemporal</span></tt>
+metadata on the instruction tells the optimizer and code generator
+that this load is not expected to be reused in the cache. The code
+generator may select special instructions to save cache bandwidth, such
+as the <tt class="docutils literal"><span class="pre">MOVNT</span></tt> instruction on x86.</p>
+<p>The optional <tt class="docutils literal"><span class="pre">!invariant.load</span></tt> metadata must reference a single
+metadata name <tt class="docutils literal"><span class="pre"><index></span></tt> corresponding to a metadata node with no
+entries. The existence of the <tt class="docutils literal"><span class="pre">!invariant.load</span></tt> metadata on the
+instruction tells the optimizer and code generator that this load
+address points to memory which does not change value during program
+execution. The optimizer may then move this load around, for example, by
+hoisting it out of loops using loop invariant code motion.</p>
+</div>
+<div class="section" id="id183">
+<h5>Semantics:<a class="headerlink" href="#id183" title="Permalink to this headline">¶</a></h5>
+<p>The location of memory pointed to is loaded. If the value being loaded
+is of scalar type then the number of bytes read does not exceed the
+minimum number of bytes needed to hold all bits of the type. For
+example, loading an <tt class="docutils literal"><span class="pre">i24</span></tt> reads at most three bytes. When loading a
+value of a type like <tt class="docutils literal"><span class="pre">i20</span></tt> with a size that is not an integral number
+of bytes, the result is undefined if the value was not originally
+written using a store of the same type.</p>
+</div>
+<div class="section" id="id184">
+<h5>Examples:<a class="headerlink" href="#id184" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%ptr</span> <span class="p">=</span> <span class="k">alloca</span> <span class="k">i32</span>                               <span class="c">; yields {i32*}:ptr</span>
+<span class="k">store</span> <span class="k">i32</span> <span class="m">3</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%ptr</span>                          <span class="c">; yields {void}</span>
+<span class="nv">%val</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%ptr</span>                           <span class="c">; yields {i32}:val = i32 3</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="store-instruction">
+<span id="i-store"></span><h4><a class="toc-backref" href="#id684">‘<tt class="docutils literal"><span class="pre">store</span></tt>‘ Instruction</a><a class="headerlink" href="#store-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id185">
+<h5>Syntax:<a class="headerlink" href="#id185" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>store [volatile] <ty> <value>, <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>]        ; yields {void}
+store atomic [volatile] <ty> <value>, <ty>* <pointer> [singlethread] <ordering>, align <alignment>  ; yields {void}</pre>
+</div>
+</div>
+<div class="section" id="id186">
+<h5>Overview:<a class="headerlink" href="#id186" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">store</span></tt>‘ instruction is used to write to memory.</p>
+</div>
+<div class="section" id="id187">
+<h5>Arguments:<a class="headerlink" href="#id187" title="Permalink to this headline">¶</a></h5>
+<p>There are two arguments to the <tt class="docutils literal"><span class="pre">store</span></tt> instruction: a value to store
+and an address at which to store it. The type of the <tt class="docutils literal"><span class="pre"><pointer></span></tt>
+operand must be a pointer to the <a class="reference internal" href="#t-firstclass"><em>first class</em></a> type of
+the <tt class="docutils literal"><span class="pre"><value></span></tt> operand. If the <tt class="docutils literal"><span class="pre">store</span></tt> is marked as <tt class="docutils literal"><span class="pre">volatile</span></tt>,
+then the optimizer is not allowed to modify the number or order of
+execution of this <tt class="docutils literal"><span class="pre">store</span></tt> with other <a class="reference internal" href="#volatile"><em>volatile
+operations</em></a>.</p>
+<p>If the <tt class="docutils literal"><span class="pre">store</span></tt> is marked as <tt class="docutils literal"><span class="pre">atomic</span></tt>, it takes an extra
+<a class="reference internal" href="#ordering"><em>ordering</em></a> and optional <tt class="docutils literal"><span class="pre">singlethread</span></tt> argument. The
+<tt class="docutils literal"><span class="pre">acquire</span></tt> and <tt class="docutils literal"><span class="pre">acq_rel</span></tt> orderings aren’t valid on <tt class="docutils literal"><span class="pre">store</span></tt>
+instructions. Atomic loads produce <a class="reference internal" href="#memmodel"><em>defined</em></a> results
+when they may see multiple atomic stores. The type of the pointee must
+be an integer type whose bit width is a power of two greater than or
+equal to eight and less than or equal to a target-specific size limit.
+<tt class="docutils literal"><span class="pre">align</span></tt> must be explicitly specified on atomic stores, and the store
+has undefined behavior if the alignment is not set to a value which is
+at least the size in bytes of the pointee. <tt class="docutils literal"><span class="pre">!nontemporal</span></tt> does not
+have any defined semantics for atomic stores.</p>
+<p>The optional constant <tt class="docutils literal"><span class="pre">align</span></tt> argument specifies the alignment of the
+operation (that is, the alignment of the memory address). A value of 0
+or an omitted <tt class="docutils literal"><span class="pre">align</span></tt> argument means that the operation has the ABI
+alignment for the target. It is the responsibility of the code emitter
+to ensure that the alignment information is correct. Overestimating the
+alignment results in undefined behavior. Underestimating the
+alignment may produce less efficient code. An alignment of 1 is always
+safe.</p>
+<p>The optional <tt class="docutils literal"><span class="pre">!nontemporal</span></tt> metadata must reference a single metadata
+name <tt class="docutils literal"><span class="pre"><index></span></tt> corresponding to a metadata node with one <tt class="docutils literal"><span class="pre">i32</span></tt> entry of
+value 1. The existence of the <tt class="docutils literal"><span class="pre">!nontemporal</span></tt> metadata on the instruction
+tells the optimizer and code generator that this load is not expected to
+be reused in the cache. The code generator may select special
+instructions to save cache bandwidth, such as the MOVNT instruction on
+x86.</p>
+</div>
+<div class="section" id="id188">
+<h5>Semantics:<a class="headerlink" href="#id188" title="Permalink to this headline">¶</a></h5>
+<p>The contents of memory are updated to contain <tt class="docutils literal"><span class="pre"><value></span></tt> at the
+location specified by the <tt class="docutils literal"><span class="pre"><pointer></span></tt> operand. If <tt class="docutils literal"><span class="pre"><value></span></tt> is
+of scalar type then the number of bytes written does not exceed the
+minimum number of bytes needed to hold all bits of the type. For
+example, storing an <tt class="docutils literal"><span class="pre">i24</span></tt> writes at most three bytes. When writing a
+value of a type like <tt class="docutils literal"><span class="pre">i20</span></tt> with a size that is not an integral number
+of bytes, it is unspecified what happens to the extra bits that do not
+belong to the type, but they will typically be overwritten.</p>
+</div>
+<div class="section" id="id189">
+<h5>Example:<a class="headerlink" href="#id189" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%ptr</span> <span class="p">=</span> <span class="k">alloca</span> <span class="k">i32</span>                               <span class="c">; yields {i32*}:ptr</span>
+<span class="k">store</span> <span class="k">i32</span> <span class="m">3</span><span class="p">,</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%ptr</span>                          <span class="c">; yields {void}</span>
+<span class="nv">%val</span> <span class="p">=</span> <span class="k">load</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%ptr</span>                           <span class="c">; yields {i32}:val = i32 3</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="fence-instruction">
+<span id="i-fence"></span><h4><a class="toc-backref" href="#id685">‘<tt class="docutils literal"><span class="pre">fence</span></tt>‘ Instruction</a><a class="headerlink" href="#fence-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id190">
+<h5>Syntax:<a class="headerlink" href="#id190" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>fence [singlethread] <ordering>                   ; yields {void}</pre>
+</div>
+</div>
+<div class="section" id="id191">
+<h5>Overview:<a class="headerlink" href="#id191" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fence</span></tt>‘ instruction is used to introduce happens-before edges
+between operations.</p>
+</div>
+<div class="section" id="id192">
+<h5>Arguments:<a class="headerlink" href="#id192" title="Permalink to this headline">¶</a></h5>
+<p>‘<tt class="docutils literal"><span class="pre">fence</span></tt>‘ instructions take an <a class="reference internal" href="#ordering"><em>ordering</em></a> argument which
+defines what <em>synchronizes-with</em> edges they add. They can only be given
+<tt class="docutils literal"><span class="pre">acquire</span></tt>, <tt class="docutils literal"><span class="pre">release</span></tt>, <tt class="docutils literal"><span class="pre">acq_rel</span></tt>, and <tt class="docutils literal"><span class="pre">seq_cst</span></tt> orderings.</p>
+</div>
+<div class="section" id="id193">
+<h5>Semantics:<a class="headerlink" href="#id193" title="Permalink to this headline">¶</a></h5>
+<p>A fence A which has (at least) <tt class="docutils literal"><span class="pre">release</span></tt> ordering semantics
+<em>synchronizes with</em> a fence B with (at least) <tt class="docutils literal"><span class="pre">acquire</span></tt> ordering
+semantics if and only if there exist atomic operations X and Y, both
+operating on some atomic object M, such that A is sequenced before X, X
+modifies M (either directly or through some side effect of a sequence
+headed by X), Y is sequenced before B, and Y observes M. This provides a
+<em>happens-before</em> dependency between A and B. Rather than an explicit
+<tt class="docutils literal"><span class="pre">fence</span></tt>, one (but not both) of the atomic operations X or Y might
+provide a <tt class="docutils literal"><span class="pre">release</span></tt> or <tt class="docutils literal"><span class="pre">acquire</span></tt> (resp.) ordering constraint and
+still <em>synchronize-with</em> the explicit <tt class="docutils literal"><span class="pre">fence</span></tt> and establish the
+<em>happens-before</em> edge.</p>
+<p>A <tt class="docutils literal"><span class="pre">fence</span></tt> which has <tt class="docutils literal"><span class="pre">seq_cst</span></tt> ordering, in addition to having both
+<tt class="docutils literal"><span class="pre">acquire</span></tt> and <tt class="docutils literal"><span class="pre">release</span></tt> semantics specified above, participates in
+the global program order of other <tt class="docutils literal"><span class="pre">seq_cst</span></tt> operations and/or fences.</p>
+<p>The optional “<a class="reference internal" href="#singlethread"><em>singlethread</em></a>” argument specifies
+that the fence only synchronizes with other fences in the same thread.
+(This is useful for interacting with signal handlers.)</p>
+</div>
+<div class="section" id="id194">
+<h5>Example:<a class="headerlink" href="#id194" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>fence acquire                          ; yields {void}
+fence singlethread seq_cst             ; yields {void}</pre>
+</div>
+</div>
+</div>
+<div class="section" id="cmpxchg-instruction">
+<span id="i-cmpxchg"></span><h4><a class="toc-backref" href="#id686">‘<tt class="docutils literal"><span class="pre">cmpxchg</span></tt>‘ Instruction</a><a class="headerlink" href="#cmpxchg-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id195">
+<h5>Syntax:<a class="headerlink" href="#id195" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>cmpxchg [volatile] <ty>* <pointer>, <ty> <cmp>, <ty> <new> [singlethread] <ordering>  ; yields {ty}</pre>
+</div>
+</div>
+<div class="section" id="id196">
+<h5>Overview:<a class="headerlink" href="#id196" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">cmpxchg</span></tt>‘ instruction is used to atomically modify memory. It
+loads a value in memory and compares it to a given value. If they are
+equal, it stores a new value into the memory.</p>
+</div>
+<div class="section" id="id197">
+<h5>Arguments:<a class="headerlink" href="#id197" title="Permalink to this headline">¶</a></h5>
+<p>There are three arguments to the ‘<tt class="docutils literal"><span class="pre">cmpxchg</span></tt>‘ instruction: an address
+to operate on, a value to compare to the value currently be at that
+address, and a new value to place at that address if the compared values
+are equal. The type of ‘<cmp>’ must be an integer type whose bit width
+is a power of two greater than or equal to eight and less than or equal
+to a target-specific size limit. ‘<cmp>’ and ‘<new>’ must have the same
+type, and the type of ‘<pointer>’ must be a pointer to that type. If the
+<tt class="docutils literal"><span class="pre">cmpxchg</span></tt> is marked as <tt class="docutils literal"><span class="pre">volatile</span></tt>, then the optimizer is not allowed
+to modify the number or order of execution of this <tt class="docutils literal"><span class="pre">cmpxchg</span></tt> with
+other <a class="reference internal" href="#volatile"><em>volatile operations</em></a>.</p>
+<p>The <a class="reference internal" href="#ordering"><em>ordering</em></a> argument specifies how this <tt class="docutils literal"><span class="pre">cmpxchg</span></tt>
+synchronizes with other atomic operations.</p>
+<p>The optional “<tt class="docutils literal"><span class="pre">singlethread</span></tt>” argument declares that the <tt class="docutils literal"><span class="pre">cmpxchg</span></tt>
+is only atomic with respect to code (usually signal handlers) running in
+the same thread as the <tt class="docutils literal"><span class="pre">cmpxchg</span></tt>. Otherwise the cmpxchg is atomic with
+respect to all other code in the system.</p>
+<p>The pointer passed into cmpxchg must have alignment greater than or
+equal to the size in memory of the operand.</p>
+</div>
+<div class="section" id="id198">
+<h5>Semantics:<a class="headerlink" href="#id198" title="Permalink to this headline">¶</a></h5>
+<p>The contents of memory at the location specified by the ‘<tt class="docutils literal"><span class="pre"><pointer></span></tt>‘
+operand is read and compared to ‘<tt class="docutils literal"><span class="pre"><cmp></span></tt>‘; if the read value is the
+equal, ‘<tt class="docutils literal"><span class="pre"><new></span></tt>‘ is written. The original value at the location is
+returned.</p>
+<p>A successful <tt class="docutils literal"><span class="pre">cmpxchg</span></tt> is a read-modify-write instruction for the purpose
+of identifying release sequences. A failed <tt class="docutils literal"><span class="pre">cmpxchg</span></tt> is equivalent to an
+atomic load with an ordering parameter determined by dropping any
+<tt class="docutils literal"><span class="pre">release</span></tt> part of the <tt class="docutils literal"><span class="pre">cmpxchg</span></tt>‘s ordering.</p>
+</div>
+<div class="section" id="id199">
+<h5>Example:<a class="headerlink" href="#id199" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>entry:
+  %orig = atomic load i32* %ptr unordered                   ; yields {i32}
+  br label %loop
+
+loop:
+  %cmp = phi i32 [ %orig, %entry ], [%old, %loop]
+  %squared = mul i32 %cmp, %cmp
+  %old = cmpxchg i32* %ptr, i32 %cmp, i32 %squared          ; yields {i32}
+  %success = icmp eq i32 %cmp, %old
+  br i1 %success, label %done, label %loop
+
+done:
+  ...</pre>
+</div>
+</div>
+</div>
+<div class="section" id="atomicrmw-instruction">
+<span id="i-atomicrmw"></span><h4><a class="toc-backref" href="#id687">‘<tt class="docutils literal"><span class="pre">atomicrmw</span></tt>‘ Instruction</a><a class="headerlink" href="#atomicrmw-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id200">
+<h5>Syntax:<a class="headerlink" href="#id200" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>atomicrmw [volatile] <operation> <ty>* <pointer>, <ty> <value> [singlethread] <ordering>                   ; yields {ty}</pre>
+</div>
+</div>
+<div class="section" id="id201">
+<h5>Overview:<a class="headerlink" href="#id201" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">atomicrmw</span></tt>‘ instruction is used to atomically modify memory.</p>
+</div>
+<div class="section" id="id202">
+<h5>Arguments:<a class="headerlink" href="#id202" title="Permalink to this headline">¶</a></h5>
+<p>There are three arguments to the ‘<tt class="docutils literal"><span class="pre">atomicrmw</span></tt>‘ instruction: an
+operation to apply, an address whose value to modify, an argument to the
+operation. The operation must be one of the following keywords:</p>
+<ul class="simple">
+<li>xchg</li>
+<li>add</li>
+<li>sub</li>
+<li>and</li>
+<li>nand</li>
+<li>or</li>
+<li>xor</li>
+<li>max</li>
+<li>min</li>
+<li>umax</li>
+<li>umin</li>
+</ul>
+<p>The type of ‘<value>’ must be an integer type whose bit width is a power
+of two greater than or equal to eight and less than or equal to a
+target-specific size limit. The type of the ‘<tt class="docutils literal"><span class="pre"><pointer></span></tt>‘ operand must
+be a pointer to that type. If the <tt class="docutils literal"><span class="pre">atomicrmw</span></tt> is marked as
+<tt class="docutils literal"><span class="pre">volatile</span></tt>, then the optimizer is not allowed to modify the number or
+order of execution of this <tt class="docutils literal"><span class="pre">atomicrmw</span></tt> with other <a class="reference internal" href="#volatile"><em>volatile
+operations</em></a>.</p>
+</div>
+<div class="section" id="id203">
+<h5>Semantics:<a class="headerlink" href="#id203" title="Permalink to this headline">¶</a></h5>
+<p>The contents of memory at the location specified by the ‘<tt class="docutils literal"><span class="pre"><pointer></span></tt>‘
+operand are atomically read, modified, and written back. The original
+value at the location is returned. The modification is specified by the
+operation argument:</p>
+<ul class="simple">
+<li>xchg: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">val</span></tt></li>
+<li>add: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">*ptr</span> <span class="pre">+</span> <span class="pre">val</span></tt></li>
+<li>sub: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">*ptr</span> <span class="pre">-</span> <span class="pre">val</span></tt></li>
+<li>and: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">*ptr</span> <span class="pre">&</span> <span class="pre">val</span></tt></li>
+<li>nand: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">~(*ptr</span> <span class="pre">&</span> <span class="pre">val)</span></tt></li>
+<li>or: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">*ptr</span> <span class="pre">|</span> <span class="pre">val</span></tt></li>
+<li>xor: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">*ptr</span> <span class="pre">^</span> <span class="pre">val</span></tt></li>
+<li>max: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">*ptr</span> <span class="pre">></span> <span class="pre">val</span> <span class="pre">?</span> <span class="pre">*ptr</span> <span class="pre">:</span> <span class="pre">val</span></tt> (using a signed comparison)</li>
+<li>min: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">*ptr</span> <span class="pre"><</span> <span class="pre">val</span> <span class="pre">?</span> <span class="pre">*ptr</span> <span class="pre">:</span> <span class="pre">val</span></tt> (using a signed comparison)</li>
+<li>umax: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">*ptr</span> <span class="pre">></span> <span class="pre">val</span> <span class="pre">?</span> <span class="pre">*ptr</span> <span class="pre">:</span> <span class="pre">val</span></tt> (using an unsigned
+comparison)</li>
+<li>umin: <tt class="docutils literal"><span class="pre">*ptr</span> <span class="pre">=</span> <span class="pre">*ptr</span> <span class="pre"><</span> <span class="pre">val</span> <span class="pre">?</span> <span class="pre">*ptr</span> <span class="pre">:</span> <span class="pre">val</span></tt> (using an unsigned
+comparison)</li>
+</ul>
+</div>
+<div class="section" id="id204">
+<h5>Example:<a class="headerlink" href="#id204" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>%old = atomicrmw add i32* %ptr, i32 1 acquire                        ; yields {i32}</pre>
+</div>
+</div>
+</div>
+<div class="section" id="getelementptr-instruction">
+<span id="i-getelementptr"></span><h4><a class="toc-backref" href="#id688">‘<tt class="docutils literal"><span class="pre">getelementptr</span></tt>‘ Instruction</a><a class="headerlink" href="#getelementptr-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id205">
+<h5>Syntax:<a class="headerlink" href="#id205" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = getelementptr <pty>* <ptrval>{, <ty> <idx>}*
+<result> = getelementptr inbounds <pty>* <ptrval>{, <ty> <idx>}*
+<result> = getelementptr <ptr vector> ptrval, <vector index type> idx</pre>
+</div>
+</div>
+<div class="section" id="id206">
+<h5>Overview:<a class="headerlink" href="#id206" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">getelementptr</span></tt>‘ instruction is used to get the address of a
+subelement of an <a class="reference internal" href="#t-aggregate"><em>aggregate</em></a> data structure. It performs
+address calculation only and does not access memory.</p>
+</div>
+<div class="section" id="id207">
+<h5>Arguments:<a class="headerlink" href="#id207" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is always a pointer or a vector of pointers, and
+forms the basis of the calculation. The remaining arguments are indices
+that indicate which of the elements of the aggregate object are indexed.
+The interpretation of each index is dependent on the type being indexed
+into. The first index always indexes the pointer value given as the
+first argument, the second index indexes a value of the type pointed to
+(not necessarily the value directly pointed to, since the first index
+can be non-zero), etc. The first type indexed into must be a pointer
+value, subsequent types can be arrays, vectors, and structs. Note that
+subsequent types being indexed into can never be pointers, since that
+would require loading the pointer before continuing calculation.</p>
+<p>The type of each index argument depends on the type it is indexing into.
+When indexing into a (optionally packed) structure, only <tt class="docutils literal"><span class="pre">i32</span></tt> integer
+<strong>constants</strong> are allowed (when using a vector of indices they must all
+be the <strong>same</strong> <tt class="docutils literal"><span class="pre">i32</span></tt> integer constant). When indexing into an array,
+pointer or vector, integers of any width are allowed, and they are not
+required to be constant. These integers are treated as signed values
+where relevant.</p>
+<p>For example, let’s consider a C code fragment and how it gets compiled
+to LLVM:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="k">struct</span> <span class="n">RT</span> <span class="p">{</span>
+  <span class="kt">char</span> <span class="n">A</span><span class="p">;</span>
+  <span class="kt">int</span> <span class="n">B</span><span class="p">[</span><span class="mi">10</span><span class="p">][</span><span class="mi">20</span><span class="p">];</span>
+  <span class="kt">char</span> <span class="n">C</span><span class="p">;</span>
+<span class="p">};</span>
+<span class="k">struct</span> <span class="n">ST</span> <span class="p">{</span>
+  <span class="kt">int</span> <span class="n">X</span><span class="p">;</span>
+  <span class="kt">double</span> <span class="n">Y</span><span class="p">;</span>
+  <span class="k">struct</span> <span class="n">RT</span> <span class="n">Z</span><span class="p">;</span>
+<span class="p">};</span>
+
+<span class="kt">int</span> <span class="o">*</span><span class="nf">foo</span><span class="p">(</span><span class="k">struct</span> <span class="n">ST</span> <span class="o">*</span><span class="n">s</span><span class="p">)</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="o">&</span><span class="n">s</span><span class="p">[</span><span class="mi">1</span><span class="p">].</span><span class="n">Z</span><span class="p">.</span><span class="n">B</span><span class="p">[</span><span class="mi">5</span><span class="p">][</span><span class="mi">13</span><span class="p">];</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>The LLVM code generated by Clang is:</p>
+<div class="highlight-llvm"><pre>%struct.RT = type { i8, [10 x [20 x i32]], i8 }
+%struct.ST = type { i32, double, %struct.RT }
+
+define i32* @foo(%struct.ST* %s) nounwind uwtable readnone optsize ssp {
+entry:
+  %arrayidx = getelementptr inbounds %struct.ST* %s, i64 1, i32 2, i32 1, i64 5, i64 13
+  ret i32* %arrayidx
+}</pre>
+</div>
+</div>
+<div class="section" id="id208">
+<h5>Semantics:<a class="headerlink" href="#id208" title="Permalink to this headline">¶</a></h5>
+<p>In the example above, the first index is indexing into the
+‘<tt class="docutils literal"><span class="pre">%struct.ST*</span></tt>‘ type, which is a pointer, yielding a ‘<tt class="docutils literal"><span class="pre">%struct.ST</span></tt>‘
+= ‘<tt class="docutils literal"><span class="pre">{</span> <span class="pre">i32,</span> <span class="pre">double,</span> <span class="pre">%struct.RT</span> <span class="pre">}</span></tt>‘ type, a structure. The second index
+indexes into the third element of the structure, yielding a
+‘<tt class="docutils literal"><span class="pre">%struct.RT</span></tt>‘ = ‘<tt class="docutils literal"><span class="pre">{</span> <span class="pre">i8</span> <span class="pre">,</span> <span class="pre">[10</span> <span class="pre">x</span> <span class="pre">[20</span> <span class="pre">x</span> <span class="pre">i32]],</span> <span class="pre">i8</span> <span class="pre">}</span></tt>‘ type, another
+structure. The third index indexes into the second element of the
+structure, yielding a ‘<tt class="docutils literal"><span class="pre">[10</span> <span class="pre">x</span> <span class="pre">[20</span> <span class="pre">x</span> <span class="pre">i32]]</span></tt>‘ type, an array. The two
+dimensions of the array are subscripted into, yielding an ‘<tt class="docutils literal"><span class="pre">i32</span></tt>‘
+type. The ‘<tt class="docutils literal"><span class="pre">getelementptr</span></tt>‘ instruction returns a pointer to this
+element, thus computing a value of ‘<tt class="docutils literal"><span class="pre">i32*</span></tt>‘ type.</p>
+<p>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:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">define</span> <span class="k">i32</span><span class="p">*</span> <span class="vg">@foo</span><span class="p">(</span><span class="nv">%struct.ST</span><span class="p">*</span> <span class="nv">%s</span><span class="p">)</span> <span class="p">{</span>
+  <span class="nv">%t1</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="nv">%struct.ST</span><span class="p">*</span> <span class="nv">%s</span><span class="p">,</span> <span class="k">i32</span> <span class="m">1</span>                 <span class="c">; yields %struct.ST*:%t1</span>
+  <span class="nv">%t2</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="nv">%struct.ST</span><span class="p">*</span> <span class="nv">%t1</span><span class="p">,</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span> <span class="m">2</span>         <span class="c">; yields %struct.RT*:%t2</span>
+  <span class="nv">%t3</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="nv">%struct.RT</span><span class="p">*</span> <span class="nv">%t2</span><span class="p">,</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span> <span class="m">1</span>         <span class="c">; yields [10 x [20 x i32]]*:%t3</span>
+  <span class="nv">%t4</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="p">[</span><span class="m">10</span> <span class="k">x</span> <span class="p">[</span><span class="m">20</span> <span class="k">x</span> <span class="k">i32</span><span class="p">]]*</span> <span class="nv">%t3</span><span class="p">,</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span> <span class="m">5</span>  <span class="c">; yields [20 x i32]*:%t4</span>
+  <span class="nv">%t5</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="p">[</span><span class="m">20</span> <span class="k">x</span> <span class="k">i32</span><span class="p">]*</span> <span class="nv">%t4</span><span class="p">,</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span> <span class="m">13</span>        <span class="c">; yields i32*:%t5</span>
+  <span class="k">ret</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%t5</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>If the <tt class="docutils literal"><span class="pre">inbounds</span></tt> keyword is present, the result value of the
+<tt class="docutils literal"><span class="pre">getelementptr</span></tt> is a <a class="reference internal" href="#poisonvalues"><em>poison value</em></a> if the base
+pointer is not an <em>in bounds</em> address of an allocated object, or if any
+of the addresses that would be formed by successive addition of the
+offsets implied by the indices to the base address with infinitely
+precise signed arithmetic are not an <em>in bounds</em> address of that
+allocated object. The <em>in bounds</em> addresses for an allocated object are
+all the addresses that point into the object, plus the address one byte
+past the end. In cases where the base is a vector of pointers the
+<tt class="docutils literal"><span class="pre">inbounds</span></tt> keyword applies to each of the computations element-wise.</p>
+<p>If the <tt class="docutils literal"><span class="pre">inbounds</span></tt> keyword is not present, the offsets are added to the
+base address with silently-wrapping two’s complement arithmetic. If the
+offsets have a different width from the pointer, they are sign-extended
+or truncated to the width of the pointer. The result value of the
+<tt class="docutils literal"><span class="pre">getelementptr</span></tt> may be outside the object pointed to by the base
+pointer. The result value may not necessarily be used to access memory
+though, even if it happens to point into allocated storage. See the
+<a class="reference internal" href="#pointeraliasing"><em>Pointer Aliasing Rules</em></a> section for more
+information.</p>
+<p>The getelementptr instruction is often confusing. For some more insight
+into how it works, see <a class="reference internal" href="GetElementPtr.html"><em>the getelementptr FAQ</em></a>.</p>
+</div>
+<div class="section" id="id209">
+<h5>Example:<a class="headerlink" href="#id209" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="c">; yields [12 x i8]*:aptr</span>
+<span class="nv">%aptr</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="p">[</span><span class="m">12</span> <span class="k">x</span> <span class="k">i8</span><span class="p">]}*</span> <span class="nv">%saptr</span><span class="p">,</span> <span class="k">i64</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span> <span class="m">1</span>
+<span class="c">; yields i8*:vptr</span>
+<span class="nv">%vptr</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="p"><</span><span class="m">2</span> <span class="k">x</span> <span class="k">i8</span><span class="p">>}*</span> <span class="nv">%svptr</span><span class="p">,</span> <span class="k">i64</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span> <span class="m">1</span><span class="p">,</span> <span class="k">i32</span> <span class="m">1</span>
+<span class="c">; yields i8*:eptr</span>
+<span class="nv">%eptr</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="p">[</span><span class="m">12</span> <span class="k">x</span> <span class="k">i8</span><span class="p">]*</span> <span class="nv">%aptr</span><span class="p">,</span> <span class="k">i64</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span> <span class="m">1</span>
+<span class="c">; yields i32*:iptr</span>
+<span class="nv">%iptr</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="p">[</span><span class="m">10</span> <span class="k">x</span> <span class="k">i32</span><span class="p">]*</span> <span class="vg">@arr</span><span class="p">,</span> <span class="k">i16</span> <span class="m">0</span><span class="p">,</span> <span class="k">i16</span> <span class="m">0</span>
+</pre></div>
+</div>
+<p>In cases where the pointer argument is a vector of pointers, each index
+must be a vector with the same number of elements. For example:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%A</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="p"><</span><span class="m">4</span> <span class="k">x</span> <span class="k">i8</span><span class="p">*></span> <span class="nv">%ptrs</span><span class="p">,</span> <span class="p"><</span><span class="m">4</span> <span class="k">x</span> <span class="k">i64</span><span class="p">></span> <span class="nv">%offsets</span><span class="p">,</span>
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="conversion-operations">
+<h3><a class="toc-backref" href="#id689">Conversion Operations</a><a class="headerlink" href="#conversion-operations" title="Permalink to this headline">¶</a></h3>
+<p>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.</p>
+<div class="section" id="trunc-to-instruction">
+<h4><a class="toc-backref" href="#id690">‘<tt class="docutils literal"><span class="pre">trunc</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#trunc-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id210">
+<h5>Syntax:<a class="headerlink" href="#id210" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = trunc <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id211">
+<h5>Overview:<a class="headerlink" href="#id211" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">trunc</span></tt>‘ instruction truncates its operand to the type <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id212">
+<h5>Arguments:<a class="headerlink" href="#id212" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">trunc</span></tt>‘ instruction takes a value to trunc, and a type to trunc
+it to. Both types must be of <a class="reference internal" href="#t-integer"><em>integer</em></a> types, or vectors
+of the same number of integers. The bit size of the <tt class="docutils literal"><span class="pre">value</span></tt> must be
+larger than the bit size of the destination type, <tt class="docutils literal"><span class="pre">ty2</span></tt>. Equal sized
+types are not allowed.</p>
+</div>
+<div class="section" id="id213">
+<h5>Semantics:<a class="headerlink" href="#id213" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">trunc</span></tt>‘ instruction truncates the high order bits in <tt class="docutils literal"><span class="pre">value</span></tt>
+and converts the remaining bits to <tt class="docutils literal"><span class="pre">ty2</span></tt>. Since the source size must
+be larger than the destination size, <tt class="docutils literal"><span class="pre">trunc</span></tt> cannot be a <em>no-op cast</em>.
+It will always truncate bits.</p>
+</div>
+<div class="section" id="id214">
+<h5>Example:<a class="headerlink" href="#id214" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">trunc</span> <span class="k">i32</span> <span class="m">257</span> <span class="k">to</span> <span class="k">i8</span>                        <span class="c">; yields i8:1</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">trunc</span> <span class="k">i32</span> <span class="m">123</span> <span class="k">to</span> <span class="k">i1</span>                        <span class="c">; yields i1:true</span>
+<span class="nv">%Z</span> <span class="p">=</span> <span class="k">trunc</span> <span class="k">i32</span> <span class="m">122</span> <span class="k">to</span> <span class="k">i1</span>                        <span class="c">; yields i1:false</span>
+<span class="nv">%W</span> <span class="p">=</span> <span class="k">trunc</span> <span class="p"><</span><span class="m">2</span> <span class="k">x</span> <span class="k">i16</span><span class="p">></span> <span class="p"><</span><span class="k">i16</span> <span class="m">8</span><span class="p">,</span> <span class="k">i16</span> <span class="m">7</span><span class="p">></span> <span class="k">to</span> <span class="p"><</span><span class="m">2</span> <span class="k">x</span> <span class="k">i8</span><span class="p">></span> <span class="c">; yields <i8 8, i8 7></span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="zext-to-instruction">
+<h4><a class="toc-backref" href="#id691">‘<tt class="docutils literal"><span class="pre">zext</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#zext-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id215">
+<h5>Syntax:<a class="headerlink" href="#id215" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = zext <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id216">
+<h5>Overview:<a class="headerlink" href="#id216" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">zext</span></tt>‘ instruction zero extends its operand to type <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id217">
+<h5>Arguments:<a class="headerlink" href="#id217" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">zext</span></tt>‘ instruction takes a value to cast, and a type to cast it
+to. Both types must be of <a class="reference internal" href="#t-integer"><em>integer</em></a> types, or vectors of
+the same number of integers. The bit size of the <tt class="docutils literal"><span class="pre">value</span></tt> must be
+smaller than the bit size of the destination type, <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id218">
+<h5>Semantics:<a class="headerlink" href="#id218" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">zext</span></tt> fills the high order bits of the <tt class="docutils literal"><span class="pre">value</span></tt> with zero bits
+until it reaches the size of the destination type, <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+<p>When zero extending from i1, the result will always be either 0 or 1.</p>
+</div>
+<div class="section" id="id219">
+<h5>Example:<a class="headerlink" href="#id219" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">zext</span> <span class="k">i32</span> <span class="m">257</span> <span class="k">to</span> <span class="k">i64</span>              <span class="c">; yields i64:257</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">zext</span> <span class="k">i1</span> <span class="k">true</span> <span class="k">to</span> <span class="k">i32</span>              <span class="c">; yields i32:1</span>
+<span class="nv">%Z</span> <span class="p">=</span> <span class="k">zext</span> <span class="p"><</span><span class="m">2</span> <span class="k">x</span> <span class="k">i16</span><span class="p">></span> <span class="p"><</span><span class="k">i16</span> <span class="m">8</span><span class="p">,</span> <span class="k">i16</span> <span class="m">7</span><span class="p">></span> <span class="k">to</span> <span class="p"><</span><span class="m">2</span> <span class="k">x</span> <span class="k">i32</span><span class="p">></span> <span class="c">; yields <i32 8, i32 7></span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="sext-to-instruction">
+<h4><a class="toc-backref" href="#id692">‘<tt class="docutils literal"><span class="pre">sext</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#sext-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id220">
+<h5>Syntax:<a class="headerlink" href="#id220" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = sext <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id221">
+<h5>Overview:<a class="headerlink" href="#id221" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">sext</span></tt>‘ sign extends <tt class="docutils literal"><span class="pre">value</span></tt> to the type <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id222">
+<h5>Arguments:<a class="headerlink" href="#id222" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">sext</span></tt>‘ instruction takes a value to cast, and a type to cast it
+to. Both types must be of <a class="reference internal" href="#t-integer"><em>integer</em></a> types, or vectors of
+the same number of integers. The bit size of the <tt class="docutils literal"><span class="pre">value</span></tt> must be
+smaller than the bit size of the destination type, <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id223">
+<h5>Semantics:<a class="headerlink" href="#id223" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">sext</span></tt>‘ instruction performs a sign extension by copying the sign
+bit (highest order bit) of the <tt class="docutils literal"><span class="pre">value</span></tt> until it reaches the bit size
+of the type <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+<p>When sign extending from i1, the extension always results in -1 or 0.</p>
+</div>
+<div class="section" id="id224">
+<h5>Example:<a class="headerlink" href="#id224" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">sext</span> <span class="k">i8</span>  <span class="m">-1</span> <span class="k">to</span> <span class="k">i16</span>              <span class="c">; yields i16   :65535</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">sext</span> <span class="k">i1</span> <span class="k">true</span> <span class="k">to</span> <span class="k">i32</span>             <span class="c">; yields i32:-1</span>
+<span class="nv">%Z</span> <span class="p">=</span> <span class="k">sext</span> <span class="p"><</span><span class="m">2</span> <span class="k">x</span> <span class="k">i16</span><span class="p">></span> <span class="p"><</span><span class="k">i16</span> <span class="m">8</span><span class="p">,</span> <span class="k">i16</span> <span class="m">7</span><span class="p">></span> <span class="k">to</span> <span class="p"><</span><span class="m">2</span> <span class="k">x</span> <span class="k">i32</span><span class="p">></span> <span class="c">; yields <i32 8, i32 7></span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="fptrunc-to-instruction">
+<h4><a class="toc-backref" href="#id693">‘<tt class="docutils literal"><span class="pre">fptrunc</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#fptrunc-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id225">
+<h5>Syntax:<a class="headerlink" href="#id225" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = fptrunc <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id226">
+<h5>Overview:<a class="headerlink" href="#id226" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fptrunc</span></tt>‘ instruction truncates <tt class="docutils literal"><span class="pre">value</span></tt> to type <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id227">
+<h5>Arguments:<a class="headerlink" href="#id227" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fptrunc</span></tt>‘ instruction takes a <a class="reference internal" href="#t-floating"><em>floating point</em></a>
+value to cast and a <a class="reference internal" href="#t-floating"><em>floating point</em></a> type to cast it to.
+The size of <tt class="docutils literal"><span class="pre">value</span></tt> must be larger than the size of <tt class="docutils literal"><span class="pre">ty2</span></tt>. This
+implies that <tt class="docutils literal"><span class="pre">fptrunc</span></tt> cannot be used to make a <em>no-op cast</em>.</p>
+</div>
+<div class="section" id="id228">
+<h5>Semantics:<a class="headerlink" href="#id228" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fptrunc</span></tt>‘ instruction truncates a <tt class="docutils literal"><span class="pre">value</span></tt> from a larger
+<a class="reference internal" href="#t-floating"><em>floating point</em></a> type to a smaller <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> type. If the value cannot fit within the
+destination type, <tt class="docutils literal"><span class="pre">ty2</span></tt>, then the results are undefined.</p>
+</div>
+<div class="section" id="id229">
+<h5>Example:<a class="headerlink" href="#id229" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">fptrunc</span> <span class="kt">double</span> <span class="m">123.0</span> <span class="k">to</span> <span class="kt">float</span>         <span class="c">; yields float:123.0</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">fptrunc</span> <span class="kt">double</span> <span class="m">1.0E+300</span> <span class="k">to</span> <span class="kt">float</span>      <span class="c">; yields undefined</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="fpext-to-instruction">
+<h4><a class="toc-backref" href="#id694">‘<tt class="docutils literal"><span class="pre">fpext</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#fpext-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id230">
+<h5>Syntax:<a class="headerlink" href="#id230" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = fpext <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id231">
+<h5>Overview:<a class="headerlink" href="#id231" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fpext</span></tt>‘ extends a floating point <tt class="docutils literal"><span class="pre">value</span></tt> to a larger floating
+point value.</p>
+</div>
+<div class="section" id="id232">
+<h5>Arguments:<a class="headerlink" href="#id232" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fpext</span></tt>‘ instruction takes a <a class="reference internal" href="#t-floating"><em>floating point</em></a>
+<tt class="docutils literal"><span class="pre">value</span></tt> to cast, and a <a class="reference internal" href="#t-floating"><em>floating point</em></a> type to cast it
+to. The source type must be smaller than the destination type.</p>
+</div>
+<div class="section" id="id233">
+<h5>Semantics:<a class="headerlink" href="#id233" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fpext</span></tt>‘ instruction extends the <tt class="docutils literal"><span class="pre">value</span></tt> from a smaller
+<a class="reference internal" href="#t-floating"><em>floating point</em></a> type to a larger <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> type. The <tt class="docutils literal"><span class="pre">fpext</span></tt> cannot be used to make a
+<em>no-op cast</em> because it always changes bits. Use <tt class="docutils literal"><span class="pre">bitcast</span></tt> to make a
+<em>no-op cast</em> for a floating point cast.</p>
+</div>
+<div class="section" id="id234">
+<h5>Example:<a class="headerlink" href="#id234" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">fpext</span> <span class="kt">float</span> <span class="m">3.125</span> <span class="k">to</span> <span class="kt">double</span>         <span class="c">; yields double:3.125000e+00</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">fpext</span> <span class="kt">double</span> <span class="nv">%X</span> <span class="k">to</span> <span class="kt">fp128</span>            <span class="c">; yields fp128:0xL00000000000000004000900000000000</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="fptoui-to-instruction">
+<h4><a class="toc-backref" href="#id695">‘<tt class="docutils literal"><span class="pre">fptoui</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#fptoui-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id235">
+<h5>Syntax:<a class="headerlink" href="#id235" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = fptoui <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id236">
+<h5>Overview:<a class="headerlink" href="#id236" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fptoui</span></tt>‘ converts a floating point <tt class="docutils literal"><span class="pre">value</span></tt> to its unsigned
+integer equivalent of type <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id237">
+<h5>Arguments:<a class="headerlink" href="#id237" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fptoui</span></tt>‘ instruction takes a value to cast, which must be a
+scalar or vector <a class="reference internal" href="#t-floating"><em>floating point</em></a> value, and a type to
+cast it to <tt class="docutils literal"><span class="pre">ty2</span></tt>, which must be an <a class="reference internal" href="#t-integer"><em>integer</em></a> type. If
+<tt class="docutils literal"><span class="pre">ty</span></tt> is a vector floating point type, <tt class="docutils literal"><span class="pre">ty2</span></tt> must be a vector integer
+type with the same number of elements as <tt class="docutils literal"><span class="pre">ty</span></tt></p>
+</div>
+<div class="section" id="id238">
+<h5>Semantics:<a class="headerlink" href="#id238" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fptoui</span></tt>‘ instruction converts its <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> operand into the nearest (rounding towards zero)
+unsigned integer value. If the value cannot fit in <tt class="docutils literal"><span class="pre">ty2</span></tt>, the results
+are undefined.</p>
+</div>
+<div class="section" id="id239">
+<h5>Example:<a class="headerlink" href="#id239" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>%X = fptoui double 123.0 to i32      ; yields i32:123
+%Y = fptoui float 1.0E+300 to i1     ; yields undefined:1
+%Z = fptoui float 1.04E+17 to i8     ; yields undefined:1</pre>
+</div>
+</div>
+</div>
+<div class="section" id="fptosi-to-instruction">
+<h4><a class="toc-backref" href="#id696">‘<tt class="docutils literal"><span class="pre">fptosi</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#fptosi-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id240">
+<h5>Syntax:<a class="headerlink" href="#id240" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = fptosi <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id241">
+<h5>Overview:<a class="headerlink" href="#id241" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fptosi</span></tt>‘ instruction converts <a class="reference internal" href="#t-floating"><em>floating point</em></a>
+<tt class="docutils literal"><span class="pre">value</span></tt> to type <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id242">
+<h5>Arguments:<a class="headerlink" href="#id242" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fptosi</span></tt>‘ instruction takes a value to cast, which must be a
+scalar or vector <a class="reference internal" href="#t-floating"><em>floating point</em></a> value, and a type to
+cast it to <tt class="docutils literal"><span class="pre">ty2</span></tt>, which must be an <a class="reference internal" href="#t-integer"><em>integer</em></a> type. If
+<tt class="docutils literal"><span class="pre">ty</span></tt> is a vector floating point type, <tt class="docutils literal"><span class="pre">ty2</span></tt> must be a vector integer
+type with the same number of elements as <tt class="docutils literal"><span class="pre">ty</span></tt></p>
+</div>
+<div class="section" id="id243">
+<h5>Semantics:<a class="headerlink" href="#id243" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fptosi</span></tt>‘ instruction converts its <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> operand into the nearest (rounding towards zero)
+signed integer value. If the value cannot fit in <tt class="docutils literal"><span class="pre">ty2</span></tt>, the results
+are undefined.</p>
+</div>
+<div class="section" id="id244">
+<h5>Example:<a class="headerlink" href="#id244" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>%X = fptosi double -123.0 to i32      ; yields i32:-123
+%Y = fptosi float 1.0E-247 to i1      ; yields undefined:1
+%Z = fptosi float 1.04E+17 to i8      ; yields undefined:1</pre>
+</div>
+</div>
+</div>
+<div class="section" id="uitofp-to-instruction">
+<h4><a class="toc-backref" href="#id697">‘<tt class="docutils literal"><span class="pre">uitofp</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#uitofp-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id245">
+<h5>Syntax:<a class="headerlink" href="#id245" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = uitofp <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id246">
+<h5>Overview:<a class="headerlink" href="#id246" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">uitofp</span></tt>‘ instruction regards <tt class="docutils literal"><span class="pre">value</span></tt> as an unsigned integer
+and converts that value to the <tt class="docutils literal"><span class="pre">ty2</span></tt> type.</p>
+</div>
+<div class="section" id="id247">
+<h5>Arguments:<a class="headerlink" href="#id247" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">uitofp</span></tt>‘ instruction takes a value to cast, which must be a
+scalar or vector <a class="reference internal" href="#t-integer"><em>integer</em></a> value, and a type to cast it to
+<tt class="docutils literal"><span class="pre">ty2</span></tt>, which must be an <a class="reference internal" href="#t-floating"><em>floating point</em></a> type. If
+<tt class="docutils literal"><span class="pre">ty</span></tt> is a vector integer type, <tt class="docutils literal"><span class="pre">ty2</span></tt> must be a vector floating point
+type with the same number of elements as <tt class="docutils literal"><span class="pre">ty</span></tt></p>
+</div>
+<div class="section" id="id248">
+<h5>Semantics:<a class="headerlink" href="#id248" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">uitofp</span></tt>‘ instruction interprets its operand as an unsigned
+integer quantity and converts it to the corresponding floating point
+value. If the value cannot fit in the floating point value, the results
+are undefined.</p>
+</div>
+<div class="section" id="id249">
+<h5>Example:<a class="headerlink" href="#id249" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">uitofp</span> <span class="k">i32</span> <span class="m">257</span> <span class="k">to</span> <span class="kt">float</span>         <span class="c">; yields float:257.0</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">uitofp</span> <span class="k">i8</span> <span class="m">-1</span> <span class="k">to</span> <span class="kt">double</span>          <span class="c">; yields double:255.0</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="sitofp-to-instruction">
+<h4><a class="toc-backref" href="#id698">‘<tt class="docutils literal"><span class="pre">sitofp</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#sitofp-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id250">
+<h5>Syntax:<a class="headerlink" href="#id250" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = sitofp <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id251">
+<h5>Overview:<a class="headerlink" href="#id251" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">sitofp</span></tt>‘ instruction regards <tt class="docutils literal"><span class="pre">value</span></tt> as a signed integer and
+converts that value to the <tt class="docutils literal"><span class="pre">ty2</span></tt> type.</p>
+</div>
+<div class="section" id="id252">
+<h5>Arguments:<a class="headerlink" href="#id252" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">sitofp</span></tt>‘ instruction takes a value to cast, which must be a
+scalar or vector <a class="reference internal" href="#t-integer"><em>integer</em></a> value, and a type to cast it to
+<tt class="docutils literal"><span class="pre">ty2</span></tt>, which must be an <a class="reference internal" href="#t-floating"><em>floating point</em></a> type. If
+<tt class="docutils literal"><span class="pre">ty</span></tt> is a vector integer type, <tt class="docutils literal"><span class="pre">ty2</span></tt> must be a vector floating point
+type with the same number of elements as <tt class="docutils literal"><span class="pre">ty</span></tt></p>
+</div>
+<div class="section" id="id253">
+<h5>Semantics:<a class="headerlink" href="#id253" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">sitofp</span></tt>‘ instruction interprets its operand as a signed integer
+quantity and converts it to the corresponding floating point value. If
+the value cannot fit in the floating point value, the results are
+undefined.</p>
+</div>
+<div class="section" id="id254">
+<h5>Example:<a class="headerlink" href="#id254" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">sitofp</span> <span class="k">i32</span> <span class="m">257</span> <span class="k">to</span> <span class="kt">float</span>         <span class="c">; yields float:257.0</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">sitofp</span> <span class="k">i8</span> <span class="m">-1</span> <span class="k">to</span> <span class="kt">double</span>          <span class="c">; yields double:-1.0</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="ptrtoint-to-instruction">
+<span id="i-ptrtoint"></span><h4><a class="toc-backref" href="#id699">‘<tt class="docutils literal"><span class="pre">ptrtoint</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#ptrtoint-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id255">
+<h5>Syntax:<a class="headerlink" href="#id255" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = ptrtoint <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id256">
+<h5>Overview:<a class="headerlink" href="#id256" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">ptrtoint</span></tt>‘ instruction converts the pointer or a vector of
+pointers <tt class="docutils literal"><span class="pre">value</span></tt> to the integer (or vector of integers) type <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id257">
+<h5>Arguments:<a class="headerlink" href="#id257" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">ptrtoint</span></tt>‘ instruction takes a <tt class="docutils literal"><span class="pre">value</span></tt> to cast, which must be
+a a value of type <a class="reference internal" href="#t-pointer"><em>pointer</em></a> or a vector of pointers, and a
+type to cast it to <tt class="docutils literal"><span class="pre">ty2</span></tt>, which must be an <a class="reference internal" href="#t-integer"><em>integer</em></a> or
+a vector of integers type.</p>
+</div>
+<div class="section" id="id258">
+<h5>Semantics:<a class="headerlink" href="#id258" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">ptrtoint</span></tt>‘ instruction converts <tt class="docutils literal"><span class="pre">value</span></tt> to integer type
+<tt class="docutils literal"><span class="pre">ty2</span></tt> by interpreting the pointer value as an integer and either
+truncating or zero extending that value to the size of the integer type.
+If <tt class="docutils literal"><span class="pre">value</span></tt> is smaller than <tt class="docutils literal"><span class="pre">ty2</span></tt> then a zero extension is done. If
+<tt class="docutils literal"><span class="pre">value</span></tt> is larger than <tt class="docutils literal"><span class="pre">ty2</span></tt> then a truncation is done. If they are
+the same size, then nothing is done (<em>no-op cast</em>) other than a type
+change.</p>
+</div>
+<div class="section" id="id259">
+<h5>Example:<a class="headerlink" href="#id259" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">ptrtoint</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%P</span> <span class="k">to</span> <span class="k">i8</span>                         <span class="c">; yields truncation on 32-bit architecture</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">ptrtoint</span> <span class="k">i32</span><span class="p">*</span> <span class="nv">%P</span> <span class="k">to</span> <span class="k">i64</span>                        <span class="c">; yields zero extension on 32-bit architecture</span>
+<span class="nv">%Z</span> <span class="p">=</span> <span class="k">ptrtoint</span> <span class="p"><</span><span class="m">4</span> <span class="k">x</span> <span class="k">i32</span><span class="p">*></span> <span class="nv">%P</span> <span class="k">to</span> <span class="p"><</span><span class="m">4</span> <span class="k">x</span> <span class="k">i64</span><span class="p">></span><span class="c">; yields vector zero extension for a vector of addresses on 32-bit architecture</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="inttoptr-to-instruction">
+<span id="i-inttoptr"></span><h4><a class="toc-backref" href="#id700">‘<tt class="docutils literal"><span class="pre">inttoptr</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#inttoptr-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id260">
+<h5>Syntax:<a class="headerlink" href="#id260" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = inttoptr <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id261">
+<h5>Overview:<a class="headerlink" href="#id261" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">inttoptr</span></tt>‘ instruction converts an integer <tt class="docutils literal"><span class="pre">value</span></tt> to a
+pointer type, <tt class="docutils literal"><span class="pre">ty2</span></tt>.</p>
+</div>
+<div class="section" id="id262">
+<h5>Arguments:<a class="headerlink" href="#id262" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">inttoptr</span></tt>‘ instruction takes an <a class="reference internal" href="#t-integer"><em>integer</em></a> value to
+cast, and a type to cast it to, which must be a <a class="reference internal" href="#t-pointer"><em>pointer</em></a>
+type.</p>
+</div>
+<div class="section" id="id263">
+<h5>Semantics:<a class="headerlink" href="#id263" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">inttoptr</span></tt>‘ instruction converts <tt class="docutils literal"><span class="pre">value</span></tt> to type <tt class="docutils literal"><span class="pre">ty2</span></tt> by
+applying either a zero extension or a truncation depending on the size
+of the integer <tt class="docutils literal"><span class="pre">value</span></tt>. If <tt class="docutils literal"><span class="pre">value</span></tt> is larger than the size of a
+pointer then a truncation is done. If <tt class="docutils literal"><span class="pre">value</span></tt> is smaller than the size
+of a pointer then a zero extension is done. If they are the same size,
+nothing is done (<em>no-op cast</em>).</p>
+</div>
+<div class="section" id="id264">
+<h5>Example:<a class="headerlink" href="#id264" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">inttoptr</span> <span class="k">i32</span> <span class="m">255</span> <span class="k">to</span> <span class="k">i32</span><span class="p">*</span>          <span class="c">; yields zero extension on 64-bit architecture</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">inttoptr</span> <span class="k">i32</span> <span class="m">255</span> <span class="k">to</span> <span class="k">i32</span><span class="p">*</span>          <span class="c">; yields no-op on 32-bit architecture</span>
+<span class="nv">%Z</span> <span class="p">=</span> <span class="k">inttoptr</span> <span class="k">i64</span> <span class="m">0</span> <span class="k">to</span> <span class="k">i32</span><span class="p">*</span>            <span class="c">; yields truncation on 32-bit architecture</span>
+<span class="nv">%Z</span> <span class="p">=</span> <span class="k">inttoptr</span> <span class="p"><</span><span class="m">4</span> <span class="k">x</span> <span class="k">i32</span><span class="p">></span> <span class="nv">%G</span> <span class="k">to</span> <span class="p"><</span><span class="m">4</span> <span class="k">x</span> <span class="k">i8</span><span class="p">*></span><span class="c">; yields truncation of vector G to four pointers</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="bitcast-to-instruction">
+<span id="i-bitcast"></span><h4><a class="toc-backref" href="#id701">‘<tt class="docutils literal"><span class="pre">bitcast</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#bitcast-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id265">
+<h5>Syntax:<a class="headerlink" href="#id265" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = bitcast <ty> <value> to <ty2>             ; yields ty2</pre>
+</div>
+</div>
+<div class="section" id="id266">
+<h5>Overview:<a class="headerlink" href="#id266" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">bitcast</span></tt>‘ instruction converts <tt class="docutils literal"><span class="pre">value</span></tt> to type <tt class="docutils literal"><span class="pre">ty2</span></tt> without
+changing any bits.</p>
+</div>
+<div class="section" id="id267">
+<h5>Arguments:<a class="headerlink" href="#id267" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">bitcast</span></tt>‘ instruction takes a value to cast, which must be a
+non-aggregate first class value, and a type to cast it to, which must
+also be a non-aggregate <a class="reference internal" href="#t-firstclass"><em>first class</em></a> type. The
+bit sizes of <tt class="docutils literal"><span class="pre">value</span></tt> and the destination type, <tt class="docutils literal"><span class="pre">ty2</span></tt>, must be
+identical.  If the source type is a pointer, the destination type must
+also be a pointer of the same size. This instruction supports bitwise
+conversion of vectors to integers and to vectors of other types (as
+long as they have the same size).</p>
+</div>
+<div class="section" id="id268">
+<h5>Semantics:<a class="headerlink" href="#id268" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">bitcast</span></tt>‘ instruction converts <tt class="docutils literal"><span class="pre">value</span></tt> to type <tt class="docutils literal"><span class="pre">ty2</span></tt>. It
+is always a <em>no-op cast</em> because no bits change with this
+conversion. The conversion is done as if the <tt class="docutils literal"><span class="pre">value</span></tt> had been stored
+to memory and read back as type <tt class="docutils literal"><span class="pre">ty2</span></tt>. Pointer (or vector of
+pointers) types may only be converted to other pointer (or vector of
+pointers) types with the same address space through this instruction.
+To convert pointers to other types, use the <a class="reference internal" href="#i-inttoptr"><em>inttoptr</em></a>
+or <a class="reference internal" href="#i-ptrtoint"><em>ptrtoint</em></a> instructions first.</p>
+</div>
+<div class="section" id="id269">
+<h5>Example:<a class="headerlink" href="#id269" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>%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 i32*> %V to <2 x i64*> ; yields <2 x i64*></pre>
+</div>
+</div>
+</div>
+<div class="section" id="addrspacecast-to-instruction">
+<span id="i-addrspacecast"></span><h4><a class="toc-backref" href="#id702">‘<tt class="docutils literal"><span class="pre">addrspacecast</span> <span class="pre">..</span> <span class="pre">to</span></tt>‘ Instruction</a><a class="headerlink" href="#addrspacecast-to-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id270">
+<h5>Syntax:<a class="headerlink" href="#id270" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = addrspacecast <pty> <ptrval> to <pty2>       ; yields pty2</pre>
+</div>
+</div>
+<div class="section" id="id271">
+<h5>Overview:<a class="headerlink" href="#id271" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">addrspacecast</span></tt>‘ instruction converts <tt class="docutils literal"><span class="pre">ptrval</span></tt> from <tt class="docutils literal"><span class="pre">pty</span></tt> in
+address space <tt class="docutils literal"><span class="pre">n</span></tt> to type <tt class="docutils literal"><span class="pre">pty2</span></tt> in address space <tt class="docutils literal"><span class="pre">m</span></tt>.</p>
+</div>
+<div class="section" id="id272">
+<h5>Arguments:<a class="headerlink" href="#id272" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">addrspacecast</span></tt>‘ instruction takes a pointer or vector of pointer value
+to cast and a pointer type to cast it to, which must have a different
+address space.</p>
+</div>
+<div class="section" id="id273">
+<h5>Semantics:<a class="headerlink" href="#id273" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">addrspacecast</span></tt>‘ instruction converts the pointer value
+<tt class="docutils literal"><span class="pre">ptrval</span></tt> to type <tt class="docutils literal"><span class="pre">pty2</span></tt>. It can be a <em>no-op cast</em> or a complex
+value modification, depending on the target and the address space
+pair. Pointer conversions within the same address space must be
+performed with the <tt class="docutils literal"><span class="pre">bitcast</span></tt> instruction. Note that if the address space
+conversion is legal then both result and operand refer to the same memory
+location.</p>
+</div>
+<div class="section" id="id274">
+<h5>Example:<a class="headerlink" href="#id274" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>%X = addrspacecast i32* %x to i32 addrspace(1)*    ; yields i32 addrspace(1)*:%x
+%Y = addrspacecast i32 addrspace(1)* %y to i64 addrspace(2)*    ; yields i64 addrspace(2)*:%y
+%Z = addrspacecast <4 x i32*> %z to <4 x float addrspace(3)*>   ; yields <4 x float addrspace(3)*>:%z</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="other-operations">
+<span id="otherops"></span><h3><a class="toc-backref" href="#id703">Other Operations</a><a class="headerlink" href="#other-operations" title="Permalink to this headline">¶</a></h3>
+<p>The instructions in this category are the “miscellaneous” instructions,
+which defy better classification.</p>
+<div class="section" id="icmp-instruction">
+<span id="i-icmp"></span><h4><a class="toc-backref" href="#id704">‘<tt class="docutils literal"><span class="pre">icmp</span></tt>‘ Instruction</a><a class="headerlink" href="#icmp-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id275">
+<h5>Syntax:<a class="headerlink" href="#id275" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = icmp <cond> <ty> <op1>, <op2>   ; yields {i1} or {<N x i1>}:result</pre>
+</div>
+</div>
+<div class="section" id="id276">
+<h5>Overview:<a class="headerlink" href="#id276" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">icmp</span></tt>‘ instruction returns a boolean value or a vector of
+boolean values based on comparison of its two integer, integer vector,
+pointer, or pointer vector operands.</p>
+</div>
+<div class="section" id="id277">
+<h5>Arguments:<a class="headerlink" href="#id277" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">icmp</span></tt>‘ 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:</p>
+<ol class="arabic simple">
+<li><tt class="docutils literal"><span class="pre">eq</span></tt>: equal</li>
+<li><tt class="docutils literal"><span class="pre">ne</span></tt>: not equal</li>
+<li><tt class="docutils literal"><span class="pre">ugt</span></tt>: unsigned greater than</li>
+<li><tt class="docutils literal"><span class="pre">uge</span></tt>: unsigned greater or equal</li>
+<li><tt class="docutils literal"><span class="pre">ult</span></tt>: unsigned less than</li>
+<li><tt class="docutils literal"><span class="pre">ule</span></tt>: unsigned less or equal</li>
+<li><tt class="docutils literal"><span class="pre">sgt</span></tt>: signed greater than</li>
+<li><tt class="docutils literal"><span class="pre">sge</span></tt>: signed greater or equal</li>
+<li><tt class="docutils literal"><span class="pre">slt</span></tt>: signed less than</li>
+<li><tt class="docutils literal"><span class="pre">sle</span></tt>: signed less or equal</li>
+</ol>
+<p>The remaining two arguments must be <a class="reference internal" href="#t-integer"><em>integer</em></a> or
+<a class="reference internal" href="#t-pointer"><em>pointer</em></a> or integer <a class="reference internal" href="#t-vector"><em>vector</em></a> typed. They
+must also be identical types.</p>
+</div>
+<div class="section" id="id278">
+<h5>Semantics:<a class="headerlink" href="#id278" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">icmp</span></tt>‘ compares <tt class="docutils literal"><span class="pre">op1</span></tt> and <tt class="docutils literal"><span class="pre">op2</span></tt> according to the condition
+code given as <tt class="docutils literal"><span class="pre">cond</span></tt>. The comparison performed always yields either an
+<a class="reference internal" href="#t-integer"><em>i1</em></a> or vector of <tt class="docutils literal"><span class="pre">i1</span></tt> result, as follows:</p>
+<ol class="arabic simple">
+<li><tt class="docutils literal"><span class="pre">eq</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if the operands are equal, <tt class="docutils literal"><span class="pre">false</span></tt>
+otherwise. No sign interpretation is necessary or performed.</li>
+<li><tt class="docutils literal"><span class="pre">ne</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if the operands are unequal, <tt class="docutils literal"><span class="pre">false</span></tt>
+otherwise. No sign interpretation is necessary or performed.</li>
+<li><tt class="docutils literal"><span class="pre">ugt</span></tt>: interprets the operands as unsigned values and yields
+<tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">op1</span></tt> is greater than <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">uge</span></tt>: interprets the operands as unsigned values and yields
+<tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">op1</span></tt> is greater than or equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">ult</span></tt>: interprets the operands as unsigned values and yields
+<tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">op1</span></tt> is less than <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">ule</span></tt>: interprets the operands as unsigned values and yields
+<tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">op1</span></tt> is less than or equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">sgt</span></tt>: interprets the operands as signed values and yields <tt class="docutils literal"><span class="pre">true</span></tt>
+if <tt class="docutils literal"><span class="pre">op1</span></tt> is greater than <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">sge</span></tt>: interprets the operands as signed values and yields <tt class="docutils literal"><span class="pre">true</span></tt>
+if <tt class="docutils literal"><span class="pre">op1</span></tt> is greater than or equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">slt</span></tt>: interprets the operands as signed values and yields <tt class="docutils literal"><span class="pre">true</span></tt>
+if <tt class="docutils literal"><span class="pre">op1</span></tt> is less than <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">sle</span></tt>: interprets the operands as signed values and yields <tt class="docutils literal"><span class="pre">true</span></tt>
+if <tt class="docutils literal"><span class="pre">op1</span></tt> is less than or equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+</ol>
+<p>If the operands are <a class="reference internal" href="#t-pointer"><em>pointer</em></a> typed, the pointer values
+are compared as if they were integers.</p>
+<p>If the operands are integer vectors, then they are compared element by
+element. The result is an <tt class="docutils literal"><span class="pre">i1</span></tt> vector with the same number of elements
+as the values being compared. Otherwise, the result is an <tt class="docutils literal"><span class="pre">i1</span></tt>.</p>
+</div>
+<div class="section" id="id279">
+<h5>Example:<a class="headerlink" href="#id279" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><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</pre>
+</div>
+<p>Note that the code generator does not yet support vector types with the
+<tt class="docutils literal"><span class="pre">icmp</span></tt> instruction.</p>
+</div>
+</div>
+<div class="section" id="fcmp-instruction">
+<span id="i-fcmp"></span><h4><a class="toc-backref" href="#id705">‘<tt class="docutils literal"><span class="pre">fcmp</span></tt>‘ Instruction</a><a class="headerlink" href="#fcmp-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id280">
+<h5>Syntax:<a class="headerlink" href="#id280" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = fcmp <cond> <ty> <op1>, <op2>     ; yields {i1} or {<N x i1>}:result</pre>
+</div>
+</div>
+<div class="section" id="id281">
+<h5>Overview:<a class="headerlink" href="#id281" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fcmp</span></tt>‘ instruction returns a boolean value or vector of boolean
+values based on comparison of its operands.</p>
+<p>If the operands are floating point scalars, then the result type is a
+boolean (<a class="reference internal" href="#t-integer"><em>i1</em></a>).</p>
+<p>If the operands are floating point vectors, then the result type is a
+vector of boolean with the same number of elements as the operands being
+compared.</p>
+</div>
+<div class="section" id="id282">
+<h5>Arguments:<a class="headerlink" href="#id282" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fcmp</span></tt>‘ 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:</p>
+<ol class="arabic simple">
+<li><tt class="docutils literal"><span class="pre">false</span></tt>: no comparison, always returns false</li>
+<li><tt class="docutils literal"><span class="pre">oeq</span></tt>: ordered and equal</li>
+<li><tt class="docutils literal"><span class="pre">ogt</span></tt>: ordered and greater than</li>
+<li><tt class="docutils literal"><span class="pre">oge</span></tt>: ordered and greater than or equal</li>
+<li><tt class="docutils literal"><span class="pre">olt</span></tt>: ordered and less than</li>
+<li><tt class="docutils literal"><span class="pre">ole</span></tt>: ordered and less than or equal</li>
+<li><tt class="docutils literal"><span class="pre">one</span></tt>: ordered and not equal</li>
+<li><tt class="docutils literal"><span class="pre">ord</span></tt>: ordered (no nans)</li>
+<li><tt class="docutils literal"><span class="pre">ueq</span></tt>: unordered or equal</li>
+<li><tt class="docutils literal"><span class="pre">ugt</span></tt>: unordered or greater than</li>
+<li><tt class="docutils literal"><span class="pre">uge</span></tt>: unordered or greater than or equal</li>
+<li><tt class="docutils literal"><span class="pre">ult</span></tt>: unordered or less than</li>
+<li><tt class="docutils literal"><span class="pre">ule</span></tt>: unordered or less than or equal</li>
+<li><tt class="docutils literal"><span class="pre">une</span></tt>: unordered or not equal</li>
+<li><tt class="docutils literal"><span class="pre">uno</span></tt>: unordered (either nans)</li>
+<li><tt class="docutils literal"><span class="pre">true</span></tt>: no comparison, always returns true</li>
+</ol>
+<p><em>Ordered</em> means that neither operand is a QNAN while <em>unordered</em> means
+that either operand may be a QNAN.</p>
+<p>Each of <tt class="docutils literal"><span class="pre">val1</span></tt> and <tt class="docutils literal"><span class="pre">val2</span></tt> arguments must be either a <a class="reference internal" href="#t-floating"><em>floating
+point</em></a> type or a <a class="reference internal" href="#t-vector"><em>vector</em></a> of floating point
+type. They must have identical types.</p>
+</div>
+<div class="section" id="id283">
+<h5>Semantics:<a class="headerlink" href="#id283" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">fcmp</span></tt>‘ instruction compares <tt class="docutils literal"><span class="pre">op1</span></tt> and <tt class="docutils literal"><span class="pre">op2</span></tt> according to the
+condition code given as <tt class="docutils literal"><span class="pre">cond</span></tt>. If the operands are vectors, then the
+vectors are compared element by element. Each comparison performed
+always yields an <a class="reference internal" href="#t-integer"><em>i1</em></a> result, as follows:</p>
+<ol class="arabic simple">
+<li><tt class="docutils literal"><span class="pre">false</span></tt>: always yields <tt class="docutils literal"><span class="pre">false</span></tt>, regardless of operands.</li>
+<li><tt class="docutils literal"><span class="pre">oeq</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if both operands are not a QNAN and <tt class="docutils literal"><span class="pre">op1</span></tt>
+is equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">ogt</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if both operands are not a QNAN and <tt class="docutils literal"><span class="pre">op1</span></tt>
+is greater than <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">oge</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if both operands are not a QNAN and <tt class="docutils literal"><span class="pre">op1</span></tt>
+is greater than or equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">olt</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if both operands are not a QNAN and <tt class="docutils literal"><span class="pre">op1</span></tt>
+is less than <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">ole</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if both operands are not a QNAN and <tt class="docutils literal"><span class="pre">op1</span></tt>
+is less than or equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">one</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if both operands are not a QNAN and <tt class="docutils literal"><span class="pre">op1</span></tt>
+is not equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">ord</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if both operands are not a QNAN.</li>
+<li><tt class="docutils literal"><span class="pre">ueq</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if either operand is a QNAN or <tt class="docutils literal"><span class="pre">op1</span></tt> is
+equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">ugt</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if either operand is a QNAN or <tt class="docutils literal"><span class="pre">op1</span></tt> is
+greater than <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">uge</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if either operand is a QNAN or <tt class="docutils literal"><span class="pre">op1</span></tt> is
+greater than or equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">ult</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if either operand is a QNAN or <tt class="docutils literal"><span class="pre">op1</span></tt> is
+less than <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">ule</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if either operand is a QNAN or <tt class="docutils literal"><span class="pre">op1</span></tt> is
+less than or equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">une</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if either operand is a QNAN or <tt class="docutils literal"><span class="pre">op1</span></tt> is
+not equal to <tt class="docutils literal"><span class="pre">op2</span></tt>.</li>
+<li><tt class="docutils literal"><span class="pre">uno</span></tt>: yields <tt class="docutils literal"><span class="pre">true</span></tt> if either operand is a QNAN.</li>
+<li><tt class="docutils literal"><span class="pre">true</span></tt>: always yields <tt class="docutils literal"><span class="pre">true</span></tt>, regardless of operands.</li>
+</ol>
+</div>
+<div class="section" id="id284">
+<h5>Example:<a class="headerlink" href="#id284" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre><result> = fcmp oeq float 4.0, 5.0    ; yields: result=false
+<result> = fcmp one float 4.0, 5.0    ; yields: result=true
+<result> = fcmp olt float 4.0, 5.0    ; yields: result=true
+<result> = fcmp ueq double 1.0, 2.0   ; yields: result=false</pre>
+</div>
+<p>Note that the code generator does not yet support vector types with the
+<tt class="docutils literal"><span class="pre">fcmp</span></tt> instruction.</p>
+</div>
+</div>
+<div class="section" id="phi-instruction">
+<span id="i-phi"></span><h4><a class="toc-backref" href="#id706">‘<tt class="docutils literal"><span class="pre">phi</span></tt>‘ Instruction</a><a class="headerlink" href="#phi-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id285">
+<h5>Syntax:<a class="headerlink" href="#id285" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = phi <ty> [ <val0>, <label0>], ...</pre>
+</div>
+</div>
+<div class="section" id="id286">
+<h5>Overview:<a class="headerlink" href="#id286" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">phi</span></tt>‘ instruction is used to implement the φ node in the SSA
+graph representing the function.</p>
+</div>
+<div class="section" id="id287">
+<h5>Arguments:<a class="headerlink" href="#id287" title="Permalink to this headline">¶</a></h5>
+<p>The type of the incoming values is specified with the first type field.
+After this, the ‘<tt class="docutils literal"><span class="pre">phi</span></tt>‘ instruction takes a list of pairs as
+arguments, with one pair for each predecessor basic block of the current
+block. Only values of <a class="reference internal" href="#t-firstclass"><em>first class</em></a> type may be used as
+the value arguments to the PHI node. Only labels may be used as the
+label arguments.</p>
+<p>There must be no non-phi instructions between the start of a basic block
+and the PHI instructions: i.e. PHI instructions must be first in a basic
+block.</p>
+<p>For the purposes of the SSA form, the use of each incoming value is
+deemed to occur on the edge from the corresponding predecessor block to
+the current block (but after any definition of an ‘<tt class="docutils literal"><span class="pre">invoke</span></tt>‘
+instruction’s return value on the same edge).</p>
+</div>
+<div class="section" id="id288">
+<h5>Semantics:<a class="headerlink" href="#id288" title="Permalink to this headline">¶</a></h5>
+<p>At runtime, the ‘<tt class="docutils literal"><span class="pre">phi</span></tt>‘ instruction logically takes on the value
+specified by the pair corresponding to the predecessor basic block that
+executed just prior to the current block.</p>
+</div>
+<div class="section" id="id289">
+<h5>Example:<a class="headerlink" href="#id289" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nl">Loop:</span>       <span class="c">; Infinite loop that counts from 0 on up...</span>
+  <span class="nv">%indvar</span> <span class="p">=</span> <span class="k">phi</span> <span class="k">i32</span> <span class="p">[</span> <span class="m">0</span><span class="p">,</span> <span class="nv">%LoopHeader</span> <span class="p">],</span> <span class="p">[</span> <span class="nv">%nextindvar</span><span class="p">,</span> <span class="nv">%Loop</span> <span class="p">]</span>
+  <span class="nv">%nextindvar</span> <span class="p">=</span> <span class="k">add</span> <span class="k">i32</span> <span class="nv">%indvar</span><span class="p">,</span> <span class="m">1</span>
+  <span class="k">br</span> <span class="kt">label</span> <span class="nv">%Loop</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="select-instruction">
+<span id="i-select"></span><h4><a class="toc-backref" href="#id707">‘<tt class="docutils literal"><span class="pre">select</span></tt>‘ Instruction</a><a class="headerlink" href="#select-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id290">
+<h5>Syntax:<a class="headerlink" href="#id290" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = select selty <cond>, <ty> <val1>, <ty> <val2>             ; yields ty
+
+selty is either i1 or {<N x i1>}</pre>
+</div>
+</div>
+<div class="section" id="id291">
+<h5>Overview:<a class="headerlink" href="#id291" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">select</span></tt>‘ instruction is used to choose one value based on a
+condition, without branching.</p>
+</div>
+<div class="section" id="id292">
+<h5>Arguments:<a class="headerlink" href="#id292" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">select</span></tt>‘ instruction requires an ‘i1’ value or a vector of ‘i1’
+values indicating the condition, and two values of the same <a class="reference internal" href="#t-firstclass"><em>first
+class</em></a> type. If the val1/val2 are vectors and the
+condition is a scalar, then entire vectors are selected, not individual
+elements.</p>
+</div>
+<div class="section" id="id293">
+<h5>Semantics:<a class="headerlink" href="#id293" title="Permalink to this headline">¶</a></h5>
+<p>If the condition is an i1 and it evaluates to 1, the instruction returns
+the first value argument; otherwise, it returns the second value
+argument.</p>
+<p>If the condition is a vector of i1, then the value arguments must be
+vectors of the same size, and the selection is done element by element.</p>
+</div>
+<div class="section" id="id294">
+<h5>Example:<a class="headerlink" href="#id294" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%X</span> <span class="p">=</span> <span class="k">select</span> <span class="k">i1</span> <span class="k">true</span><span class="p">,</span> <span class="k">i8</span> <span class="m">17</span><span class="p">,</span> <span class="k">i8</span> <span class="m">42</span>          <span class="c">; yields i8:17</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="call-instruction">
+<span id="i-call"></span><h4><a class="toc-backref" href="#id708">‘<tt class="docutils literal"><span class="pre">call</span></tt>‘ Instruction</a><a class="headerlink" href="#call-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id295">
+<h5>Syntax:<a class="headerlink" href="#id295" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><result> = [tail] call [cconv] [ret attrs] <ty> [<fnty>*] <fnptrval>(<function args>) [fn attrs]</pre>
+</div>
+</div>
+<div class="section" id="id296">
+<h5>Overview:<a class="headerlink" href="#id296" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">call</span></tt>‘ instruction represents a simple function call.</p>
+</div>
+<div class="section" id="id297">
+<h5>Arguments:<a class="headerlink" href="#id297" title="Permalink to this headline">¶</a></h5>
+<p>This instruction requires several arguments:</p>
+<ol class="arabic simple">
+<li>The optional “tail” marker indicates that the callee function does
+not access any allocas or varargs in the caller. Note that calls may
+be marked “tail” even if they do not occur before a
+<a class="reference internal" href="#i-ret"><em>ret</em></a> instruction. If the “tail” marker is present, the
+function call is eligible for tail call optimization, but <a class="reference external" href="CodeGenerator.html#tailcallopt">might not
+in fact be optimized into a jump</a>.
+The code generator may optimize calls marked “tail” with either 1)
+automatic <a class="reference external" href="CodeGenerator.html#sibcallopt">sibling call
+optimization</a> when the caller and
+callee have matching signatures, or 2) forced tail call optimization
+when the following extra requirements are met:<ul>
+<li>Caller and callee both have the calling convention <tt class="docutils literal"><span class="pre">fastcc</span></tt>.</li>
+<li>The call is in tail position (ret immediately follows call and ret
+uses value of call or is void).</li>
+<li>Option <tt class="docutils literal"><span class="pre">-tailcallopt</span></tt> is enabled, or
+<tt class="docutils literal"><span class="pre">llvm::GuaranteedTailCallOpt</span></tt> is <tt class="docutils literal"><span class="pre">true</span></tt>.</li>
+<li><a class="reference external" href="CodeGenerator.html#tailcallopt">Platform specific constraints are
+met.</a></li>
+</ul>
+</li>
+<li>The optional “cconv” marker indicates which <a class="reference internal" href="#callingconv"><em>calling
+convention</em></a> the call should use. If none is
+specified, the call defaults to using C calling conventions. The
+calling convention of the call must match the calling convention of
+the target function, or else the behavior is undefined.</li>
+<li>The optional <a class="reference internal" href="#paramattrs"><em>Parameter Attributes</em></a> list for return
+values. Only ‘<tt class="docutils literal"><span class="pre">zeroext</span></tt>‘, ‘<tt class="docutils literal"><span class="pre">signext</span></tt>‘, and ‘<tt class="docutils literal"><span class="pre">inreg</span></tt>‘ attributes
+are valid here.</li>
+<li>‘<tt class="docutils literal"><span class="pre">ty</span></tt>‘: the type of the call instruction itself which is also the
+type of the return value. Functions that return no value are marked
+<tt class="docutils literal"><span class="pre">void</span></tt>.</li>
+<li>‘<tt class="docutils literal"><span class="pre">fnty</span></tt>‘: shall be the signature of the pointer to function value
+being invoked. The argument types must match the types implied by
+this signature. This type can be omitted if the function is not
+varargs and if the function type does not return a pointer to a
+function.</li>
+<li>‘<tt class="docutils literal"><span class="pre">fnptrval</span></tt>‘: An LLVM value containing a pointer to a function to
+be invoked. In most cases, this is a direct function invocation, but
+indirect <tt class="docutils literal"><span class="pre">call</span></tt>‘s are just as possible, calling an arbitrary pointer
+to function value.</li>
+<li>‘<tt class="docutils literal"><span class="pre">function</span> <span class="pre">args</span></tt>‘: argument list whose types match the function
+signature argument types and parameter attributes. All arguments must
+be of <a class="reference internal" href="#t-firstclass"><em>first class</em></a> type. If the function signature
+indicates the function accepts a variable number of arguments, the
+extra arguments can be specified.</li>
+<li>The optional <a class="reference internal" href="#fnattrs"><em>function attributes</em></a> list. Only
+‘<tt class="docutils literal"><span class="pre">noreturn</span></tt>‘, ‘<tt class="docutils literal"><span class="pre">nounwind</span></tt>‘, ‘<tt class="docutils literal"><span class="pre">readonly</span></tt>‘ and ‘<tt class="docutils literal"><span class="pre">readnone</span></tt>‘
+attributes are valid here.</li>
+</ol>
+</div>
+<div class="section" id="id298">
+<h5>Semantics:<a class="headerlink" href="#id298" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">call</span></tt>‘ instruction is used to cause control flow to transfer to
+a specified function, with its incoming arguments bound to the specified
+values. Upon a ‘<tt class="docutils literal"><span class="pre">ret</span></tt>‘ 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.</p>
+</div>
+<div class="section" id="id299">
+<h5>Example:<a class="headerlink" href="#id299" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%retval</span> <span class="p">=</span> <span class="k">call</span> <span class="k">i32</span> <span class="vg">@test</span><span class="p">(</span><span class="k">i32</span> <span class="nv">%argc</span><span class="p">)</span>
+<span class="k">call</span> <span class="k">i32</span> <span class="p">(</span><span class="k">i8</span><span class="p">*,</span> <span class="p">...)*</span> <span class="vg">@printf</span><span class="p">(</span><span class="k">i8</span><span class="p">*</span> <span class="nv">%msg</span><span class="p">,</span> <span class="k">i32</span> <span class="m">12</span><span class="p">,</span> <span class="k">i8</span> <span class="m">42</span><span class="p">)</span>        <span class="c">; yields i32</span>
+<span class="nv">%X</span> <span class="p">=</span> <span class="k">tail</span> <span class="k">call</span> <span class="k">i32</span> <span class="vg">@foo</span><span class="p">()</span>                                    <span class="c">; yields i32</span>
+<span class="nv">%Y</span> <span class="p">=</span> <span class="k">tail</span> <span class="k">call</span> <span class="k">fastcc</span> <span class="k">i32</span> <span class="vg">@foo</span><span class="p">()</span>  <span class="c">; yields i32</span>
+<span class="k">call</span> <span class="kt">void</span> <span class="nv">%foo</span><span class="p">(</span><span class="k">i8</span> <span class="m">97</span> <span class="k">signext</span><span class="p">)</span>
+
+<span class="nv">%struct.A</span> <span class="p">=</span> <span class="k">type</span> <span class="p">{</span> <span class="k">i32</span><span class="p">,</span> <span class="k">i8</span> <span class="p">}</span>
+<span class="nv">%r</span> <span class="p">=</span> <span class="k">call</span> <span class="nv">%struct.A</span> <span class="vg">@foo</span><span class="p">()</span>                        <span class="c">; yields { 32, i8 }</span>
+<span class="nv">%gr</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="nv">%struct.A</span> <span class="nv">%r</span><span class="p">,</span> <span class="m">0</span>                <span class="c">; yields i32</span>
+<span class="nv">%gr1</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="nv">%struct.A</span> <span class="nv">%r</span><span class="p">,</span> <span class="m">1</span>               <span class="c">; yields i8</span>
+<span class="nv">%Z</span> <span class="p">=</span> <span class="k">call</span> <span class="kt">void</span> <span class="vg">@foo</span><span class="p">()</span> <span class="k">noreturn</span>                    <span class="c">; indicates that %foo never returns normally</span>
+<span class="nv">%ZZ</span> <span class="p">=</span> <span class="k">call</span> <span class="k">zeroext</span> <span class="k">i32</span> <span class="vg">@bar</span><span class="p">()</span>                     <span class="c">; Return value is %zero extended</span>
+</pre></div>
+</div>
+<p>llvm treats calls to some functions with names and arguments that match
+the standard C99 library as being the C99 library functions, and may
+perform optimizations or generate code for them under that assumption.
+This is something we’d like to change in the future to provide better
+support for freestanding environments and non-C-based languages.</p>
+</div>
+</div>
+<div class="section" id="va-arg-instruction">
+<span id="i-va-arg"></span><h4><a class="toc-backref" href="#id709">‘<tt class="docutils literal"><span class="pre">va_arg</span></tt>‘ Instruction</a><a class="headerlink" href="#va-arg-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id300">
+<h5>Syntax:<a class="headerlink" href="#id300" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><resultval> = va_arg <va_list*> <arglist>, <argty></pre>
+</div>
+</div>
+<div class="section" id="id301">
+<h5>Overview:<a class="headerlink" href="#id301" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">va_arg</span></tt>‘ instruction is used to access arguments passed through
+the “variable argument” area of a function call. It is used to implement
+the <tt class="docutils literal"><span class="pre">va_arg</span></tt> macro in C.</p>
+</div>
+<div class="section" id="id302">
+<h5>Arguments:<a class="headerlink" href="#id302" title="Permalink to this headline">¶</a></h5>
+<p>This instruction takes a <tt class="docutils literal"><span class="pre">va_list*</span></tt> value and the type of the
+argument. It returns a value of the specified argument type and
+increments the <tt class="docutils literal"><span class="pre">va_list</span></tt> to point to the next argument. The actual
+type of <tt class="docutils literal"><span class="pre">va_list</span></tt> is target specific.</p>
+</div>
+<div class="section" id="id303">
+<h5>Semantics:<a class="headerlink" href="#id303" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">va_arg</span></tt>‘ instruction loads an argument of the specified type
+from the specified <tt class="docutils literal"><span class="pre">va_list</span></tt> and causes the <tt class="docutils literal"><span class="pre">va_list</span></tt> to point to
+the next argument. For more information, see the variable argument
+handling <a class="reference internal" href="#int-varargs"><em>Intrinsic Functions</em></a>.</p>
+<p>It is legal for this instruction to be called in a function which does
+not take a variable number of arguments, for example, the <tt class="docutils literal"><span class="pre">vfprintf</span></tt>
+function.</p>
+<p><tt class="docutils literal"><span class="pre">va_arg</span></tt> is an LLVM instruction instead of an <a class="reference internal" href="#intrinsics"><em>intrinsic
+function</em></a> because it takes a type as an argument.</p>
+</div>
+<div class="section" id="id304">
+<h5>Example:<a class="headerlink" href="#id304" title="Permalink to this headline">¶</a></h5>
+<p>See the <a class="reference internal" href="#int-varargs"><em>variable argument processing</em></a> section.</p>
+<p>Note that the code generator does not yet fully support va_arg on many
+targets. Also, it does not currently support va_arg with aggregate
+types on any target.</p>
+</div>
+</div>
+<div class="section" id="landingpad-instruction">
+<span id="i-landingpad"></span><h4><a class="toc-backref" href="#id710">‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ Instruction</a><a class="headerlink" href="#landingpad-instruction" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id305">
+<h5>Syntax:<a class="headerlink" href="#id305" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre><resultval> = landingpad <resultty> personality <type> <pers_fn> <clause>+
+<resultval> = landingpad <resultty> personality <type> <pers_fn> cleanup <clause>*
+
+<clause> := catch <type> <value>
+<clause> := filter <array constant type> <array constant></pre>
+</div>
+</div>
+<div class="section" id="id306">
+<h5>Overview:<a class="headerlink" href="#id306" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ instruction is used by <a class="reference external" href="ExceptionHandling.html#overview">LLVM’s exception handling
+system</a> to specify that a basic block
+is a landing pad — one where the exception lands, and corresponds to the
+code found in the <tt class="docutils literal"><span class="pre">catch</span></tt> portion of a <tt class="docutils literal"><span class="pre">try</span></tt>/<tt class="docutils literal"><span class="pre">catch</span></tt> sequence. It
+defines values supplied by the personality function (<tt class="docutils literal"><span class="pre">pers_fn</span></tt>) upon
+re-entry to the function. The <tt class="docutils literal"><span class="pre">resultval</span></tt> has the type <tt class="docutils literal"><span class="pre">resultty</span></tt>.</p>
+</div>
+<div class="section" id="id307">
+<h5>Arguments:<a class="headerlink" href="#id307" title="Permalink to this headline">¶</a></h5>
+<p>This instruction takes a <tt class="docutils literal"><span class="pre">pers_fn</span></tt> value. This is the personality
+function associated with the unwinding mechanism. The optional
+<tt class="docutils literal"><span class="pre">cleanup</span></tt> flag indicates that the landing pad block is a cleanup.</p>
+<p>A <tt class="docutils literal"><span class="pre">clause</span></tt> begins with the clause type — <tt class="docutils literal"><span class="pre">catch</span></tt> or <tt class="docutils literal"><span class="pre">filter</span></tt> — and
+contains the global variable representing the “type” that may be caught
+or filtered respectively. Unlike the <tt class="docutils literal"><span class="pre">catch</span></tt> clause, the <tt class="docutils literal"><span class="pre">filter</span></tt>
+clause takes an array constant as its argument. Use
+“<tt class="docutils literal"><span class="pre">[0</span> <span class="pre">x</span> <span class="pre">i8**]</span> <span class="pre">undef</span></tt>” for a filter which cannot throw. The
+‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ instruction must contain <em>at least</em> one <tt class="docutils literal"><span class="pre">clause</span></tt> or
+the <tt class="docutils literal"><span class="pre">cleanup</span></tt> flag.</p>
+</div>
+<div class="section" id="id308">
+<h5>Semantics:<a class="headerlink" href="#id308" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ instruction defines the values which are set by the
+personality function (<tt class="docutils literal"><span class="pre">pers_fn</span></tt>) upon re-entry to the function, and
+therefore the “result type” of the <tt class="docutils literal"><span class="pre">landingpad</span></tt> instruction. As with
+calling conventions, how the personality function results are
+represented in LLVM IR is target specific.</p>
+<p>The clauses are applied in order from top to bottom. If two
+<tt class="docutils literal"><span class="pre">landingpad</span></tt> instructions are merged together through inlining, the
+clauses from the calling function are appended to the list of clauses.
+When the call stack is being unwound due to an exception being thrown,
+the exception is compared against each <tt class="docutils literal"><span class="pre">clause</span></tt> in turn. If it doesn’t
+match any of the clauses, and the <tt class="docutils literal"><span class="pre">cleanup</span></tt> flag is not set, then
+unwinding continues further up the call stack.</p>
+<p>The <tt class="docutils literal"><span class="pre">landingpad</span></tt> instruction has several restrictions:</p>
+<ul class="simple">
+<li>A landing pad block is a basic block which is the unwind destination
+of an ‘<tt class="docutils literal"><span class="pre">invoke</span></tt>‘ instruction.</li>
+<li>A landing pad block must have a ‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ instruction as its
+first non-PHI instruction.</li>
+<li>There can be only one ‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ instruction within the landing
+pad block.</li>
+<li>A basic block that is not a landing pad block may not include a
+‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ instruction.</li>
+<li>All ‘<tt class="docutils literal"><span class="pre">landingpad</span></tt>‘ instructions in a function must have the same
+personality function.</li>
+</ul>
+</div>
+<div class="section" id="id309">
+<h5>Example:<a class="headerlink" href="#id309" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>;; A landing pad which can catch an integer.
+%res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+         catch i8** @_ZTIi
+;; A landing pad that is a cleanup.
+%res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+         cleanup
+;; A landing pad which can catch an integer and can only throw a double.
+%res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+         catch i8** @_ZTIi
+         filter [1 x i8**] [@_ZTId]</pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="intrinsic-functions">
+<span id="intrinsics"></span><h2><a class="toc-backref" href="#id711">Intrinsic Functions</a><a class="headerlink" href="#intrinsic-functions" title="Permalink to this headline">¶</a></h2>
+<p>LLVM supports the notion of an “intrinsic function”. These functions
+have well known names and semantics and are required to follow certain
+restrictions. Overall, these intrinsics represent an extension mechanism
+for the LLVM language that does not require changing all of the
+transformations in LLVM when adding to the language (or the bitcode
+reader/writer, the parser, etc...).</p>
+<p>Intrinsic function names must all start with an “<tt class="docutils literal"><span class="pre">llvm.</span></tt>” prefix. This
+prefix is reserved in LLVM for intrinsic names; thus, function names may
+not begin with this prefix. Intrinsic functions must always be external
+functions: you cannot define the body of intrinsic functions. Intrinsic
+functions may only be used in call or invoke instructions: it is illegal
+to take the address of an intrinsic function. Additionally, because
+intrinsic functions are part of the LLVM language, it is required if any
+are added that they be documented here.</p>
+<p>Some intrinsic functions can be overloaded, i.e., the intrinsic
+represents a family of functions that perform the same operation but on
+different data types. Because LLVM can represent over 8 million
+different integer types, overloading is used commonly to allow an
+intrinsic function to operate on any integer type. One or more of the
+argument types or the result type can be overloaded to accept any
+integer type. Argument types may also be defined as exactly matching a
+previous argument’s type or the result type. This allows an intrinsic
+function which accepts multiple arguments, but needs all of them to be
+of the same type, to only be overloaded with respect to a single
+argument or the result.</p>
+<p>Overloaded intrinsics will have the names of its overloaded argument
+types encoded into its function name, each preceded by a period. Only
+those types which are overloaded result in a name suffix. Arguments
+whose type is matched against another type do not. For example, the
+<tt class="docutils literal"><span class="pre">llvm.ctpop</span></tt> function can take an integer of any width and returns an
+integer of exactly the same integer width. This leads to a family of
+functions such as <tt class="docutils literal"><span class="pre">i8</span> <span class="pre">@llvm.ctpop.i8(i8</span> <span class="pre">%val)</span></tt> and
+<tt class="docutils literal"><span class="pre">i29</span> <span class="pre">@llvm.ctpop.i29(i29</span> <span class="pre">%val)</span></tt>. Only one type, the return type, is
+overloaded, and only one type suffix is required. Because the argument’s
+type is matched against the return type, it does not require its own
+name suffix.</p>
+<p>To learn how to add an intrinsic function, please see the <a class="reference external" href="ExtendingLLVM.html">Extending
+LLVM Guide</a>.</p>
+<div class="section" id="variable-argument-handling-intrinsics">
+<span id="int-varargs"></span><h3><a class="toc-backref" href="#id712">Variable Argument Handling Intrinsics</a><a class="headerlink" href="#variable-argument-handling-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>Variable argument support is defined in LLVM with the
+<a class="reference internal" href="#i-va-arg"><em>va_arg</em></a> instruction and these three intrinsic
+functions. These functions are related to the similarly named macros
+defined in the <tt class="docutils literal"><span class="pre"><stdarg.h></span></tt> header file.</p>
+<p>All of these functions operate on arguments that use a target-specific
+value type “<tt class="docutils literal"><span class="pre">va_list</span></tt>”. The LLVM assembly language reference manual
+does not define what this type is, so all transformations should be
+prepared to handle these functions regardless of the type used.</p>
+<p>This example shows how the <a class="reference internal" href="#i-va-arg"><em>va_arg</em></a> instruction and the
+variable argument handling intrinsic functions are used.</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="k">define</span> <span class="k">i32</span> <span class="vg">@test</span><span class="p">(</span><span class="k">i32</span> <span class="nv">%X</span><span class="p">,</span> <span class="p">...)</span> <span class="p">{</span>
+  <span class="c">; Initialize variable argument processing</span>
+  <span class="nv">%ap</span> <span class="p">=</span> <span class="k">alloca</span> <span class="k">i8</span><span class="p">*</span>
+  <span class="nv">%ap2</span> <span class="p">=</span> <span class="k">bitcast</span> <span class="k">i8</span><span class="p">**</span> <span class="nv">%ap</span> <span class="k">to</span> <span class="k">i8</span><span class="p">*</span>
+  <span class="k">call</span> <span class="kt">void</span> <span class="vg">@llvm.va_start</span><span class="p">(</span><span class="k">i8</span><span class="p">*</span> <span class="nv">%ap2</span><span class="p">)</span>
+
+  <span class="c">; Read a single integer argument</span>
+  <span class="nv">%tmp</span> <span class="p">=</span> <span class="k">va_arg</span> <span class="k">i8</span><span class="p">**</span> <span class="nv">%ap</span><span class="p">,</span> <span class="k">i32</span>
+
+  <span class="c">; Demonstrate usage of llvm.va_copy and llvm.va_end</span>
+  <span class="nv">%aq</span> <span class="p">=</span> <span class="k">alloca</span> <span class="k">i8</span><span class="p">*</span>
+  <span class="nv">%aq2</span> <span class="p">=</span> <span class="k">bitcast</span> <span class="k">i8</span><span class="p">**</span> <span class="nv">%aq</span> <span class="k">to</span> <span class="k">i8</span><span class="p">*</span>
+  <span class="k">call</span> <span class="kt">void</span> <span class="vg">@llvm.va_copy</span><span class="p">(</span><span class="k">i8</span><span class="p">*</span> <span class="nv">%aq2</span><span class="p">,</span> <span class="k">i8</span><span class="p">*</span> <span class="nv">%ap2</span><span class="p">)</span>
+  <span class="k">call</span> <span class="kt">void</span> <span class="vg">@llvm.va_end</span><span class="p">(</span><span class="k">i8</span><span class="p">*</span> <span class="nv">%aq2</span><span class="p">)</span>
+
+  <span class="c">; Stop processing of arguments.</span>
+  <span class="k">call</span> <span class="kt">void</span> <span class="vg">@llvm.va_end</span><span class="p">(</span><span class="k">i8</span><span class="p">*</span> <span class="nv">%ap2</span><span class="p">)</span>
+  <span class="k">ret</span> <span class="k">i32</span> <span class="nv">%tmp</span>
+<span class="p">}</span>
+
+<span class="k">declare</span> <span class="kt">void</span> <span class="vg">@llvm.va_start</span><span class="p">(</span><span class="k">i8</span><span class="p">*)</span>
+<span class="k">declare</span> <span class="kt">void</span> <span class="vg">@llvm.va_copy</span><span class="p">(</span><span class="k">i8</span><span class="p">*,</span> <span class="k">i8</span><span class="p">*)</span>
+<span class="k">declare</span> <span class="kt">void</span> <span class="vg">@llvm.va_end</span><span class="p">(</span><span class="k">i8</span><span class="p">*)</span>
+</pre></div>
+</div>
+<div class="section" id="llvm-va-start-intrinsic">
+<span id="int-va-start"></span><h4><a class="toc-backref" href="#id713">‘<tt class="docutils literal"><span class="pre">llvm.va_start</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-va-start-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id310">
+<h5>Syntax:<a class="headerlink" href="#id310" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.va_start(i8* <arglist>)</pre>
+</div>
+</div>
+<div class="section" id="id311">
+<h5>Overview:<a class="headerlink" href="#id311" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.va_start</span></tt>‘ intrinsic initializes <tt class="docutils literal"><span class="pre">*<arglist></span></tt> for
+subsequent use by <tt class="docutils literal"><span class="pre">va_arg</span></tt>.</p>
+</div>
+<div class="section" id="id312">
+<h5>Arguments:<a class="headerlink" href="#id312" title="Permalink to this headline">¶</a></h5>
+<p>The argument is a pointer to a <tt class="docutils literal"><span class="pre">va_list</span></tt> element to initialize.</p>
+</div>
+<div class="section" id="id313">
+<h5>Semantics:<a class="headerlink" href="#id313" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.va_start</span></tt>‘ intrinsic works just like the <tt class="docutils literal"><span class="pre">va_start</span></tt> macro
+available in C. In a target-dependent way, it initializes the
+<tt class="docutils literal"><span class="pre">va_list</span></tt> element to which the argument points, so that the next call
+to <tt class="docutils literal"><span class="pre">va_arg</span></tt> will produce the first variable argument passed to the
+function. Unlike the C <tt class="docutils literal"><span class="pre">va_start</span></tt> macro, this intrinsic does not need
+to know the last argument of the function as the compiler can figure
+that out.</p>
+</div>
+</div>
+<div class="section" id="llvm-va-end-intrinsic">
+<h4><a class="toc-backref" href="#id714">‘<tt class="docutils literal"><span class="pre">llvm.va_end</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-va-end-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id314">
+<h5>Syntax:<a class="headerlink" href="#id314" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.va_end(i8* <arglist>)</pre>
+</div>
+</div>
+<div class="section" id="id315">
+<h5>Overview:<a class="headerlink" href="#id315" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.va_end</span></tt>‘ intrinsic destroys <tt class="docutils literal"><span class="pre">*<arglist></span></tt>, which has been
+initialized previously with <tt class="docutils literal"><span class="pre">llvm.va_start</span></tt> or <tt class="docutils literal"><span class="pre">llvm.va_copy</span></tt>.</p>
+</div>
+<div class="section" id="id316">
+<h5>Arguments:<a class="headerlink" href="#id316" title="Permalink to this headline">¶</a></h5>
+<p>The argument is a pointer to a <tt class="docutils literal"><span class="pre">va_list</span></tt> to destroy.</p>
+</div>
+<div class="section" id="id317">
+<h5>Semantics:<a class="headerlink" href="#id317" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.va_end</span></tt>‘ intrinsic works just like the <tt class="docutils literal"><span class="pre">va_end</span></tt> macro
+available in C. In a target-dependent way, it destroys the <tt class="docutils literal"><span class="pre">va_list</span></tt>
+element to which the argument points. Calls to
+<a class="reference internal" href="#int-va-start"><em>llvm.va_start</em></a> and
+<a class="reference internal" href="#int-va-copy"><em>llvm.va_copy</em></a> must be matched exactly with calls to
+<tt class="docutils literal"><span class="pre">llvm.va_end</span></tt>.</p>
+</div>
+</div>
+<div class="section" id="llvm-va-copy-intrinsic">
+<span id="int-va-copy"></span><h4><a class="toc-backref" href="#id715">‘<tt class="docutils literal"><span class="pre">llvm.va_copy</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-va-copy-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id318">
+<h5>Syntax:<a class="headerlink" href="#id318" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.va_copy(i8* <destarglist>, i8* <srcarglist>)</pre>
+</div>
+</div>
+<div class="section" id="id319">
+<h5>Overview:<a class="headerlink" href="#id319" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.va_copy</span></tt>‘ intrinsic copies the current argument position
+from the source argument list to the destination argument list.</p>
+</div>
+<div class="section" id="id320">
+<h5>Arguments:<a class="headerlink" href="#id320" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is a pointer to a <tt class="docutils literal"><span class="pre">va_list</span></tt> element to initialize.
+The second argument is a pointer to a <tt class="docutils literal"><span class="pre">va_list</span></tt> element to copy from.</p>
+</div>
+<div class="section" id="id321">
+<h5>Semantics:<a class="headerlink" href="#id321" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.va_copy</span></tt>‘ intrinsic works just like the <tt class="docutils literal"><span class="pre">va_copy</span></tt> macro
+available in C. In a target-dependent way, it copies the source
+<tt class="docutils literal"><span class="pre">va_list</span></tt> element into the destination <tt class="docutils literal"><span class="pre">va_list</span></tt> element. This
+intrinsic is necessary because the `` llvm.va_start`` intrinsic may be
+arbitrarily complex and require, for example, memory allocation.</p>
+</div>
+</div>
+</div>
+<div class="section" id="accurate-garbage-collection-intrinsics">
+<h3><a class="toc-backref" href="#id716">Accurate Garbage Collection Intrinsics</a><a class="headerlink" href="#accurate-garbage-collection-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>LLVM support for <a class="reference external" href="GarbageCollection.html">Accurate Garbage Collection</a>
+(GC) requires the implementation and generation of these intrinsics.
+These intrinsics allow identification of <a class="reference internal" href="#int-gcroot"><em>GC roots on the
+stack</em></a>, as well as garbage collector implementations that
+require <a class="reference internal" href="#int-gcread"><em>read</em></a> and <a class="reference internal" href="#int-gcwrite"><em>write</em></a> barriers.
+Front-ends for type-safe garbage collected languages should generate
+these intrinsics to make use of the LLVM garbage collectors. For more
+details, see <a class="reference external" href="GarbageCollection.html">Accurate Garbage Collection with
+LLVM</a>.</p>
+<p>The garbage collection intrinsics only operate on objects in the generic
+address space (address space zero).</p>
+<div class="section" id="llvm-gcroot-intrinsic">
+<span id="int-gcroot"></span><h4><a class="toc-backref" href="#id717">‘<tt class="docutils literal"><span class="pre">llvm.gcroot</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-gcroot-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id322">
+<h5>Syntax:<a class="headerlink" href="#id322" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.gcroot(i8** %ptrloc, i8* %metadata)</pre>
+</div>
+</div>
+<div class="section" id="id323">
+<h5>Overview:<a class="headerlink" href="#id323" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.gcroot</span></tt>‘ intrinsic declares the existence of a GC root to
+the code generator, and allows some metadata to be associated with it.</p>
+</div>
+<div class="section" id="id324">
+<h5>Arguments:<a class="headerlink" href="#id324" title="Permalink to this headline">¶</a></h5>
+<p>The first argument specifies the address of a stack object that contains
+the root pointer. The second pointer (which must be either a constant or
+a global value address) contains the meta-data to be associated with the
+root.</p>
+</div>
+<div class="section" id="id325">
+<h5>Semantics:<a class="headerlink" href="#id325" title="Permalink to this headline">¶</a></h5>
+<p>At runtime, a call to this intrinsic stores a null pointer into the
+“ptrloc” location. At compile-time, the code generator generates
+information to allow the runtime to find the pointer at GC safe points.
+The ‘<tt class="docutils literal"><span class="pre">llvm.gcroot</span></tt>‘ intrinsic may only be used in a function which
+<a class="reference internal" href="#gc"><em>specifies a GC algorithm</em></a>.</p>
+</div>
+</div>
+<div class="section" id="llvm-gcread-intrinsic">
+<span id="int-gcread"></span><h4><a class="toc-backref" href="#id718">‘<tt class="docutils literal"><span class="pre">llvm.gcread</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-gcread-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id326">
+<h5>Syntax:<a class="headerlink" href="#id326" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare i8* @llvm.gcread(i8* %ObjPtr, i8** %Ptr)</pre>
+</div>
+</div>
+<div class="section" id="id327">
+<h5>Overview:<a class="headerlink" href="#id327" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.gcread</span></tt>‘ intrinsic identifies reads of references from heap
+locations, allowing garbage collector implementations that require read
+barriers.</p>
+</div>
+<div class="section" id="id328">
+<h5>Arguments:<a class="headerlink" href="#id328" title="Permalink to this headline">¶</a></h5>
+<p>The second argument is the address to read from, which should be an
+address allocated from the garbage collector. The first object is a
+pointer to the start of the referenced object, if needed by the language
+runtime (otherwise null).</p>
+</div>
+<div class="section" id="id329">
+<h5>Semantics:<a class="headerlink" href="#id329" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.gcread</span></tt>‘ intrinsic has the same semantics as a load
+instruction, but may be replaced with substantially more complex code by
+the garbage collector runtime, as needed. The ‘<tt class="docutils literal"><span class="pre">llvm.gcread</span></tt>‘
+intrinsic may only be used in a function which <a class="reference internal" href="#gc"><em>specifies a GC
+algorithm</em></a>.</p>
+</div>
+</div>
+<div class="section" id="llvm-gcwrite-intrinsic">
+<span id="int-gcwrite"></span><h4><a class="toc-backref" href="#id719">‘<tt class="docutils literal"><span class="pre">llvm.gcwrite</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-gcwrite-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id330">
+<h5>Syntax:<a class="headerlink" href="#id330" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.gcwrite(i8* %P1, i8* %Obj, i8** %P2)</pre>
+</div>
+</div>
+<div class="section" id="id331">
+<h5>Overview:<a class="headerlink" href="#id331" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.gcwrite</span></tt>‘ intrinsic identifies writes of references to heap
+locations, allowing garbage collector implementations that require write
+barriers (such as generational or reference counting collectors).</p>
+</div>
+<div class="section" id="id332">
+<h5>Arguments:<a class="headerlink" href="#id332" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is the reference to store, the second is the start of
+the object to store it to, and the third is the address of the field of
+Obj to store to. If the runtime does not require a pointer to the
+object, Obj may be null.</p>
+</div>
+<div class="section" id="id333">
+<h5>Semantics:<a class="headerlink" href="#id333" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.gcwrite</span></tt>‘ intrinsic has the same semantics as a store
+instruction, but may be replaced with substantially more complex code by
+the garbage collector runtime, as needed. The ‘<tt class="docutils literal"><span class="pre">llvm.gcwrite</span></tt>‘
+intrinsic may only be used in a function which <a class="reference internal" href="#gc"><em>specifies a GC
+algorithm</em></a>.</p>
+</div>
+</div>
+</div>
+<div class="section" id="code-generator-intrinsics">
+<h3><a class="toc-backref" href="#id720">Code Generator Intrinsics</a><a class="headerlink" href="#code-generator-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>These intrinsics are provided by LLVM to expose special features that
+may only be implemented with code generator support.</p>
+<div class="section" id="llvm-returnaddress-intrinsic">
+<h4><a class="toc-backref" href="#id721">‘<tt class="docutils literal"><span class="pre">llvm.returnaddress</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-returnaddress-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id334">
+<h5>Syntax:<a class="headerlink" href="#id334" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare i8  *@llvm.returnaddress(i32 <level>)</pre>
+</div>
+</div>
+<div class="section" id="id335">
+<h5>Overview:<a class="headerlink" href="#id335" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.returnaddress</span></tt>‘ intrinsic attempts to compute a
+target-specific value indicating the return address of the current
+function or one of its callers.</p>
+</div>
+<div class="section" id="id336">
+<h5>Arguments:<a class="headerlink" href="#id336" title="Permalink to this headline">¶</a></h5>
+<p>The argument to this intrinsic indicates which function to return the
+address for. Zero indicates the calling function, one indicates its
+caller, etc. The argument is <strong>required</strong> to be a constant integer
+value.</p>
+</div>
+<div class="section" id="id337">
+<h5>Semantics:<a class="headerlink" href="#id337" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.returnaddress</span></tt>‘ intrinsic either returns a pointer
+indicating the return address of the specified call frame, or zero if it
+cannot be identified. The value returned by this intrinsic is likely to
+be incorrect or 0 for arguments other than zero, so it should only be
+used for debugging purposes.</p>
+<p>Note that calling this intrinsic does not prevent function inlining or
+other aggressive transformations, so the value returned may not be that
+of the obvious source-language caller.</p>
+</div>
+</div>
+<div class="section" id="llvm-frameaddress-intrinsic">
+<h4><a class="toc-backref" href="#id722">‘<tt class="docutils literal"><span class="pre">llvm.frameaddress</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-frameaddress-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id338">
+<h5>Syntax:<a class="headerlink" href="#id338" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare i8* @llvm.frameaddress(i32 <level>)</pre>
+</div>
+</div>
+<div class="section" id="id339">
+<h5>Overview:<a class="headerlink" href="#id339" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.frameaddress</span></tt>‘ intrinsic attempts to return the
+target-specific frame pointer value for the specified stack frame.</p>
+</div>
+<div class="section" id="id340">
+<h5>Arguments:<a class="headerlink" href="#id340" title="Permalink to this headline">¶</a></h5>
+<p>The argument to this intrinsic indicates which function to return the
+frame pointer for. Zero indicates the calling function, one indicates
+its caller, etc. The argument is <strong>required</strong> to be a constant integer
+value.</p>
+</div>
+<div class="section" id="id341">
+<h5>Semantics:<a class="headerlink" href="#id341" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.frameaddress</span></tt>‘ intrinsic either returns a pointer
+indicating the frame address of the specified call frame, or zero if it
+cannot be identified. The value returned by this intrinsic is likely to
+be incorrect or 0 for arguments other than zero, so it should only be
+used for debugging purposes.</p>
+<p>Note that calling this intrinsic does not prevent function inlining or
+other aggressive transformations, so the value returned may not be that
+of the obvious source-language caller.</p>
+</div>
+</div>
+<div class="section" id="llvm-stacksave-intrinsic">
+<span id="int-stacksave"></span><h4><a class="toc-backref" href="#id723">‘<tt class="docutils literal"><span class="pre">llvm.stacksave</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-stacksave-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id342">
+<h5>Syntax:<a class="headerlink" href="#id342" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare i8* @llvm.stacksave()</pre>
+</div>
+</div>
+<div class="section" id="id343">
+<h5>Overview:<a class="headerlink" href="#id343" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.stacksave</span></tt>‘ intrinsic is used to remember the current state
+of the function stack, for use with
+<a class="reference internal" href="#int-stackrestore"><em>llvm.stackrestore</em></a>. This is useful for
+implementing language features like scoped automatic variable sized
+arrays in C99.</p>
+</div>
+<div class="section" id="id344">
+<h5>Semantics:<a class="headerlink" href="#id344" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic returns a opaque pointer value that can be passed to
+<a class="reference internal" href="#int-stackrestore"><em>llvm.stackrestore</em></a>. When an
+<tt class="docutils literal"><span class="pre">llvm.stackrestore</span></tt> intrinsic is executed with a value saved from
+<tt class="docutils literal"><span class="pre">llvm.stacksave</span></tt>, it effectively restores the state of the stack to
+the state it was in when the <tt class="docutils literal"><span class="pre">llvm.stacksave</span></tt> intrinsic executed. In
+practice, this pops any <a class="reference internal" href="#i-alloca"><em>alloca</em></a> blocks from the stack that
+were allocated after the <tt class="docutils literal"><span class="pre">llvm.stacksave</span></tt> was executed.</p>
+</div>
+</div>
+<div class="section" id="llvm-stackrestore-intrinsic">
+<span id="int-stackrestore"></span><h4><a class="toc-backref" href="#id724">‘<tt class="docutils literal"><span class="pre">llvm.stackrestore</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-stackrestore-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id345">
+<h5>Syntax:<a class="headerlink" href="#id345" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.stackrestore(i8* %ptr)</pre>
+</div>
+</div>
+<div class="section" id="id346">
+<h5>Overview:<a class="headerlink" href="#id346" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.stackrestore</span></tt>‘ intrinsic is used to restore the state of
+the function stack to the state it was in when the corresponding
+<a class="reference internal" href="#int-stacksave"><em>llvm.stacksave</em></a> intrinsic executed. This is
+useful for implementing language features like scoped automatic variable
+sized arrays in C99.</p>
+</div>
+<div class="section" id="id347">
+<h5>Semantics:<a class="headerlink" href="#id347" title="Permalink to this headline">¶</a></h5>
+<p>See the description for <a class="reference internal" href="#int-stacksave"><em>llvm.stacksave</em></a>.</p>
+</div>
+</div>
+<div class="section" id="llvm-prefetch-intrinsic">
+<h4><a class="toc-backref" href="#id725">‘<tt class="docutils literal"><span class="pre">llvm.prefetch</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-prefetch-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id348">
+<h5>Syntax:<a class="headerlink" href="#id348" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.prefetch(i8* <address>, i32 <rw>, i32 <locality>, i32 <cache type>)</pre>
+</div>
+</div>
+<div class="section" id="id349">
+<h5>Overview:<a class="headerlink" href="#id349" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.prefetch</span></tt>‘ intrinsic is a hint to the code generator to
+insert a prefetch instruction if supported; otherwise, it is a noop.
+Prefetches have no effect on the behavior of the program but can change
+its performance characteristics.</p>
+</div>
+<div class="section" id="id350">
+<h5>Arguments:<a class="headerlink" href="#id350" title="Permalink to this headline">¶</a></h5>
+<p><tt class="docutils literal"><span class="pre">address</span></tt> is the address to be prefetched, <tt class="docutils literal"><span class="pre">rw</span></tt> is the specifier
+determining if the fetch should be for a read (0) or write (1), and
+<tt class="docutils literal"><span class="pre">locality</span></tt> is a temporal locality specifier ranging from (0) - no
+locality, to (3) - extremely local keep in cache. The <tt class="docutils literal"><span class="pre">cache</span> <span class="pre">type</span></tt>
+specifies whether the prefetch is performed on the data (1) or
+instruction (0) cache. The <tt class="docutils literal"><span class="pre">rw</span></tt>, <tt class="docutils literal"><span class="pre">locality</span></tt> and <tt class="docutils literal"><span class="pre">cache</span> <span class="pre">type</span></tt>
+arguments must be constant integers.</p>
+</div>
+<div class="section" id="id351">
+<h5>Semantics:<a class="headerlink" href="#id351" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic does not modify the behavior of the program. In
+particular, prefetches cannot trap and do not produce a value. On
+targets that support this intrinsic, the prefetch can provide hints to
+the processor cache for better performance.</p>
+</div>
+</div>
+<div class="section" id="llvm-pcmarker-intrinsic">
+<h4><a class="toc-backref" href="#id726">‘<tt class="docutils literal"><span class="pre">llvm.pcmarker</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-pcmarker-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id352">
+<h5>Syntax:<a class="headerlink" href="#id352" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.pcmarker(i32 <id>)</pre>
+</div>
+</div>
+<div class="section" id="id353">
+<h5>Overview:<a class="headerlink" href="#id353" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.pcmarker</span></tt>‘ intrinsic is a method to export a Program
+Counter (PC) in a region of code to simulators and other tools. The
+method is target specific, but it is expected that the marker will use
+exported symbols to transmit the PC of the marker. The marker makes no
+guarantees that it will remain with any specific instruction after
+optimizations. It is possible that the presence of a marker will inhibit
+optimizations. The intended use is to be inserted after optimizations to
+allow correlations of simulation runs.</p>
+</div>
+<div class="section" id="id354">
+<h5>Arguments:<a class="headerlink" href="#id354" title="Permalink to this headline">¶</a></h5>
+<p><tt class="docutils literal"><span class="pre">id</span></tt> is a numerical id identifying the marker.</p>
+</div>
+<div class="section" id="id355">
+<h5>Semantics:<a class="headerlink" href="#id355" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic does not modify the behavior of the program. Backends
+that do not support this intrinsic may ignore it.</p>
+</div>
+</div>
+<div class="section" id="llvm-readcyclecounter-intrinsic">
+<h4><a class="toc-backref" href="#id727">‘<tt class="docutils literal"><span class="pre">llvm.readcyclecounter</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-readcyclecounter-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id356">
+<h5>Syntax:<a class="headerlink" href="#id356" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare i64 @llvm.readcyclecounter()</pre>
+</div>
+</div>
+<div class="section" id="id357">
+<h5>Overview:<a class="headerlink" href="#id357" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.readcyclecounter</span></tt>‘ intrinsic provides access to the cycle
+counter register (or similar low latency, high accuracy clocks) on those
+targets that support it. On X86, it should map to RDTSC. On Alpha, it
+should map to RPCC. As the backing counters overflow quickly (on the
+order of 9 seconds on alpha), this should only be used for small
+timings.</p>
+</div>
+<div class="section" id="id358">
+<h5>Semantics:<a class="headerlink" href="#id358" title="Permalink to this headline">¶</a></h5>
+<p>When directly supported, reading the cycle counter should not modify any
+memory. Implementations are allowed to either return a application
+specific value or a system wide value. On backends without support, this
+is lowered to a constant 0.</p>
+<p>Note that runtime support may be conditional on the privilege-level code is
+running at and the host platform.</p>
+</div>
+</div>
+</div>
+<div class="section" id="standard-c-library-intrinsics">
+<h3><a class="toc-backref" href="#id728">Standard C Library Intrinsics</a><a class="headerlink" href="#standard-c-library-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>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.</p>
+<div class="section" id="llvm-memcpy-intrinsic">
+<span id="int-memcpy"></span><h4><a class="toc-backref" href="#id729">‘<tt class="docutils literal"><span class="pre">llvm.memcpy</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-memcpy-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id359">
+<h5>Syntax:<a class="headerlink" href="#id359" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.memcpy</span></tt> on any
+integer bit width and for different address spaces. Not all targets
+support all bit widths however.</p>
+<div class="highlight-python"><pre>declare void @llvm.memcpy.p0i8.p0i8.i32(i8* <dest>, i8* <src>,
+                                        i32 <len>, i32 <align>, i1 <isvolatile>)
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* <dest>, i8* <src>,
+                                        i64 <len>, i32 <align>, i1 <isvolatile>)</pre>
+</div>
+</div>
+<div class="section" id="id360">
+<h5>Overview:<a class="headerlink" href="#id360" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.memcpy.*</span></tt>‘ intrinsics copy a block of memory from the
+source location to the destination location.</p>
+<p>Note that, unlike the standard libc function, the <tt class="docutils literal"><span class="pre">llvm.memcpy.*</span></tt>
+intrinsics do not return a value, takes extra alignment/isvolatile
+arguments and the pointers can be in specified address spaces.</p>
+</div>
+<div class="section" id="id361">
+<h5>Arguments:<a class="headerlink" href="#id361" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is a pointer to the destination, the second is a
+pointer to the source. The third argument is an integer argument
+specifying the number of bytes to copy, the fourth argument is the
+alignment of the source and destination locations, and the fifth is a
+boolean indicating a volatile access.</p>
+<p>If the call to this intrinsic has an alignment value that is not 0 or 1,
+then the caller guarantees that both the source and destination pointers
+are aligned to that boundary.</p>
+<p>If the <tt class="docutils literal"><span class="pre">isvolatile</span></tt> parameter is <tt class="docutils literal"><span class="pre">true</span></tt>, the <tt class="docutils literal"><span class="pre">llvm.memcpy</span></tt> call is
+a <a class="reference internal" href="#volatile"><em>volatile operation</em></a>. The detailed access behavior is not
+very cleanly specified and it is unwise to depend on it.</p>
+</div>
+<div class="section" id="id362">
+<h5>Semantics:<a class="headerlink" href="#id362" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.memcpy.*</span></tt>‘ intrinsics copy a block of memory from the
+source location to the destination location, which are not allowed to
+overlap. It copies “len” bytes of memory over. If the argument is known
+to be aligned to some boundary, this can be specified as the fourth
+argument, otherwise it should be set to 0 or 1 (both meaning no alignment).</p>
+</div>
+</div>
+<div class="section" id="llvm-memmove-intrinsic">
+<h4><a class="toc-backref" href="#id730">‘<tt class="docutils literal"><span class="pre">llvm.memmove</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-memmove-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id363">
+<h5>Syntax:<a class="headerlink" href="#id363" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use llvm.memmove on any integer
+bit width and for different address space. Not all targets support all
+bit widths however.</p>
+<div class="highlight-python"><pre>declare void @llvm.memmove.p0i8.p0i8.i32(i8* <dest>, i8* <src>,
+                                         i32 <len>, i32 <align>, i1 <isvolatile>)
+declare void @llvm.memmove.p0i8.p0i8.i64(i8* <dest>, i8* <src>,
+                                         i64 <len>, i32 <align>, i1 <isvolatile>)</pre>
+</div>
+</div>
+<div class="section" id="id364">
+<h5>Overview:<a class="headerlink" href="#id364" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.memmove.*</span></tt>‘ intrinsics move a block of memory from the
+source location to the destination location. It is similar to the
+‘<tt class="docutils literal"><span class="pre">llvm.memcpy</span></tt>‘ intrinsic but allows the two memory locations to
+overlap.</p>
+<p>Note that, unlike the standard libc function, the <tt class="docutils literal"><span class="pre">llvm.memmove.*</span></tt>
+intrinsics do not return a value, takes extra alignment/isvolatile
+arguments and the pointers can be in specified address spaces.</p>
+</div>
+<div class="section" id="id365">
+<h5>Arguments:<a class="headerlink" href="#id365" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is a pointer to the destination, the second is a
+pointer to the source. The third argument is an integer argument
+specifying the number of bytes to copy, the fourth argument is the
+alignment of the source and destination locations, and the fifth is a
+boolean indicating a volatile access.</p>
+<p>If the call to this intrinsic has an alignment value that is not 0 or 1,
+then the caller guarantees that the source and destination pointers are
+aligned to that boundary.</p>
+<p>If the <tt class="docutils literal"><span class="pre">isvolatile</span></tt> parameter is <tt class="docutils literal"><span class="pre">true</span></tt>, the <tt class="docutils literal"><span class="pre">llvm.memmove</span></tt> call
+is a <a class="reference internal" href="#volatile"><em>volatile operation</em></a>. The detailed access behavior is
+not very cleanly specified and it is unwise to depend on it.</p>
+</div>
+<div class="section" id="id366">
+<h5>Semantics:<a class="headerlink" href="#id366" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.memmove.*</span></tt>‘ intrinsics copy a block of memory from the
+source location to the destination location, which may overlap. It
+copies “len” bytes of memory over. If the argument is known to be
+aligned to some boundary, this can be specified as the fourth argument,
+otherwise it should be set to 0 or 1 (both meaning no alignment).</p>
+</div>
+</div>
+<div class="section" id="llvm-memset-intrinsics">
+<h4><a class="toc-backref" href="#id731">‘<tt class="docutils literal"><span class="pre">llvm.memset.*</span></tt>‘ Intrinsics</a><a class="headerlink" href="#llvm-memset-intrinsics" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id367">
+<h5>Syntax:<a class="headerlink" href="#id367" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use llvm.memset on any integer
+bit width and for different address spaces. However, not all targets
+support all bit widths.</p>
+<div class="highlight-python"><pre>declare void @llvm.memset.p0i8.i32(i8* <dest>, i8 <val>,
+                                   i32 <len>, i32 <align>, i1 <isvolatile>)
+declare void @llvm.memset.p0i8.i64(i8* <dest>, i8 <val>,
+                                   i64 <len>, i32 <align>, i1 <isvolatile>)</pre>
+</div>
+</div>
+<div class="section" id="id368">
+<h5>Overview:<a class="headerlink" href="#id368" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.memset.*</span></tt>‘ intrinsics fill a block of memory with a
+particular byte value.</p>
+<p>Note that, unlike the standard libc function, the <tt class="docutils literal"><span class="pre">llvm.memset</span></tt>
+intrinsic does not return a value and takes extra alignment/volatile
+arguments. Also, the destination can be in an arbitrary address space.</p>
+</div>
+<div class="section" id="id369">
+<h5>Arguments:<a class="headerlink" href="#id369" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is a pointer to the destination to fill, the second
+is the byte value with which to fill it, the third argument is an
+integer argument specifying the number of bytes to fill, and the fourth
+argument is the known alignment of the destination location.</p>
+<p>If the call to this intrinsic has an alignment value that is not 0 or 1,
+then the caller guarantees that the destination pointer is aligned to
+that boundary.</p>
+<p>If the <tt class="docutils literal"><span class="pre">isvolatile</span></tt> parameter is <tt class="docutils literal"><span class="pre">true</span></tt>, the <tt class="docutils literal"><span class="pre">llvm.memset</span></tt> call is
+a <a class="reference internal" href="#volatile"><em>volatile operation</em></a>. The detailed access behavior is not
+very cleanly specified and it is unwise to depend on it.</p>
+</div>
+<div class="section" id="id370">
+<h5>Semantics:<a class="headerlink" href="#id370" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.memset.*</span></tt>‘ intrinsics fill “len” bytes of memory starting
+at the destination location. If the argument is known to be aligned to
+some boundary, this can be specified as the fourth argument, otherwise
+it should be set to 0 or 1 (both meaning no alignment).</p>
+</div>
+</div>
+<div class="section" id="llvm-sqrt-intrinsic">
+<h4><a class="toc-backref" href="#id732">‘<tt class="docutils literal"><span class="pre">llvm.sqrt.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-sqrt-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id371">
+<h5>Syntax:<a class="headerlink" href="#id371" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.sqrt</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.sqrt.f32(float %Val)
+declare double    @llvm.sqrt.f64(double %Val)
+declare x86_fp80  @llvm.sqrt.f80(x86_fp80 %Val)
+declare fp128     @llvm.sqrt.f128(fp128 %Val)
+declare ppc_fp128 @llvm.sqrt.ppcf128(ppc_fp128 %Val)</pre>
+</div>
+</div>
+<div class="section" id="id372">
+<h5>Overview:<a class="headerlink" href="#id372" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.sqrt</span></tt>‘ intrinsics return the sqrt of the specified operand,
+returning the same value as the libm ‘<tt class="docutils literal"><span class="pre">sqrt</span></tt>‘ functions would. Unlike
+<tt class="docutils literal"><span class="pre">sqrt</span></tt> in libm, however, <tt class="docutils literal"><span class="pre">llvm.sqrt</span></tt> has undefined behavior for
+negative numbers other than -0.0 (which allows for better optimization,
+because there is no need to worry about errno being set).
+<tt class="docutils literal"><span class="pre">llvm.sqrt(-0.0)</span></tt> is defined to return -0.0 like IEEE sqrt.</p>
+</div>
+<div class="section" id="id373">
+<h5>Arguments:<a class="headerlink" href="#id373" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id374">
+<h5>Semantics:<a class="headerlink" href="#id374" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the sqrt of the specified operand if it is a
+nonnegative floating point number.</p>
+</div>
+</div>
+<div class="section" id="llvm-powi-intrinsic">
+<h4><a class="toc-backref" href="#id733">‘<tt class="docutils literal"><span class="pre">llvm.powi.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-powi-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id375">
+<h5>Syntax:<a class="headerlink" href="#id375" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.powi</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.powi.f32(float  %Val, i32 %power)
+declare double    @llvm.powi.f64(double %Val, i32 %power)
+declare x86_fp80  @llvm.powi.f80(x86_fp80  %Val, i32 %power)
+declare fp128     @llvm.powi.f128(fp128 %Val, i32 %power)
+declare ppc_fp128 @llvm.powi.ppcf128(ppc_fp128  %Val, i32 %power)</pre>
+</div>
+</div>
+<div class="section" id="id376">
+<h5>Overview:<a class="headerlink" href="#id376" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.powi.*</span></tt>‘ intrinsics return the first operand raised to the
+specified (positive or negative) power. The order of evaluation of
+multiplications is not defined. When a vector of floating point type is
+used, the second argument remains a scalar integer value.</p>
+</div>
+<div class="section" id="id377">
+<h5>Arguments:<a class="headerlink" href="#id377" title="Permalink to this headline">¶</a></h5>
+<p>The second argument is an integer power, and the first is a value to
+raise to that power.</p>
+</div>
+<div class="section" id="id378">
+<h5>Semantics:<a class="headerlink" href="#id378" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the first value raised to the second power with an
+unspecified sequence of rounding operations.</p>
+</div>
+</div>
+<div class="section" id="llvm-sin-intrinsic">
+<h4><a class="toc-backref" href="#id734">‘<tt class="docutils literal"><span class="pre">llvm.sin.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-sin-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id379">
+<h5>Syntax:<a class="headerlink" href="#id379" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.sin</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.sin.f32(float  %Val)
+declare double    @llvm.sin.f64(double %Val)
+declare x86_fp80  @llvm.sin.f80(x86_fp80  %Val)
+declare fp128     @llvm.sin.f128(fp128 %Val)
+declare ppc_fp128 @llvm.sin.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id380">
+<h5>Overview:<a class="headerlink" href="#id380" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.sin.*</span></tt>‘ intrinsics return the sine of the operand.</p>
+</div>
+<div class="section" id="id381">
+<h5>Arguments:<a class="headerlink" href="#id381" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id382">
+<h5>Semantics:<a class="headerlink" href="#id382" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the sine of the specified operand, returning the
+same values as the libm <tt class="docutils literal"><span class="pre">sin</span></tt> functions would, and handles error
+conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-cos-intrinsic">
+<h4><a class="toc-backref" href="#id735">‘<tt class="docutils literal"><span class="pre">llvm.cos.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-cos-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id383">
+<h5>Syntax:<a class="headerlink" href="#id383" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.cos</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.cos.f32(float  %Val)
+declare double    @llvm.cos.f64(double %Val)
+declare x86_fp80  @llvm.cos.f80(x86_fp80  %Val)
+declare fp128     @llvm.cos.f128(fp128 %Val)
+declare ppc_fp128 @llvm.cos.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id384">
+<h5>Overview:<a class="headerlink" href="#id384" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.cos.*</span></tt>‘ intrinsics return the cosine of the operand.</p>
+</div>
+<div class="section" id="id385">
+<h5>Arguments:<a class="headerlink" href="#id385" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id386">
+<h5>Semantics:<a class="headerlink" href="#id386" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the cosine of the specified operand, returning the
+same values as the libm <tt class="docutils literal"><span class="pre">cos</span></tt> functions would, and handles error
+conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-pow-intrinsic">
+<h4><a class="toc-backref" href="#id736">‘<tt class="docutils literal"><span class="pre">llvm.pow.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-pow-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id387">
+<h5>Syntax:<a class="headerlink" href="#id387" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.pow</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.pow.f32(float  %Val, float %Power)
+declare double    @llvm.pow.f64(double %Val, double %Power)
+declare x86_fp80  @llvm.pow.f80(x86_fp80  %Val, x86_fp80 %Power)
+declare fp128     @llvm.pow.f128(fp128 %Val, fp128 %Power)
+declare ppc_fp128 @llvm.pow.ppcf128(ppc_fp128  %Val, ppc_fp128 Power)</pre>
+</div>
+</div>
+<div class="section" id="id388">
+<h5>Overview:<a class="headerlink" href="#id388" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.pow.*</span></tt>‘ intrinsics return the first operand raised to the
+specified (positive or negative) power.</p>
+</div>
+<div class="section" id="id389">
+<h5>Arguments:<a class="headerlink" href="#id389" title="Permalink to this headline">¶</a></h5>
+<p>The second argument is a floating point power, and the first is a value
+to raise to that power.</p>
+</div>
+<div class="section" id="id390">
+<h5>Semantics:<a class="headerlink" href="#id390" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the first value raised to the second power,
+returning the same values as the libm <tt class="docutils literal"><span class="pre">pow</span></tt> functions would, and
+handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-exp-intrinsic">
+<h4><a class="toc-backref" href="#id737">‘<tt class="docutils literal"><span class="pre">llvm.exp.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-exp-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id391">
+<h5>Syntax:<a class="headerlink" href="#id391" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.exp</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>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)</pre>
+</div>
+</div>
+<div class="section" id="id392">
+<h5>Overview:<a class="headerlink" href="#id392" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.exp.*</span></tt>‘ intrinsics perform the exp function.</p>
+</div>
+<div class="section" id="id393">
+<h5>Arguments:<a class="headerlink" href="#id393" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id394">
+<h5>Semantics:<a class="headerlink" href="#id394" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">exp</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-exp2-intrinsic">
+<h4><a class="toc-backref" href="#id738">‘<tt class="docutils literal"><span class="pre">llvm.exp2.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-exp2-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id395">
+<h5>Syntax:<a class="headerlink" href="#id395" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.exp2</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.exp2.f32(float  %Val)
+declare double    @llvm.exp2.f64(double %Val)
+declare x86_fp80  @llvm.exp2.f80(x86_fp80  %Val)
+declare fp128     @llvm.exp2.f128(fp128 %Val)
+declare ppc_fp128 @llvm.exp2.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id396">
+<h5>Overview:<a class="headerlink" href="#id396" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.exp2.*</span></tt>‘ intrinsics perform the exp2 function.</p>
+</div>
+<div class="section" id="id397">
+<h5>Arguments:<a class="headerlink" href="#id397" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id398">
+<h5>Semantics:<a class="headerlink" href="#id398" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">exp2</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-log-intrinsic">
+<h4><a class="toc-backref" href="#id739">‘<tt class="docutils literal"><span class="pre">llvm.log.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-log-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id399">
+<h5>Syntax:<a class="headerlink" href="#id399" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.log</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>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)</pre>
+</div>
+</div>
+<div class="section" id="id400">
+<h5>Overview:<a class="headerlink" href="#id400" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.log.*</span></tt>‘ intrinsics perform the log function.</p>
+</div>
+<div class="section" id="id401">
+<h5>Arguments:<a class="headerlink" href="#id401" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id402">
+<h5>Semantics:<a class="headerlink" href="#id402" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">log</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-log10-intrinsic">
+<h4><a class="toc-backref" href="#id740">‘<tt class="docutils literal"><span class="pre">llvm.log10.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-log10-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id403">
+<h5>Syntax:<a class="headerlink" href="#id403" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.log10</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.log10.f32(float  %Val)
+declare double    @llvm.log10.f64(double %Val)
+declare x86_fp80  @llvm.log10.f80(x86_fp80  %Val)
+declare fp128     @llvm.log10.f128(fp128 %Val)
+declare ppc_fp128 @llvm.log10.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id404">
+<h5>Overview:<a class="headerlink" href="#id404" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.log10.*</span></tt>‘ intrinsics perform the log10 function.</p>
+</div>
+<div class="section" id="id405">
+<h5>Arguments:<a class="headerlink" href="#id405" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id406">
+<h5>Semantics:<a class="headerlink" href="#id406" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">log10</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-log2-intrinsic">
+<h4><a class="toc-backref" href="#id741">‘<tt class="docutils literal"><span class="pre">llvm.log2.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-log2-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id407">
+<h5>Syntax:<a class="headerlink" href="#id407" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.log2</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.log2.f32(float  %Val)
+declare double    @llvm.log2.f64(double %Val)
+declare x86_fp80  @llvm.log2.f80(x86_fp80  %Val)
+declare fp128     @llvm.log2.f128(fp128 %Val)
+declare ppc_fp128 @llvm.log2.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id408">
+<h5>Overview:<a class="headerlink" href="#id408" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.log2.*</span></tt>‘ intrinsics perform the log2 function.</p>
+</div>
+<div class="section" id="id409">
+<h5>Arguments:<a class="headerlink" href="#id409" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id410">
+<h5>Semantics:<a class="headerlink" href="#id410" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">log2</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-fma-intrinsic">
+<h4><a class="toc-backref" href="#id742">‘<tt class="docutils literal"><span class="pre">llvm.fma.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-fma-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id411">
+<h5>Syntax:<a class="headerlink" href="#id411" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.fma</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.fma.f32(float  %a, float  %b, float  %c)
+declare double    @llvm.fma.f64(double %a, double %b, double %c)
+declare x86_fp80  @llvm.fma.f80(x86_fp80 %a, x86_fp80 %b, x86_fp80 %c)
+declare fp128     @llvm.fma.f128(fp128 %a, fp128 %b, fp128 %c)
+declare ppc_fp128 @llvm.fma.ppcf128(ppc_fp128 %a, ppc_fp128 %b, ppc_fp128 %c)</pre>
+</div>
+</div>
+<div class="section" id="id412">
+<h5>Overview:<a class="headerlink" href="#id412" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.fma.*</span></tt>‘ intrinsics perform the fused multiply-add
+operation.</p>
+</div>
+<div class="section" id="id413">
+<h5>Arguments:<a class="headerlink" href="#id413" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id414">
+<h5>Semantics:<a class="headerlink" href="#id414" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">fma</span></tt> functions
+would.</p>
+</div>
+</div>
+<div class="section" id="llvm-fabs-intrinsic">
+<h4><a class="toc-backref" href="#id743">‘<tt class="docutils literal"><span class="pre">llvm.fabs.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-fabs-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id415">
+<h5>Syntax:<a class="headerlink" href="#id415" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.fabs</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.fabs.f32(float  %Val)
+declare double    @llvm.fabs.f64(double %Val)
+declare x86_fp80  @llvm.fabs.f80(x86_fp80  %Val)
+declare fp128     @llvm.fabs.f128(fp128 %Val)
+declare ppc_fp128 @llvm.fabs.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id416">
+<h5>Overview:<a class="headerlink" href="#id416" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.fabs.*</span></tt>‘ intrinsics return the absolute value of the
+operand.</p>
+</div>
+<div class="section" id="id417">
+<h5>Arguments:<a class="headerlink" href="#id417" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id418">
+<h5>Semantics:<a class="headerlink" href="#id418" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">fabs</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-copysign-intrinsic">
+<h4><a class="toc-backref" href="#id744">‘<tt class="docutils literal"><span class="pre">llvm.copysign.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-copysign-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id419">
+<h5>Syntax:<a class="headerlink" href="#id419" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.copysign</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.copysign.f32(float  %Mag, float  %Sgn)
+declare double    @llvm.copysign.f64(double %Mag, double %Sgn)
+declare x86_fp80  @llvm.copysign.f80(x86_fp80  %Mag, x86_fp80  %Sgn)
+declare fp128     @llvm.copysign.f128(fp128 %Mag, fp128 %Sgn)
+declare ppc_fp128 @llvm.copysign.ppcf128(ppc_fp128  %Mag, ppc_fp128  %Sgn)</pre>
+</div>
+</div>
+<div class="section" id="id420">
+<h5>Overview:<a class="headerlink" href="#id420" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.copysign.*</span></tt>‘ intrinsics return a value with the magnitude of the
+first operand and the sign of the second operand.</p>
+</div>
+<div class="section" id="id421">
+<h5>Arguments:<a class="headerlink" href="#id421" title="Permalink to this headline">¶</a></h5>
+<p>The arguments and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id422">
+<h5>Semantics:<a class="headerlink" href="#id422" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">copysign</span></tt>
+functions would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-floor-intrinsic">
+<h4><a class="toc-backref" href="#id745">‘<tt class="docutils literal"><span class="pre">llvm.floor.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-floor-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id423">
+<h5>Syntax:<a class="headerlink" href="#id423" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.floor</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.floor.f32(float  %Val)
+declare double    @llvm.floor.f64(double %Val)
+declare x86_fp80  @llvm.floor.f80(x86_fp80  %Val)
+declare fp128     @llvm.floor.f128(fp128 %Val)
+declare ppc_fp128 @llvm.floor.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id424">
+<h5>Overview:<a class="headerlink" href="#id424" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.floor.*</span></tt>‘ intrinsics return the floor of the operand.</p>
+</div>
+<div class="section" id="id425">
+<h5>Arguments:<a class="headerlink" href="#id425" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id426">
+<h5>Semantics:<a class="headerlink" href="#id426" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">floor</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-ceil-intrinsic">
+<h4><a class="toc-backref" href="#id746">‘<tt class="docutils literal"><span class="pre">llvm.ceil.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-ceil-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id427">
+<h5>Syntax:<a class="headerlink" href="#id427" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.ceil</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.ceil.f32(float  %Val)
+declare double    @llvm.ceil.f64(double %Val)
+declare x86_fp80  @llvm.ceil.f80(x86_fp80  %Val)
+declare fp128     @llvm.ceil.f128(fp128 %Val)
+declare ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id428">
+<h5>Overview:<a class="headerlink" href="#id428" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.ceil.*</span></tt>‘ intrinsics return the ceiling of the operand.</p>
+</div>
+<div class="section" id="id429">
+<h5>Arguments:<a class="headerlink" href="#id429" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id430">
+<h5>Semantics:<a class="headerlink" href="#id430" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">ceil</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-trunc-intrinsic">
+<h4><a class="toc-backref" href="#id747">‘<tt class="docutils literal"><span class="pre">llvm.trunc.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-trunc-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id431">
+<h5>Syntax:<a class="headerlink" href="#id431" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.trunc</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.trunc.f32(float  %Val)
+declare double    @llvm.trunc.f64(double %Val)
+declare x86_fp80  @llvm.trunc.f80(x86_fp80  %Val)
+declare fp128     @llvm.trunc.f128(fp128 %Val)
+declare ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id432">
+<h5>Overview:<a class="headerlink" href="#id432" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.trunc.*</span></tt>‘ intrinsics returns the operand rounded to the
+nearest integer not larger in magnitude than the operand.</p>
+</div>
+<div class="section" id="id433">
+<h5>Arguments:<a class="headerlink" href="#id433" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id434">
+<h5>Semantics:<a class="headerlink" href="#id434" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">trunc</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-rint-intrinsic">
+<h4><a class="toc-backref" href="#id748">‘<tt class="docutils literal"><span class="pre">llvm.rint.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-rint-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id435">
+<h5>Syntax:<a class="headerlink" href="#id435" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.rint</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.rint.f32(float  %Val)
+declare double    @llvm.rint.f64(double %Val)
+declare x86_fp80  @llvm.rint.f80(x86_fp80  %Val)
+declare fp128     @llvm.rint.f128(fp128 %Val)
+declare ppc_fp128 @llvm.rint.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id436">
+<h5>Overview:<a class="headerlink" href="#id436" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.rint.*</span></tt>‘ intrinsics returns the operand rounded to the
+nearest integer. It may raise an inexact floating-point exception if the
+operand isn’t an integer.</p>
+</div>
+<div class="section" id="id437">
+<h5>Arguments:<a class="headerlink" href="#id437" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id438">
+<h5>Semantics:<a class="headerlink" href="#id438" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">rint</span></tt> functions
+would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-nearbyint-intrinsic">
+<h4><a class="toc-backref" href="#id749">‘<tt class="docutils literal"><span class="pre">llvm.nearbyint.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-nearbyint-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id439">
+<h5>Syntax:<a class="headerlink" href="#id439" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.nearbyint</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.nearbyint.f32(float  %Val)
+declare double    @llvm.nearbyint.f64(double %Val)
+declare x86_fp80  @llvm.nearbyint.f80(x86_fp80  %Val)
+declare fp128     @llvm.nearbyint.f128(fp128 %Val)
+declare ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id440">
+<h5>Overview:<a class="headerlink" href="#id440" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.nearbyint.*</span></tt>‘ intrinsics returns the operand rounded to the
+nearest integer.</p>
+</div>
+<div class="section" id="id441">
+<h5>Arguments:<a class="headerlink" href="#id441" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id442">
+<h5>Semantics:<a class="headerlink" href="#id442" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">nearbyint</span></tt>
+functions would, and handles error conditions in the same way.</p>
+</div>
+</div>
+<div class="section" id="llvm-round-intrinsic">
+<h4><a class="toc-backref" href="#id750">‘<tt class="docutils literal"><span class="pre">llvm.round.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-round-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id443">
+<h5>Syntax:<a class="headerlink" href="#id443" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.round</span></tt> on any
+floating point or vector of floating point type. Not all targets support
+all types however.</p>
+<div class="highlight-python"><pre>declare float     @llvm.round.f32(float  %Val)
+declare double    @llvm.round.f64(double %Val)
+declare x86_fp80  @llvm.round.f80(x86_fp80  %Val)
+declare fp128     @llvm.round.f128(fp128 %Val)
+declare ppc_fp128 @llvm.round.ppcf128(ppc_fp128  %Val)</pre>
+</div>
+</div>
+<div class="section" id="id444">
+<h5>Overview:<a class="headerlink" href="#id444" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.round.*</span></tt>‘ intrinsics returns the operand rounded to the
+nearest integer.</p>
+</div>
+<div class="section" id="id445">
+<h5>Arguments:<a class="headerlink" href="#id445" title="Permalink to this headline">¶</a></h5>
+<p>The argument and return value are floating point numbers of the same
+type.</p>
+</div>
+<div class="section" id="id446">
+<h5>Semantics:<a class="headerlink" href="#id446" title="Permalink to this headline">¶</a></h5>
+<p>This function returns the same values as the libm <tt class="docutils literal"><span class="pre">round</span></tt>
+functions would, and handles error conditions in the same way.</p>
+</div>
+</div>
+</div>
+<div class="section" id="bit-manipulation-intrinsics">
+<h3><a class="toc-backref" href="#id751">Bit Manipulation Intrinsics</a><a class="headerlink" href="#bit-manipulation-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>LLVM provides intrinsics for a few important bit manipulation
+operations. These allow efficient code generation for some algorithms.</p>
+<div class="section" id="llvm-bswap-intrinsics">
+<h4><a class="toc-backref" href="#id752">‘<tt class="docutils literal"><span class="pre">llvm.bswap.*</span></tt>‘ Intrinsics</a><a class="headerlink" href="#llvm-bswap-intrinsics" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id447">
+<h5>Syntax:<a class="headerlink" href="#id447" title="Permalink to this headline">¶</a></h5>
+<p>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).</p>
+<div class="highlight-python"><pre>declare i16 @llvm.bswap.i16(i16 <id>)
+declare i32 @llvm.bswap.i32(i32 <id>)
+declare i64 @llvm.bswap.i64(i64 <id>)</pre>
+</div>
+</div>
+<div class="section" id="id448">
+<h5>Overview:<a class="headerlink" href="#id448" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.bswap</span></tt>‘ family of intrinsics is used to byte swap integer
+values with an even number of bytes (positive multiple of 16 bits).
+These are useful for performing operations on data that is not in the
+target’s native byte order.</p>
+</div>
+<div class="section" id="id449">
+<h5>Semantics:<a class="headerlink" href="#id449" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.bswap.i16</span></tt> intrinsic returns an i16 value that has the high
+and low byte of the input i16 swapped. Similarly, the <tt class="docutils literal"><span class="pre">llvm.bswap.i32</span></tt>
+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
+<tt class="docutils literal"><span class="pre">llvm.bswap.i48</span></tt>, <tt class="docutils literal"><span class="pre">llvm.bswap.i64</span></tt> and other intrinsics extend this
+concept to additional even-byte lengths (6 bytes, 8 bytes and more,
+respectively).</p>
+</div>
+</div>
+<div class="section" id="llvm-ctpop-intrinsic">
+<h4><a class="toc-backref" href="#id753">‘<tt class="docutils literal"><span class="pre">llvm.ctpop.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-ctpop-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id450">
+<h5>Syntax:<a class="headerlink" href="#id450" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use llvm.ctpop on any integer
+bit width, or on any vector with integer elements. Not all targets
+support all bit widths or vector types, however.</p>
+<div class="highlight-python"><pre>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>)
+declare i256 @llvm.ctpop.i256(i256 <src>)
+declare <2 x i32> @llvm.ctpop.v2i32(<2 x i32> <src>)</pre>
+</div>
+</div>
+<div class="section" id="id451">
+<h5>Overview:<a class="headerlink" href="#id451" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.ctpop</span></tt>‘ family of intrinsics counts the number of bits set
+in a value.</p>
+</div>
+<div class="section" id="id452">
+<h5>Arguments:<a class="headerlink" href="#id452" title="Permalink to this headline">¶</a></h5>
+<p>The only argument is the value to be counted. The argument may be of any
+integer type, or a vector with integer elements. The return type must
+match the argument type.</p>
+</div>
+<div class="section" id="id453">
+<h5>Semantics:<a class="headerlink" href="#id453" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.ctpop</span></tt>‘ intrinsic counts the 1’s in a variable, or within
+each element of a vector.</p>
+</div>
+</div>
+<div class="section" id="llvm-ctlz-intrinsic">
+<h4><a class="toc-backref" href="#id754">‘<tt class="docutils literal"><span class="pre">llvm.ctlz.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-ctlz-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id454">
+<h5>Syntax:<a class="headerlink" href="#id454" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.ctlz</span></tt> on any
+integer bit width, or any vector whose elements are integers. Not all
+targets support all bit widths or vector types, however.</p>
+<div class="highlight-python"><pre>declare i8   @llvm.ctlz.i8  (i8   <src>, i1 <is_zero_undef>)
+declare i16  @llvm.ctlz.i16 (i16  <src>, i1 <is_zero_undef>)
+declare i32  @llvm.ctlz.i32 (i32  <src>, i1 <is_zero_undef>)
+declare i64  @llvm.ctlz.i64 (i64  <src>, i1 <is_zero_undef>)
+declare i256 @llvm.ctlz.i256(i256 <src>, i1 <is_zero_undef>)
+declase <2 x i32> @llvm.ctlz.v2i32(<2 x i32> <src>, i1 <is_zero_undef>)</pre>
+</div>
+</div>
+<div class="section" id="id455">
+<h5>Overview:<a class="headerlink" href="#id455" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.ctlz</span></tt>‘ family of intrinsic functions counts the number of
+leading zeros in a variable.</p>
+</div>
+<div class="section" id="id456">
+<h5>Arguments:<a class="headerlink" href="#id456" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is the value to be counted. This argument may be of
+any integer type, or a vectory with integer element type. The return
+type must match the first argument type.</p>
+<p>The second argument must be a constant and is a flag to indicate whether
+the intrinsic should ensure that a zero as the first argument produces a
+defined result. Historically some architectures did not provide a
+defined result for zero values as efficiently, and many algorithms are
+now predicated on avoiding zero-value inputs.</p>
+</div>
+<div class="section" id="id457">
+<h5>Semantics:<a class="headerlink" href="#id457" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.ctlz</span></tt>‘ intrinsic counts the leading (most significant)
+zeros in a variable, or within each element of the vector. If
+<tt class="docutils literal"><span class="pre">src</span> <span class="pre">==</span> <span class="pre">0</span></tt> then the result is the size in bits of the type of <tt class="docutils literal"><span class="pre">src</span></tt>
+if <tt class="docutils literal"><span class="pre">is_zero_undef</span> <span class="pre">==</span> <span class="pre">0</span></tt> and <tt class="docutils literal"><span class="pre">undef</span></tt> otherwise. For example,
+<tt class="docutils literal"><span class="pre">llvm.ctlz(i32</span> <span class="pre">2)</span> <span class="pre">=</span> <span class="pre">30</span></tt>.</p>
+</div>
+</div>
+<div class="section" id="llvm-cttz-intrinsic">
+<h4><a class="toc-backref" href="#id755">‘<tt class="docutils literal"><span class="pre">llvm.cttz.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-cttz-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id458">
+<h5>Syntax:<a class="headerlink" href="#id458" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.cttz</span></tt> on any
+integer bit width, or any vector of integer elements. Not all targets
+support all bit widths or vector types, however.</p>
+<div class="highlight-python"><pre>declare i8   @llvm.cttz.i8  (i8   <src>, i1 <is_zero_undef>)
+declare i16  @llvm.cttz.i16 (i16  <src>, i1 <is_zero_undef>)
+declare i32  @llvm.cttz.i32 (i32  <src>, i1 <is_zero_undef>)
+declare i64  @llvm.cttz.i64 (i64  <src>, i1 <is_zero_undef>)
+declare i256 @llvm.cttz.i256(i256 <src>, i1 <is_zero_undef>)
+declase <2 x i32> @llvm.cttz.v2i32(<2 x i32> <src>, i1 <is_zero_undef>)</pre>
+</div>
+</div>
+<div class="section" id="id459">
+<h5>Overview:<a class="headerlink" href="#id459" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.cttz</span></tt>‘ family of intrinsic functions counts the number of
+trailing zeros.</p>
+</div>
+<div class="section" id="id460">
+<h5>Arguments:<a class="headerlink" href="#id460" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is the value to be counted. This argument may be of
+any integer type, or a vectory with integer element type. The return
+type must match the first argument type.</p>
+<p>The second argument must be a constant and is a flag to indicate whether
+the intrinsic should ensure that a zero as the first argument produces a
+defined result. Historically some architectures did not provide a
+defined result for zero values as efficiently, and many algorithms are
+now predicated on avoiding zero-value inputs.</p>
+</div>
+<div class="section" id="id461">
+<h5>Semantics:<a class="headerlink" href="#id461" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.cttz</span></tt>‘ intrinsic counts the trailing (least significant)
+zeros in a variable, or within each element of a vector. If <tt class="docutils literal"><span class="pre">src</span> <span class="pre">==</span> <span class="pre">0</span></tt>
+then the result is the size in bits of the type of <tt class="docutils literal"><span class="pre">src</span></tt> if
+<tt class="docutils literal"><span class="pre">is_zero_undef</span> <span class="pre">==</span> <span class="pre">0</span></tt> and <tt class="docutils literal"><span class="pre">undef</span></tt> otherwise. For example,
+<tt class="docutils literal"><span class="pre">llvm.cttz(2)</span> <span class="pre">=</span> <span class="pre">1</span></tt>.</p>
+</div>
+</div>
+</div>
+<div class="section" id="arithmetic-with-overflow-intrinsics">
+<h3><a class="toc-backref" href="#id756">Arithmetic with Overflow Intrinsics</a><a class="headerlink" href="#arithmetic-with-overflow-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>LLVM provides intrinsics for some arithmetic with overflow operations.</p>
+<div class="section" id="llvm-sadd-with-overflow-intrinsics">
+<h4><a class="toc-backref" href="#id757">‘<tt class="docutils literal"><span class="pre">llvm.sadd.with.overflow.*</span></tt>‘ Intrinsics</a><a class="headerlink" href="#llvm-sadd-with-overflow-intrinsics" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id462">
+<h5>Syntax:<a class="headerlink" href="#id462" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.sadd.with.overflow</span></tt>
+on any integer bit width.</p>
+<div class="highlight-python"><pre>declare {i16, i1} @llvm.sadd.with.overflow.i16(i16 %a, i16 %b)
+declare {i32, i1} @llvm.sadd.with.overflow.i32(i32 %a, i32 %b)
+declare {i64, i1} @llvm.sadd.with.overflow.i64(i64 %a, i64 %b)</pre>
+</div>
+</div>
+<div class="section" id="id463">
+<h5>Overview:<a class="headerlink" href="#id463" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.sadd.with.overflow</span></tt>‘ family of intrinsic functions perform
+a signed addition of the two arguments, and indicate whether an overflow
+occurred during the signed summation.</p>
+</div>
+<div class="section" id="id464">
+<h5>Arguments:<a class="headerlink" href="#id464" title="Permalink to this headline">¶</a></h5>
+<p>The arguments (%a and %b) and the first element of the result structure
+may be of integer types of any bit width, but they must have the same
+bit width. The second element of the result structure must be of type
+<tt class="docutils literal"><span class="pre">i1</span></tt>. <tt class="docutils literal"><span class="pre">%a</span></tt> and <tt class="docutils literal"><span class="pre">%b</span></tt> are the two values that will undergo signed
+addition.</p>
+</div>
+<div class="section" id="id465">
+<h5>Semantics:<a class="headerlink" href="#id465" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.sadd.with.overflow</span></tt>‘ family of intrinsic functions perform
+a signed addition of the two variables. They return a structure — the
+first element of which is the signed summation, and the second element
+of which is a bit specifying if the signed summation resulted in an
+overflow.</p>
+</div>
+<div class="section" id="id466">
+<h5>Examples:<a class="headerlink" href="#id466" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%res</span> <span class="p">=</span> <span class="k">call</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="vg">@llvm.sadd.with.overflow.i32</span><span class="p">(</span><span class="k">i32</span> <span class="nv">%a</span><span class="p">,</span> <span class="k">i32</span> <span class="nv">%b</span><span class="p">)</span>
+<span class="nv">%sum</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">0</span>
+<span class="nv">%obit</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">1</span>
+<span class="k">br</span> <span class="k">i1</span> <span class="nv">%obit</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%overflow</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%normal</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="llvm-uadd-with-overflow-intrinsics">
+<h4><a class="toc-backref" href="#id758">‘<tt class="docutils literal"><span class="pre">llvm.uadd.with.overflow.*</span></tt>‘ Intrinsics</a><a class="headerlink" href="#llvm-uadd-with-overflow-intrinsics" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id467">
+<h5>Syntax:<a class="headerlink" href="#id467" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.uadd.with.overflow</span></tt>
+on any integer bit width.</p>
+<div class="highlight-python"><pre>declare {i16, i1} @llvm.uadd.with.overflow.i16(i16 %a, i16 %b)
+declare {i32, i1} @llvm.uadd.with.overflow.i32(i32 %a, i32 %b)
+declare {i64, i1} @llvm.uadd.with.overflow.i64(i64 %a, i64 %b)</pre>
+</div>
+</div>
+<div class="section" id="id468">
+<h5>Overview:<a class="headerlink" href="#id468" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.uadd.with.overflow</span></tt>‘ family of intrinsic functions perform
+an unsigned addition of the two arguments, and indicate whether a carry
+occurred during the unsigned summation.</p>
+</div>
+<div class="section" id="id469">
+<h5>Arguments:<a class="headerlink" href="#id469" title="Permalink to this headline">¶</a></h5>
+<p>The arguments (%a and %b) and the first element of the result structure
+may be of integer types of any bit width, but they must have the same
+bit width. The second element of the result structure must be of type
+<tt class="docutils literal"><span class="pre">i1</span></tt>. <tt class="docutils literal"><span class="pre">%a</span></tt> and <tt class="docutils literal"><span class="pre">%b</span></tt> are the two values that will undergo unsigned
+addition.</p>
+</div>
+<div class="section" id="id470">
+<h5>Semantics:<a class="headerlink" href="#id470" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.uadd.with.overflow</span></tt>‘ family of intrinsic functions perform
+an unsigned addition of the two arguments. They return a structure — the
+first element of which is the sum, and the second element of which is a
+bit specifying if the unsigned summation resulted in a carry.</p>
+</div>
+<div class="section" id="id471">
+<h5>Examples:<a class="headerlink" href="#id471" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%res</span> <span class="p">=</span> <span class="k">call</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="vg">@llvm.uadd.with.overflow.i32</span><span class="p">(</span><span class="k">i32</span> <span class="nv">%a</span><span class="p">,</span> <span class="k">i32</span> <span class="nv">%b</span><span class="p">)</span>
+<span class="nv">%sum</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">0</span>
+<span class="nv">%obit</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">1</span>
+<span class="k">br</span> <span class="k">i1</span> <span class="nv">%obit</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%carry</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%normal</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="llvm-ssub-with-overflow-intrinsics">
+<h4><a class="toc-backref" href="#id759">‘<tt class="docutils literal"><span class="pre">llvm.ssub.with.overflow.*</span></tt>‘ Intrinsics</a><a class="headerlink" href="#llvm-ssub-with-overflow-intrinsics" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id472">
+<h5>Syntax:<a class="headerlink" href="#id472" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.ssub.with.overflow</span></tt>
+on any integer bit width.</p>
+<div class="highlight-python"><pre>declare {i16, i1} @llvm.ssub.with.overflow.i16(i16 %a, i16 %b)
+declare {i32, i1} @llvm.ssub.with.overflow.i32(i32 %a, i32 %b)
+declare {i64, i1} @llvm.ssub.with.overflow.i64(i64 %a, i64 %b)</pre>
+</div>
+</div>
+<div class="section" id="id473">
+<h5>Overview:<a class="headerlink" href="#id473" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.ssub.with.overflow</span></tt>‘ family of intrinsic functions perform
+a signed subtraction of the two arguments, and indicate whether an
+overflow occurred during the signed subtraction.</p>
+</div>
+<div class="section" id="id474">
+<h5>Arguments:<a class="headerlink" href="#id474" title="Permalink to this headline">¶</a></h5>
+<p>The arguments (%a and %b) and the first element of the result structure
+may be of integer types of any bit width, but they must have the same
+bit width. The second element of the result structure must be of type
+<tt class="docutils literal"><span class="pre">i1</span></tt>. <tt class="docutils literal"><span class="pre">%a</span></tt> and <tt class="docutils literal"><span class="pre">%b</span></tt> are the two values that will undergo signed
+subtraction.</p>
+</div>
+<div class="section" id="id475">
+<h5>Semantics:<a class="headerlink" href="#id475" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.ssub.with.overflow</span></tt>‘ family of intrinsic functions perform
+a signed subtraction of the two arguments. They return a structure — the
+first element of which is the subtraction, and the second element of
+which is a bit specifying if the signed subtraction resulted in an
+overflow.</p>
+</div>
+<div class="section" id="id476">
+<h5>Examples:<a class="headerlink" href="#id476" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%res</span> <span class="p">=</span> <span class="k">call</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="vg">@llvm.ssub.with.overflow.i32</span><span class="p">(</span><span class="k">i32</span> <span class="nv">%a</span><span class="p">,</span> <span class="k">i32</span> <span class="nv">%b</span><span class="p">)</span>
+<span class="nv">%sum</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">0</span>
+<span class="nv">%obit</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">1</span>
+<span class="k">br</span> <span class="k">i1</span> <span class="nv">%obit</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%overflow</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%normal</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="llvm-usub-with-overflow-intrinsics">
+<h4><a class="toc-backref" href="#id760">‘<tt class="docutils literal"><span class="pre">llvm.usub.with.overflow.*</span></tt>‘ Intrinsics</a><a class="headerlink" href="#llvm-usub-with-overflow-intrinsics" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id477">
+<h5>Syntax:<a class="headerlink" href="#id477" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.usub.with.overflow</span></tt>
+on any integer bit width.</p>
+<div class="highlight-python"><pre>declare {i16, i1} @llvm.usub.with.overflow.i16(i16 %a, i16 %b)
+declare {i32, i1} @llvm.usub.with.overflow.i32(i32 %a, i32 %b)
+declare {i64, i1} @llvm.usub.with.overflow.i64(i64 %a, i64 %b)</pre>
+</div>
+</div>
+<div class="section" id="id478">
+<h5>Overview:<a class="headerlink" href="#id478" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.usub.with.overflow</span></tt>‘ family of intrinsic functions perform
+an unsigned subtraction of the two arguments, and indicate whether an
+overflow occurred during the unsigned subtraction.</p>
+</div>
+<div class="section" id="id479">
+<h5>Arguments:<a class="headerlink" href="#id479" title="Permalink to this headline">¶</a></h5>
+<p>The arguments (%a and %b) and the first element of the result structure
+may be of integer types of any bit width, but they must have the same
+bit width. The second element of the result structure must be of type
+<tt class="docutils literal"><span class="pre">i1</span></tt>. <tt class="docutils literal"><span class="pre">%a</span></tt> and <tt class="docutils literal"><span class="pre">%b</span></tt> are the two values that will undergo unsigned
+subtraction.</p>
+</div>
+<div class="section" id="id480">
+<h5>Semantics:<a class="headerlink" href="#id480" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.usub.with.overflow</span></tt>‘ family of intrinsic functions perform
+an unsigned subtraction of the two arguments. They return a structure —
+the first element of which is the subtraction, and the second element of
+which is a bit specifying if the unsigned subtraction resulted in an
+overflow.</p>
+</div>
+<div class="section" id="id481">
+<h5>Examples:<a class="headerlink" href="#id481" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%res</span> <span class="p">=</span> <span class="k">call</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="vg">@llvm.usub.with.overflow.i32</span><span class="p">(</span><span class="k">i32</span> <span class="nv">%a</span><span class="p">,</span> <span class="k">i32</span> <span class="nv">%b</span><span class="p">)</span>
+<span class="nv">%sum</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">0</span>
+<span class="nv">%obit</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">1</span>
+<span class="k">br</span> <span class="k">i1</span> <span class="nv">%obit</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%overflow</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%normal</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="llvm-smul-with-overflow-intrinsics">
+<h4><a class="toc-backref" href="#id761">‘<tt class="docutils literal"><span class="pre">llvm.smul.with.overflow.*</span></tt>‘ Intrinsics</a><a class="headerlink" href="#llvm-smul-with-overflow-intrinsics" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id482">
+<h5>Syntax:<a class="headerlink" href="#id482" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.smul.with.overflow</span></tt>
+on any integer bit width.</p>
+<div class="highlight-python"><pre>declare {i16, i1} @llvm.smul.with.overflow.i16(i16 %a, i16 %b)
+declare {i32, i1} @llvm.smul.with.overflow.i32(i32 %a, i32 %b)
+declare {i64, i1} @llvm.smul.with.overflow.i64(i64 %a, i64 %b)</pre>
+</div>
+</div>
+<div class="section" id="id483">
+<h5>Overview:<a class="headerlink" href="#id483" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.smul.with.overflow</span></tt>‘ family of intrinsic functions perform
+a signed multiplication of the two arguments, and indicate whether an
+overflow occurred during the signed multiplication.</p>
+</div>
+<div class="section" id="id484">
+<h5>Arguments:<a class="headerlink" href="#id484" title="Permalink to this headline">¶</a></h5>
+<p>The arguments (%a and %b) and the first element of the result structure
+may be of integer types of any bit width, but they must have the same
+bit width. The second element of the result structure must be of type
+<tt class="docutils literal"><span class="pre">i1</span></tt>. <tt class="docutils literal"><span class="pre">%a</span></tt> and <tt class="docutils literal"><span class="pre">%b</span></tt> are the two values that will undergo signed
+multiplication.</p>
+</div>
+<div class="section" id="id485">
+<h5>Semantics:<a class="headerlink" href="#id485" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.smul.with.overflow</span></tt>‘ family of intrinsic functions perform
+a signed multiplication of the two arguments. They return a structure —
+the first element of which is the multiplication, and the second element
+of which is a bit specifying if the signed multiplication resulted in an
+overflow.</p>
+</div>
+<div class="section" id="id486">
+<h5>Examples:<a class="headerlink" href="#id486" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%res</span> <span class="p">=</span> <span class="k">call</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="vg">@llvm.smul.with.overflow.i32</span><span class="p">(</span><span class="k">i32</span> <span class="nv">%a</span><span class="p">,</span> <span class="k">i32</span> <span class="nv">%b</span><span class="p">)</span>
+<span class="nv">%sum</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">0</span>
+<span class="nv">%obit</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">1</span>
+<span class="k">br</span> <span class="k">i1</span> <span class="nv">%obit</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%overflow</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%normal</span>
+</pre></div>
+</div>
+</div>
+</div>
+<div class="section" id="llvm-umul-with-overflow-intrinsics">
+<h4><a class="toc-backref" href="#id762">‘<tt class="docutils literal"><span class="pre">llvm.umul.with.overflow.*</span></tt>‘ Intrinsics</a><a class="headerlink" href="#llvm-umul-with-overflow-intrinsics" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id487">
+<h5>Syntax:<a class="headerlink" href="#id487" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use <tt class="docutils literal"><span class="pre">llvm.umul.with.overflow</span></tt>
+on any integer bit width.</p>
+<div class="highlight-python"><pre>declare {i16, i1} @llvm.umul.with.overflow.i16(i16 %a, i16 %b)
+declare {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b)
+declare {i64, i1} @llvm.umul.with.overflow.i64(i64 %a, i64 %b)</pre>
+</div>
+</div>
+<div class="section" id="id488">
+<h5>Overview:<a class="headerlink" href="#id488" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.umul.with.overflow</span></tt>‘ family of intrinsic functions perform
+a unsigned multiplication of the two arguments, and indicate whether an
+overflow occurred during the unsigned multiplication.</p>
+</div>
+<div class="section" id="id489">
+<h5>Arguments:<a class="headerlink" href="#id489" title="Permalink to this headline">¶</a></h5>
+<p>The arguments (%a and %b) and the first element of the result structure
+may be of integer types of any bit width, but they must have the same
+bit width. The second element of the result structure must be of type
+<tt class="docutils literal"><span class="pre">i1</span></tt>. <tt class="docutils literal"><span class="pre">%a</span></tt> and <tt class="docutils literal"><span class="pre">%b</span></tt> are the two values that will undergo unsigned
+multiplication.</p>
+</div>
+<div class="section" id="id490">
+<h5>Semantics:<a class="headerlink" href="#id490" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.umul.with.overflow</span></tt>‘ family of intrinsic functions perform
+an unsigned multiplication of the two arguments. They return a structure —
+the first element of which is the multiplication, and the second
+element of which is a bit specifying if the unsigned multiplication
+resulted in an overflow.</p>
+</div>
+<div class="section" id="id491">
+<h5>Examples:<a class="headerlink" href="#id491" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%res</span> <span class="p">=</span> <span class="k">call</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="vg">@llvm.umul.with.overflow.i32</span><span class="p">(</span><span class="k">i32</span> <span class="nv">%a</span><span class="p">,</span> <span class="k">i32</span> <span class="nv">%b</span><span class="p">)</span>
+<span class="nv">%sum</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">0</span>
+<span class="nv">%obit</span> <span class="p">=</span> <span class="k">extractvalue</span> <span class="p">{</span><span class="k">i32</span><span class="p">,</span> <span class="k">i1</span><span class="p">}</span> <span class="nv">%res</span><span class="p">,</span> <span class="m">1</span>
+<span class="k">br</span> <span class="k">i1</span> <span class="nv">%obit</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%overflow</span><span class="p">,</span> <span class="kt">label</span> <span class="nv">%normal</span>
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="specialised-arithmetic-intrinsics">
+<h3><a class="toc-backref" href="#id763">Specialised Arithmetic Intrinsics</a><a class="headerlink" href="#specialised-arithmetic-intrinsics" title="Permalink to this headline">¶</a></h3>
+<div class="section" id="llvm-fmuladd-intrinsic">
+<h4><a class="toc-backref" href="#id764">‘<tt class="docutils literal"><span class="pre">llvm.fmuladd.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-fmuladd-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id492">
+<h5>Syntax:<a class="headerlink" href="#id492" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare float @llvm.fmuladd.f32(float %a, float %b, float %c)
+declare double @llvm.fmuladd.f64(double %a, double %b, double %c)</pre>
+</div>
+</div>
+<div class="section" id="id493">
+<h5>Overview:<a class="headerlink" href="#id493" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.fmuladd.*</span></tt>‘ intrinsic functions represent multiply-add
+expressions that can be fused if the code generator determines that (a) the
+target instruction set has support for a fused operation, and (b) that the
+fused operation is more efficient than the equivalent, separate pair of mul
+and add instructions.</p>
+</div>
+<div class="section" id="id494">
+<h5>Arguments:<a class="headerlink" href="#id494" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.fmuladd.*</span></tt>‘ intrinsics each take three arguments: two
+multiplicands, a and b, and an addend c.</p>
+</div>
+<div class="section" id="id495">
+<h5>Semantics:<a class="headerlink" href="#id495" title="Permalink to this headline">¶</a></h5>
+<p>The expression:</p>
+<div class="highlight-python"><pre>%0 = call float @llvm.fmuladd.f32(%a, %b, %c)</pre>
+</div>
+<p>is equivalent to the expression a * b + c, except that rounding will
+not be performed between the multiplication and addition steps if the
+code generator fuses the operations. Fusion is not guaranteed, even if
+the target platform supports it. If a fused multiply-add is required the
+corresponding llvm.fma.* intrinsic function should be used instead.</p>
+</div>
+<div class="section" id="id496">
+<h5>Examples:<a class="headerlink" href="#id496" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%r2</span> <span class="p">=</span> <span class="k">call</span> <span class="kt">float</span> <span class="vg">@llvm.fmuladd.f32</span><span class="p">(</span><span class="kt">float</span> <span class="nv">%a</span><span class="p">,</span> <span class="kt">float</span> <span class="nv">%b</span><span class="p">,</span> <span class="kt">float</span> <span class="nv">%c</span><span class="p">)</span> <span class="c">; yields {float}:r2 = (a * b) + c</span>
+</pre></div>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="half-precision-floating-point-intrinsics">
+<h3><a class="toc-backref" href="#id765">Half Precision Floating Point Intrinsics</a><a class="headerlink" href="#half-precision-floating-point-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>For most target platforms, 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 format.</p>
+<p>This means that code must first load the half-precision floating point
+value as an i16, then convert it to float with
+<a class="reference internal" href="#int-convert-from-fp16"><em>llvm.convert.from.fp16</em></a>. Computation can
+then be performed on the float value (including extending to double
+etc). To store the value back to memory, it is first converted to float
+if needed, then converted to i16 with
+<a class="reference internal" href="#int-convert-to-fp16"><em>llvm.convert.to.fp16</em></a>, then storing as an
+i16 value.</p>
+<div class="section" id="llvm-convert-to-fp16-intrinsic">
+<span id="int-convert-to-fp16"></span><h4><a class="toc-backref" href="#id766">‘<tt class="docutils literal"><span class="pre">llvm.convert.to.fp16</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-convert-to-fp16-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id497">
+<h5>Syntax:<a class="headerlink" href="#id497" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare i16 @llvm.convert.to.fp16(f32 %a)</pre>
+</div>
+</div>
+<div class="section" id="id498">
+<h5>Overview:<a class="headerlink" href="#id498" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.convert.to.fp16</span></tt>‘ intrinsic function performs a conversion
+from single precision floating point format to half precision floating
+point format.</p>
+</div>
+<div class="section" id="id499">
+<h5>Arguments:<a class="headerlink" href="#id499" title="Permalink to this headline">¶</a></h5>
+<p>The intrinsic function contains single argument - the value to be
+converted.</p>
+</div>
+<div class="section" id="id500">
+<h5>Semantics:<a class="headerlink" href="#id500" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.convert.to.fp16</span></tt>‘ intrinsic function performs a conversion
+from single precision floating point format to half precision floating
+point format. The return value is an <tt class="docutils literal"><span class="pre">i16</span></tt> which contains the
+converted number.</p>
+</div>
+<div class="section" id="id501">
+<h5>Examples:<a class="headerlink" href="#id501" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>%res = call i16 @llvm.convert.to.fp16(f32 %a)
+store i16 %res, i16* @x, align 2</pre>
+</div>
+</div>
+</div>
+<div class="section" id="llvm-convert-from-fp16-intrinsic">
+<span id="int-convert-from-fp16"></span><h4><a class="toc-backref" href="#id767">‘<tt class="docutils literal"><span class="pre">llvm.convert.from.fp16</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-convert-from-fp16-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id502">
+<h5>Syntax:<a class="headerlink" href="#id502" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare f32 @llvm.convert.from.fp16(i16 %a)</pre>
+</div>
+</div>
+<div class="section" id="id503">
+<h5>Overview:<a class="headerlink" href="#id503" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.convert.from.fp16</span></tt>‘ intrinsic function performs a
+conversion from half precision floating point format to single precision
+floating point format.</p>
+</div>
+<div class="section" id="id504">
+<h5>Arguments:<a class="headerlink" href="#id504" title="Permalink to this headline">¶</a></h5>
+<p>The intrinsic function contains single argument - the value to be
+converted.</p>
+</div>
+<div class="section" id="id505">
+<h5>Semantics:<a class="headerlink" href="#id505" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.convert.from.fp16</span></tt>‘ intrinsic function performs a
+conversion from half single precision floating point format to single
+precision floating point format. The input half-float value is
+represented by an <tt class="docutils literal"><span class="pre">i16</span></tt> value.</p>
+</div>
+<div class="section" id="id506">
+<h5>Examples:<a class="headerlink" href="#id506" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-llvm"><pre>%a = load i16* @x, align 2
+%res = call f32 @llvm.convert.from.fp16(i16 %a)</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="section" id="debugger-intrinsics">
+<h3><a class="toc-backref" href="#id768">Debugger Intrinsics</a><a class="headerlink" href="#debugger-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>The LLVM debugger intrinsics (which all start with <tt class="docutils literal"><span class="pre">llvm.dbg.</span></tt>
+prefix), are described in the <a class="reference external" href="SourceLevelDebugging.html#format_common_intrinsics">LLVM Source Level
+Debugging</a>
+document.</p>
+</div>
+<div class="section" id="exception-handling-intrinsics">
+<h3><a class="toc-backref" href="#id769">Exception Handling Intrinsics</a><a class="headerlink" href="#exception-handling-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>The LLVM exception handling intrinsics (which all start with
+<tt class="docutils literal"><span class="pre">llvm.eh.</span></tt> prefix), are described in the <a class="reference external" href="ExceptionHandling.html#format_common_intrinsics">LLVM Exception
+Handling</a> document.</p>
+</div>
+<div class="section" id="trampoline-intrinsics">
+<span id="int-trampoline"></span><h3><a class="toc-backref" href="#id770">Trampoline Intrinsics</a><a class="headerlink" href="#trampoline-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>These intrinsics make it possible to excise one parameter, marked with
+the <a class="reference internal" href="#nest"><em>nest</em></a> attribute, from a function. The result is a
+callable function pointer lacking the nest parameter - the caller does
+not need to provide a value for it. Instead, the value to use is stored
+in advance in a “trampoline”, a block of memory usually allocated on the
+stack, which also contains code to splice the nest value into the
+argument list. This is used to implement the GCC nested function address
+extension.</p>
+<p>For example, if the function is <tt class="docutils literal"><span class="pre">i32</span> <span class="pre">f(i8*</span> <span class="pre">nest</span> <span class="pre">%c,</span> <span class="pre">i32</span> <span class="pre">%x,</span> <span class="pre">i32</span> <span class="pre">%y)</span></tt>
+then the resulting function pointer has signature <tt class="docutils literal"><span class="pre">i32</span> <span class="pre">(i32,</span> <span class="pre">i32)*</span></tt>.
+It can be created as follows:</p>
+<div class="highlight-llvm"><div class="highlight"><pre><span class="nv">%tramp</span> <span class="p">=</span> <span class="k">alloca</span> <span class="p">[</span><span class="m">10</span> <span class="k">x</span> <span class="k">i8</span><span class="p">],</span> <span class="k">align</span> <span class="m">4</span> <span class="c">; size and alignment only correct for X86</span>
+<span class="nv">%tramp1</span> <span class="p">=</span> <span class="k">getelementptr</span> <span class="p">[</span><span class="m">10</span> <span class="k">x</span> <span class="k">i8</span><span class="p">]*</span> <span class="nv">%tramp</span><span class="p">,</span> <span class="k">i32</span> <span class="m">0</span><span class="p">,</span> <span class="k">i32</span> <span class="m">0</span>
+<span class="k">call</span> <span class="k">i8</span><span class="p">*</span> <span class="vg">@llvm.init.trampoline</span><span class="p">(</span><span class="k">i8</span><span class="p">*</span> <span class="nv">%tramp1</span><span class="p">,</span> <span class="k">i8</span><span class="p">*</span> <span class="k">bitcast</span> <span class="p">(</span><span class="k">i32</span> <span class="p">(</span><span class="k">i8</span><span class="p">*,</span> <span class="k">i32</span><span class="p">,</span> <span class="k">i32</span><span class="p">)*</span> <span class="vg">@f</span> <span class="k">to</span> <span class="k">i8</span><span class="p">*),</span> <span class="k">i8</span><span class="p">*</span> <span class="nv">%nval</span><span class="p">)</span>
+<span class="nv">%p</span> <span class="p">=</span> <span class="k">call</span> <span class="k">i8</span><span class="p">*</span> <span class="vg">@llvm.adjust.trampoline</span><span class="p">(</span><span class="k">i8</span><span class="p">*</span> <span class="nv">%tramp1</span><span class="p">)</span>
+<span class="nv">%fp</span> <span class="p">=</span> <span class="k">bitcast</span> <span class="k">i8</span><span class="p">*</span> <span class="nv">%p</span> <span class="k">to</span> <span class="k">i32</span> <span class="p">(</span><span class="k">i32</span><span class="p">,</span> <span class="k">i32</span><span class="p">)*</span>
+</pre></div>
+</div>
+<p>The call <tt class="docutils literal"><span class="pre">%val</span> <span class="pre">=</span> <span class="pre">call</span> <span class="pre">i32</span> <span class="pre">%fp(i32</span> <span class="pre">%x,</span> <span class="pre">i32</span> <span class="pre">%y)</span></tt> is then equivalent to
+<tt class="docutils literal"><span class="pre">%val</span> <span class="pre">=</span> <span class="pre">call</span> <span class="pre">i32</span> <span class="pre">%f(i8*</span> <span class="pre">%nval,</span> <span class="pre">i32</span> <span class="pre">%x,</span> <span class="pre">i32</span> <span class="pre">%y)</span></tt>.</p>
+<div class="section" id="llvm-init-trampoline-intrinsic">
+<span id="int-it"></span><h4><a class="toc-backref" href="#id771">‘<tt class="docutils literal"><span class="pre">llvm.init.trampoline</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-init-trampoline-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id507">
+<h5>Syntax:<a class="headerlink" href="#id507" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.init.trampoline(i8* <tramp>, i8* <func>, i8* <nval>)</pre>
+</div>
+</div>
+<div class="section" id="id508">
+<h5>Overview:<a class="headerlink" href="#id508" title="Permalink to this headline">¶</a></h5>
+<p>This fills the memory pointed to by <tt class="docutils literal"><span class="pre">tramp</span></tt> with executable code,
+turning it into a trampoline.</p>
+</div>
+<div class="section" id="id509">
+<h5>Arguments:<a class="headerlink" href="#id509" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.init.trampoline</span></tt> intrinsic takes three arguments, all
+pointers. The <tt class="docutils literal"><span class="pre">tramp</span></tt> argument must point to a sufficiently large and
+sufficiently aligned block of memory; this memory is written to by the
+intrinsic. Note that the size and the alignment are target-specific -
+LLVM currently provides no portable way of determining them, so a
+front-end that generates this intrinsic needs to have some
+target-specific knowledge. The <tt class="docutils literal"><span class="pre">func</span></tt> argument must hold a function
+bitcast to an <tt class="docutils literal"><span class="pre">i8*</span></tt>.</p>
+</div>
+<div class="section" id="id510">
+<h5>Semantics:<a class="headerlink" href="#id510" title="Permalink to this headline">¶</a></h5>
+<p>The block of memory pointed to by <tt class="docutils literal"><span class="pre">tramp</span></tt> is filled with target
+dependent code, turning it into a function. Then <tt class="docutils literal"><span class="pre">tramp</span></tt> needs to be
+passed to <a class="reference internal" href="#int-at"><em>llvm.adjust.trampoline</em></a> to get a pointer which can
+be <a class="reference internal" href="#int-trampoline"><em>bitcast (to a new function) and called</em></a>. The new
+function’s signature is the same as that of <tt class="docutils literal"><span class="pre">func</span></tt> with any arguments
+marked with the <tt class="docutils literal"><span class="pre">nest</span></tt> attribute removed. At most one such <tt class="docutils literal"><span class="pre">nest</span></tt>
+argument is allowed, and it must be of pointer type. Calling the new
+function is equivalent to calling <tt class="docutils literal"><span class="pre">func</span></tt> with the same argument list,
+but with <tt class="docutils literal"><span class="pre">nval</span></tt> used for the missing <tt class="docutils literal"><span class="pre">nest</span></tt> argument. If, after
+calling <tt class="docutils literal"><span class="pre">llvm.init.trampoline</span></tt>, the memory pointed to by <tt class="docutils literal"><span class="pre">tramp</span></tt> is
+modified, then the effect of any later call to the returned function
+pointer is undefined.</p>
+</div>
+</div>
+<div class="section" id="llvm-adjust-trampoline-intrinsic">
+<span id="int-at"></span><h4><a class="toc-backref" href="#id772">‘<tt class="docutils literal"><span class="pre">llvm.adjust.trampoline</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-adjust-trampoline-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id511">
+<h5>Syntax:<a class="headerlink" href="#id511" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare i8* @llvm.adjust.trampoline(i8* <tramp>)</pre>
+</div>
+</div>
+<div class="section" id="id512">
+<h5>Overview:<a class="headerlink" href="#id512" title="Permalink to this headline">¶</a></h5>
+<p>This performs any required machine-specific adjustment to the address of
+a trampoline (passed as <tt class="docutils literal"><span class="pre">tramp</span></tt>).</p>
+</div>
+<div class="section" id="id513">
+<h5>Arguments:<a class="headerlink" href="#id513" title="Permalink to this headline">¶</a></h5>
+<p><tt class="docutils literal"><span class="pre">tramp</span></tt> must point to a block of memory which already has trampoline
+code filled in by a previous call to
+<a class="reference internal" href="#int-it"><em>llvm.init.trampoline</em></a>.</p>
+</div>
+<div class="section" id="id514">
+<h5>Semantics:<a class="headerlink" href="#id514" title="Permalink to this headline">¶</a></h5>
+<p>On some architectures the address of the code to be executed needs to be
+different to the address where the trampoline is actually stored. This
+intrinsic returns the executable address corresponding to <tt class="docutils literal"><span class="pre">tramp</span></tt>
+after performing the required machine specific adjustments. The pointer
+returned can then be <a class="reference internal" href="#int-trampoline"><em>bitcast and executed</em></a>.</p>
+</div>
+</div>
+</div>
+<div class="section" id="memory-use-markers">
+<h3><a class="toc-backref" href="#id773">Memory Use Markers</a><a class="headerlink" href="#memory-use-markers" title="Permalink to this headline">¶</a></h3>
+<p>This class of intrinsics exists to information about the lifetime of
+memory objects and ranges where variables are immutable.</p>
+<div class="section" id="llvm-lifetime-start-intrinsic">
+<h4><a class="toc-backref" href="#id774">‘<tt class="docutils literal"><span class="pre">llvm.lifetime.start</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-lifetime-start-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id515">
+<h5>Syntax:<a class="headerlink" href="#id515" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.lifetime.start(i64 <size>, i8* nocapture <ptr>)</pre>
+</div>
+</div>
+<div class="section" id="id516">
+<h5>Overview:<a class="headerlink" href="#id516" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.lifetime.start</span></tt>‘ intrinsic specifies the start of a memory
+object’s lifetime.</p>
+</div>
+<div class="section" id="id517">
+<h5>Arguments:<a class="headerlink" href="#id517" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is a constant integer representing the size of the
+object, or -1 if it is variable sized. The second argument is a pointer
+to the object.</p>
+</div>
+<div class="section" id="id518">
+<h5>Semantics:<a class="headerlink" href="#id518" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic indicates that before this point in the code, the value
+of the memory pointed to by <tt class="docutils literal"><span class="pre">ptr</span></tt> is dead. This means that it is known
+to never be used and has an undefined value. A load from the pointer
+that precedes this intrinsic can be replaced with <tt class="docutils literal"><span class="pre">'undef'</span></tt>.</p>
+</div>
+</div>
+<div class="section" id="llvm-lifetime-end-intrinsic">
+<h4><a class="toc-backref" href="#id775">‘<tt class="docutils literal"><span class="pre">llvm.lifetime.end</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-lifetime-end-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id519">
+<h5>Syntax:<a class="headerlink" href="#id519" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.lifetime.end(i64 <size>, i8* nocapture <ptr>)</pre>
+</div>
+</div>
+<div class="section" id="id520">
+<h5>Overview:<a class="headerlink" href="#id520" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.lifetime.end</span></tt>‘ intrinsic specifies the end of a memory
+object’s lifetime.</p>
+</div>
+<div class="section" id="id521">
+<h5>Arguments:<a class="headerlink" href="#id521" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is a constant integer representing the size of the
+object, or -1 if it is variable sized. The second argument is a pointer
+to the object.</p>
+</div>
+<div class="section" id="id522">
+<h5>Semantics:<a class="headerlink" href="#id522" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic indicates that after this point in the code, the value of
+the memory pointed to by <tt class="docutils literal"><span class="pre">ptr</span></tt> is dead. This means that it is known to
+never be used and has an undefined value. Any stores into the memory
+object following this intrinsic may be removed as dead.</p>
+</div>
+</div>
+<div class="section" id="llvm-invariant-start-intrinsic">
+<h4><a class="toc-backref" href="#id776">‘<tt class="docutils literal"><span class="pre">llvm.invariant.start</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-invariant-start-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id523">
+<h5>Syntax:<a class="headerlink" href="#id523" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare {}* @llvm.invariant.start(i64 <size>, i8* nocapture <ptr>)</pre>
+</div>
+</div>
+<div class="section" id="id524">
+<h5>Overview:<a class="headerlink" href="#id524" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.invariant.start</span></tt>‘ intrinsic specifies that the contents of
+a memory object will not change.</p>
+</div>
+<div class="section" id="id525">
+<h5>Arguments:<a class="headerlink" href="#id525" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is a constant integer representing the size of the
+object, or -1 if it is variable sized. The second argument is a pointer
+to the object.</p>
+</div>
+<div class="section" id="id526">
+<h5>Semantics:<a class="headerlink" href="#id526" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic indicates that until an <tt class="docutils literal"><span class="pre">llvm.invariant.end</span></tt> that uses
+the return value, the referenced memory location is constant and
+unchanging.</p>
+</div>
+</div>
+<div class="section" id="llvm-invariant-end-intrinsic">
+<h4><a class="toc-backref" href="#id777">‘<tt class="docutils literal"><span class="pre">llvm.invariant.end</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-invariant-end-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id527">
+<h5>Syntax:<a class="headerlink" href="#id527" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.invariant.end({}* <start>, i64 <size>, i8* nocapture <ptr>)</pre>
+</div>
+</div>
+<div class="section" id="id528">
+<h5>Overview:<a class="headerlink" href="#id528" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.invariant.end</span></tt>‘ intrinsic specifies that the contents of a
+memory object are mutable.</p>
+</div>
+<div class="section" id="id529">
+<h5>Arguments:<a class="headerlink" href="#id529" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is the matching <tt class="docutils literal"><span class="pre">llvm.invariant.start</span></tt> intrinsic.
+The second argument is a constant integer representing the size of the
+object, or -1 if it is variable sized and the third argument is a
+pointer to the object.</p>
+</div>
+<div class="section" id="id530">
+<h5>Semantics:<a class="headerlink" href="#id530" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic indicates that the memory is mutable again.</p>
+</div>
+</div>
+</div>
+<div class="section" id="general-intrinsics">
+<h3><a class="toc-backref" href="#id778">General Intrinsics</a><a class="headerlink" href="#general-intrinsics" title="Permalink to this headline">¶</a></h3>
+<p>This class of intrinsics is designed to be generic and has no specific
+purpose.</p>
+<div class="section" id="llvm-var-annotation-intrinsic">
+<h4><a class="toc-backref" href="#id779">‘<tt class="docutils literal"><span class="pre">llvm.var.annotation</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-var-annotation-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id531">
+<h5>Syntax:<a class="headerlink" href="#id531" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.var.annotation(i8* <val>, i8* <str>, i8* <str>, i32  <int>)</pre>
+</div>
+</div>
+<div class="section" id="id532">
+<h5>Overview:<a class="headerlink" href="#id532" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.var.annotation</span></tt>‘ intrinsic.</p>
+</div>
+<div class="section" id="id533">
+<h5>Arguments:<a class="headerlink" href="#id533" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is a pointer to a value, the second is a pointer to a
+global string, the third is a pointer to a global string which is the
+source file name, and the last argument is the line number.</p>
+</div>
+<div class="section" id="id534">
+<h5>Semantics:<a class="headerlink" href="#id534" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic allows annotation of local variables 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.</p>
+</div>
+</div>
+<div class="section" id="llvm-ptr-annotation-intrinsic">
+<h4><a class="toc-backref" href="#id780">‘<tt class="docutils literal"><span class="pre">llvm.ptr.annotation.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-ptr-annotation-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id535">
+<h5>Syntax:<a class="headerlink" href="#id535" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use ‘<tt class="docutils literal"><span class="pre">llvm.ptr.annotation</span></tt>‘ on a
+pointer to an integer of any width. <em>NOTE</em> you must specify an address space for
+the pointer. The identifier for the default address space is the integer
+‘<tt class="docutils literal"><span class="pre">0</span></tt>‘.</p>
+<div class="highlight-python"><pre>declare i8*   @llvm.ptr.annotation.p<address space>i8(i8* <val>, i8* <str>, i8* <str>, i32  <int>)
+declare i16*  @llvm.ptr.annotation.p<address space>i16(i16* <val>, i8* <str>, i8* <str>, i32  <int>)
+declare i32*  @llvm.ptr.annotation.p<address space>i32(i32* <val>, i8* <str>, i8* <str>, i32  <int>)
+declare i64*  @llvm.ptr.annotation.p<address space>i64(i64* <val>, i8* <str>, i8* <str>, i32  <int>)
+declare i256* @llvm.ptr.annotation.p<address space>i256(i256* <val>, i8* <str>, i8* <str>, i32  <int>)</pre>
+</div>
+</div>
+<div class="section" id="id536">
+<h5>Overview:<a class="headerlink" href="#id536" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.ptr.annotation</span></tt>‘ intrinsic.</p>
+</div>
+<div class="section" id="id537">
+<h5>Arguments:<a class="headerlink" href="#id537" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is a pointer to an integer value of arbitrary bitwidth
+(result of some expression), the second is a pointer to a global string, the
+third is a pointer to a global string which is the source file name, and the
+last argument is the line number. It returns the value of the first argument.</p>
+</div>
+<div class="section" id="id538">
+<h5>Semantics:<a class="headerlink" href="#id538" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic allows annotation of a pointer to an integer 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.</p>
+</div>
+</div>
+<div class="section" id="llvm-annotation-intrinsic">
+<h4><a class="toc-backref" href="#id781">‘<tt class="docutils literal"><span class="pre">llvm.annotation.*</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-annotation-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id539">
+<h5>Syntax:<a class="headerlink" href="#id539" title="Permalink to this headline">¶</a></h5>
+<p>This is an overloaded intrinsic. You can use ‘<tt class="docutils literal"><span class="pre">llvm.annotation</span></tt>‘ on
+any integer bit width.</p>
+<div class="highlight-python"><pre>declare i8 @llvm.annotation.i8(i8 <val>, i8* <str>, i8* <str>, i32  <int>)
+declare i16 @llvm.annotation.i16(i16 <val>, i8* <str>, i8* <str>, i32  <int>)
+declare i32 @llvm.annotation.i32(i32 <val>, i8* <str>, i8* <str>, i32  <int>)
+declare i64 @llvm.annotation.i64(i64 <val>, i8* <str>, i8* <str>, i32  <int>)
+declare i256 @llvm.annotation.i256(i256 <val>, i8* <str>, i8* <str>, i32  <int>)</pre>
+</div>
+</div>
+<div class="section" id="id540">
+<h5>Overview:<a class="headerlink" href="#id540" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.annotation</span></tt>‘ intrinsic.</p>
+</div>
+<div class="section" id="id541">
+<h5>Arguments:<a class="headerlink" href="#id541" title="Permalink to this headline">¶</a></h5>
+<p>The first argument is an integer value (result of some expression), the
+second is a pointer to a global string, the third is a pointer to a
+global string which is the source file name, and the last argument is
+the line number. It returns the value of the first argument.</p>
+</div>
+<div class="section" id="id542">
+<h5>Semantics:<a class="headerlink" href="#id542" title="Permalink to this headline">¶</a></h5>
+<p>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.</p>
+</div>
+</div>
+<div class="section" id="llvm-trap-intrinsic">
+<h4><a class="toc-backref" href="#id782">‘<tt class="docutils literal"><span class="pre">llvm.trap</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-trap-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id543">
+<h5>Syntax:<a class="headerlink" href="#id543" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.trap() noreturn nounwind</pre>
+</div>
+</div>
+<div class="section" id="id544">
+<h5>Overview:<a class="headerlink" href="#id544" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.trap</span></tt>‘ intrinsic.</p>
+</div>
+<div class="section" id="id545">
+<h5>Arguments:<a class="headerlink" href="#id545" title="Permalink to this headline">¶</a></h5>
+<p>None.</p>
+</div>
+<div class="section" id="id546">
+<h5>Semantics:<a class="headerlink" href="#id546" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic is lowered to the target dependent trap instruction. If
+the target does not have a trap instruction, this intrinsic will be
+lowered to a call of the <tt class="docutils literal"><span class="pre">abort()</span></tt> function.</p>
+</div>
+</div>
+<div class="section" id="llvm-debugtrap-intrinsic">
+<h4><a class="toc-backref" href="#id783">‘<tt class="docutils literal"><span class="pre">llvm.debugtrap</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-debugtrap-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id547">
+<h5>Syntax:<a class="headerlink" href="#id547" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.debugtrap() nounwind</pre>
+</div>
+</div>
+<div class="section" id="id548">
+<h5>Overview:<a class="headerlink" href="#id548" title="Permalink to this headline">¶</a></h5>
+<p>The ‘<tt class="docutils literal"><span class="pre">llvm.debugtrap</span></tt>‘ intrinsic.</p>
+</div>
+<div class="section" id="id549">
+<h5>Arguments:<a class="headerlink" href="#id549" title="Permalink to this headline">¶</a></h5>
+<p>None.</p>
+</div>
+<div class="section" id="id550">
+<h5>Semantics:<a class="headerlink" href="#id550" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic is lowered to code which is intended to cause an
+execution trap with the intention of requesting the attention of a
+debugger.</p>
+</div>
+</div>
+<div class="section" id="llvm-stackprotector-intrinsic">
+<h4><a class="toc-backref" href="#id784">‘<tt class="docutils literal"><span class="pre">llvm.stackprotector</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-stackprotector-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id551">
+<h5>Syntax:<a class="headerlink" href="#id551" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.stackprotector(i8* <guard>, i8** <slot>)</pre>
+</div>
+</div>
+<div class="section" id="id552">
+<h5>Overview:<a class="headerlink" href="#id552" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.stackprotector</span></tt> intrinsic takes the <tt class="docutils literal"><span class="pre">guard</span></tt> and stores it
+onto the stack at <tt class="docutils literal"><span class="pre">slot</span></tt>. The stack slot is adjusted to ensure that it
+is placed on the stack before local variables.</p>
+</div>
+<div class="section" id="id553">
+<h5>Arguments:<a class="headerlink" href="#id553" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.stackprotector</span></tt> intrinsic requires two pointer arguments.
+The first argument is the value loaded from the stack guard
+<tt class="docutils literal"><span class="pre">@__stack_chk_guard</span></tt>. The second variable is an <tt class="docutils literal"><span class="pre">alloca</span></tt> that has
+enough space to hold the value of the guard.</p>
+</div>
+<div class="section" id="id554">
+<h5>Semantics:<a class="headerlink" href="#id554" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic causes the prologue/epilogue inserter to force the position of
+the <tt class="docutils literal"><span class="pre">AllocaInst</span></tt> stack slot to be before local variables on the stack. This is
+to ensure that if a local variable on the stack is overwritten, it will destroy
+the value of the guard. When the function exits, the guard on the stack is
+checked against the original guard by <tt class="docutils literal"><span class="pre">llvm.stackprotectorcheck</span></tt>. If they are
+different, then <tt class="docutils literal"><span class="pre">llvm.stackprotectorcheck</span></tt> causes the program to abort by
+calling the <tt class="docutils literal"><span class="pre">__stack_chk_fail()</span></tt> function.</p>
+</div>
+</div>
+<div class="section" id="llvm-stackprotectorcheck-intrinsic">
+<h4><a class="toc-backref" href="#id785">‘<tt class="docutils literal"><span class="pre">llvm.stackprotectorcheck</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-stackprotectorcheck-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id555">
+<h5>Syntax:<a class="headerlink" href="#id555" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.stackprotectorcheck(i8** <guard>)</pre>
+</div>
+</div>
+<div class="section" id="id556">
+<h5>Overview:<a class="headerlink" href="#id556" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.stackprotectorcheck</span></tt> intrinsic compares <tt class="docutils literal"><span class="pre">guard</span></tt> against an already
+created stack protector and if they are not equal calls the
+<tt class="docutils literal"><span class="pre">__stack_chk_fail()</span></tt> function.</p>
+</div>
+<div class="section" id="id557">
+<h5>Arguments:<a class="headerlink" href="#id557" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.stackprotectorcheck</span></tt> intrinsic requires one pointer argument, the
+the variable <tt class="docutils literal"><span class="pre">@__stack_chk_guard</span></tt>.</p>
+</div>
+<div class="section" id="id558">
+<h5>Semantics:<a class="headerlink" href="#id558" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic is provided to perform the stack protector check by comparing
+<tt class="docutils literal"><span class="pre">guard</span></tt> with the stack slot created by <tt class="docutils literal"><span class="pre">llvm.stackprotector</span></tt> and if the
+values do not match call the <tt class="docutils literal"><span class="pre">__stack_chk_fail()</span></tt> function.</p>
+<p>The reason to provide this as an IR level intrinsic instead of implementing it
+via other IR operations is that in order to perform this operation at the IR
+level without an intrinsic, one would need to create additional basic blocks to
+handle the success/failure cases. This makes it difficult to stop the stack
+protector check from disrupting sibling tail calls in Codegen. With this
+intrinsic, we are able to generate the stack protector basic blocks late in
+codegen after the tail call decision has occurred.</p>
+</div>
+</div>
+<div class="section" id="llvm-objectsize-intrinsic">
+<h4><a class="toc-backref" href="#id786">‘<tt class="docutils literal"><span class="pre">llvm.objectsize</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-objectsize-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id559">
+<h5>Syntax:<a class="headerlink" href="#id559" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare i32 @llvm.objectsize.i32(i8* <object>, i1 <min>)
+declare i64 @llvm.objectsize.i64(i8* <object>, i1 <min>)</pre>
+</div>
+</div>
+<div class="section" id="id560">
+<h5>Overview:<a class="headerlink" href="#id560" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.objectsize</span></tt> intrinsic is designed to provide information to
+the optimizers to determine at compile time whether a) an operation
+(like memcpy) will overflow a buffer that corresponds to an object, or
+b) that a runtime check for overflow isn’t necessary. An object in this
+context means an allocation of a specific class, structure, array, or
+other object.</p>
+</div>
+<div class="section" id="id561">
+<h5>Arguments:<a class="headerlink" href="#id561" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.objectsize</span></tt> intrinsic takes two arguments. The first
+argument is a pointer to or into the <tt class="docutils literal"><span class="pre">object</span></tt>. The second argument is
+a boolean and determines whether <tt class="docutils literal"><span class="pre">llvm.objectsize</span></tt> returns 0 (if true)
+or -1 (if false) when the object size is unknown. The second argument
+only accepts constants.</p>
+</div>
+<div class="section" id="id562">
+<h5>Semantics:<a class="headerlink" href="#id562" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.objectsize</span></tt> intrinsic is lowered to a constant representing
+the size of the object concerned. If the size cannot be determined at
+compile time, <tt class="docutils literal"><span class="pre">llvm.objectsize</span></tt> returns <tt class="docutils literal"><span class="pre">i32/i64</span> <span class="pre">-1</span> <span class="pre">or</span> <span class="pre">0</span></tt> (depending
+on the <tt class="docutils literal"><span class="pre">min</span></tt> argument).</p>
+</div>
+</div>
+<div class="section" id="llvm-expect-intrinsic">
+<h4><a class="toc-backref" href="#id787">‘<tt class="docutils literal"><span class="pre">llvm.expect</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-expect-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id563">
+<h5>Syntax:<a class="headerlink" href="#id563" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare i32 @llvm.expect.i32(i32 <val>, i32 <expected_val>)
+declare i64 @llvm.expect.i64(i64 <val>, i64 <expected_val>)</pre>
+</div>
+</div>
+<div class="section" id="id564">
+<h5>Overview:<a class="headerlink" href="#id564" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.expect</span></tt> intrinsic provides information about expected (the
+most probable) value of <tt class="docutils literal"><span class="pre">val</span></tt>, which can be used by optimizers.</p>
+</div>
+<div class="section" id="id565">
+<h5>Arguments:<a class="headerlink" href="#id565" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.expect</span></tt> intrinsic takes two arguments. The first argument is
+a value. The second argument is an expected value, this needs to be a
+constant value, variables are not allowed.</p>
+</div>
+<div class="section" id="id566">
+<h5>Semantics:<a class="headerlink" href="#id566" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic is lowered to the <tt class="docutils literal"><span class="pre">val</span></tt>.</p>
+</div>
+</div>
+<div class="section" id="llvm-donothing-intrinsic">
+<h4><a class="toc-backref" href="#id788">‘<tt class="docutils literal"><span class="pre">llvm.donothing</span></tt>‘ Intrinsic</a><a class="headerlink" href="#llvm-donothing-intrinsic" title="Permalink to this headline">¶</a></h4>
+<div class="section" id="id567">
+<h5>Syntax:<a class="headerlink" href="#id567" title="Permalink to this headline">¶</a></h5>
+<div class="highlight-python"><pre>declare void @llvm.donothing() nounwind readnone</pre>
+</div>
+</div>
+<div class="section" id="id568">
+<h5>Overview:<a class="headerlink" href="#id568" title="Permalink to this headline">¶</a></h5>
+<p>The <tt class="docutils literal"><span class="pre">llvm.donothing</span></tt> intrinsic doesn’t perform any operation. It’s the
+only intrinsic that can be called with an invoke instruction.</p>
+</div>
+<div class="section" id="id569">
+<h5>Arguments:<a class="headerlink" href="#id569" title="Permalink to this headline">¶</a></h5>
+<p>None.</p>
+</div>
+<div class="section" id="id570">
+<h5>Semantics:<a class="headerlink" href="#id570" title="Permalink to this headline">¶</a></h5>
+<p>This intrinsic does nothing, and it’s removed by optimizers and ignored
+by codegen.</p>
+</div>
+</div>
+</div>
+</div>
+</div>
+
+
+          </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="CMake.html" title="Building LLVM with CMake"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="index.html" title="Overview"
+             >previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="index.html">Documentation</a>»</li>
+ 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2003-2013, LLVM Project.
+      Last updated on 2014-05-06.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/Lexicon.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/Lexicon.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/Lexicon.html (added)
+++ www-releases/trunk/3.4.1/docs/Lexicon.html Wed May  7 15:09:32 2014
@@ -0,0 +1,299 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>The LLVM Lexicon — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="index.html" />
+    <link rel="next" title="How To Add Your Build Configuration To LLVM Buildbot Infrastructure" href="HowToAddABuilder.html" />
+    <link rel="prev" title="Frequently Asked Questions (FAQ)" href="FAQ.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="index.html">
+    <img src="_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="HowToAddABuilder.html" title="How To Add Your Build Configuration To LLVM Buildbot Infrastructure"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="FAQ.html" title="Frequently Asked Questions (FAQ)"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="index.html">Documentation</a>»</li>
+ 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="the-llvm-lexicon">
+<h1>The LLVM Lexicon<a class="headerlink" href="#the-llvm-lexicon" title="Permalink to this headline">¶</a></h1>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">This document is a work in progress!</p>
+</div>
+<div class="section" id="definitions">
+<h2>Definitions<a class="headerlink" href="#definitions" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="a">
+<h3>A<a class="headerlink" href="#a" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>ADCE</strong></dt>
+<dd>Aggressive Dead Code Elimination</dd>
+<dt><strong>AST</strong></dt>
+<dd><p class="first">Abstract Syntax Tree.</p>
+<p>Due to Clang’s influence (mostly the fact that parsing and semantic
+analysis are so intertwined for C and especially C++), the typical
+working definition of AST in the LLVM community is roughly “the
+compiler’s first complete symbolic (as opposed to textual)
+representation of an input program”.
+As such, an “AST” might be a more general graph instead of a “tree”
+(consider the symbolic representation for the type of a typical “linked
+list node”). This working definition is closer to what some authors
+call an “annotated abstract syntax tree”.</p>
+<p class="last">Consult your favorite compiler book or search engine for more details.</p>
+</dd>
+</dl>
+</div>
+<div class="section" id="b">
+<h3>B<a class="headerlink" href="#b" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils" id="lexicon-bb-vectorization">
+<dt><strong>BB Vectorization</strong></dt>
+<dd>Basic-Block Vectorization</dd>
+<dt><strong>BURS</strong></dt>
+<dd>Bottom Up Rewriting System — A method of instruction selection for code
+generation.  An example is the <a class="reference external" href="http://www.program-transformation.org/Transform/BURG">BURG</a> tool.</dd>
+</dl>
+</div>
+<div class="section" id="c">
+<h3>C<a class="headerlink" href="#c" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>CSE</strong></dt>
+<dd>Common Subexpression Elimination. An optimization that removes common
+subexpression compuation. For example <tt class="docutils literal"><span class="pre">(a+b)*(a+b)</span></tt> has two subexpressions
+that are the same: <tt class="docutils literal"><span class="pre">(a+b)</span></tt>. This optimization would perform the addition
+only once and then perform the multiply (but only if it’s compulationally
+correct/safe).</dd>
+</dl>
+</div>
+<div class="section" id="d">
+<h3>D<a class="headerlink" href="#d" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>DAG</strong></dt>
+<dd>Directed Acyclic Graph</dd>
+</dl>
+<dl class="docutils" id="derived-pointers">
+<span id="derived-pointer"></span><dt><strong>Derived Pointer</strong></dt>
+<dd>A pointer to the interior of an object, such that a garbage collector is
+unable to use the pointer for reachability analysis. While a derived pointer
+is live, the corresponding object pointer must be kept in a root, otherwise
+the collector might free the referenced object. With copying collectors,
+derived pointers pose an additional hazard that they may be invalidated at
+any <a class="reference internal" href="#safe-point">safe point</a>. This term is used in opposition to <a class="reference internal" href="#object-pointer">object pointer</a>.</dd>
+<dt><strong>DSA</strong></dt>
+<dd>Data Structure Analysis</dd>
+<dt><strong>DSE</strong></dt>
+<dd>Dead Store Elimination</dd>
+</dl>
+</div>
+<div class="section" id="f">
+<h3>F<a class="headerlink" href="#f" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>FCA</strong></dt>
+<dd>First Class Aggregate</dd>
+</dl>
+</div>
+<div class="section" id="g">
+<h3>G<a class="headerlink" href="#g" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>GC</strong></dt>
+<dd>Garbage Collection. The practice of using reachability analysis instead of
+explicit memory management to reclaim unused memory.</dd>
+</dl>
+</div>
+<div class="section" id="h">
+<h3>H<a class="headerlink" href="#h" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils" id="heap">
+<dt><strong>Heap</strong></dt>
+<dd>In garbage collection, the region of memory which is managed using
+reachability analysis.</dd>
+</dl>
+</div>
+<div class="section" id="i">
+<h3>I<a class="headerlink" href="#i" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>IPA</strong></dt>
+<dd>Inter-Procedural Analysis. Refers to any variety of code analysis that
+occurs between procedures, functions or compilation units (modules).</dd>
+<dt><strong>IPO</strong></dt>
+<dd>Inter-Procedural Optimization. Refers to any variety of code optimization
+that occurs between procedures, functions or compilation units (modules).</dd>
+<dt><strong>ISel</strong></dt>
+<dd>Instruction Selection</dd>
+</dl>
+</div>
+<div class="section" id="l">
+<h3>L<a class="headerlink" href="#l" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>LCSSA</strong></dt>
+<dd>Loop-Closed Static Single Assignment Form</dd>
+<dt><strong>LICM</strong></dt>
+<dd>Loop Invariant Code Motion</dd>
+<dt><strong>Load-VN</strong></dt>
+<dd>Load Value Numbering</dd>
+<dt><strong>LTO</strong></dt>
+<dd>Link-Time Optimization</dd>
+</dl>
+</div>
+<div class="section" id="m">
+<h3>M<a class="headerlink" href="#m" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>MC</strong></dt>
+<dd>Machine Code</dd>
+</dl>
+</div>
+<div class="section" id="o">
+<h3>O<a class="headerlink" href="#o" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils" id="object-pointers">
+<span id="object-pointer"></span><dt><strong>Object Pointer</strong></dt>
+<dd>A pointer to an object such that the garbage collector is able to trace
+references contained within the object. This term is used in opposition to
+<a class="reference internal" href="#derived-pointer">derived pointer</a>.</dd>
+</dl>
+</div>
+<div class="section" id="p">
+<h3>P<a class="headerlink" href="#p" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>PRE</strong></dt>
+<dd>Partial Redundancy Elimination</dd>
+</dl>
+</div>
+<div class="section" id="r">
+<h3>R<a class="headerlink" href="#r" title="Permalink to this headline">¶</a></h3>
+<p><strong>RAUW</strong></p>
+<blockquote>
+<div>Replace All Uses With. The functions <tt class="docutils literal"><span class="pre">User::replaceUsesOfWith()</span></tt>,
+<tt class="docutils literal"><span class="pre">Value::replaceAllUsesWith()</span></tt>, and
+<tt class="docutils literal"><span class="pre">Constant::replaceUsesOfWithOnConstant()</span></tt> implement the replacement of one
+Value with another by iterating over its def/use chain and fixing up all of
+the pointers to point to the new value.  See
+also <a class="reference external" href="ProgrammersManual.html#iterate_chains">def/use chains</a>.</div></blockquote>
+<dl class="docutils">
+<dt><strong>Reassociation</strong></dt>
+<dd>Rearranging associative expressions to promote better redundancy elimination
+and other optimization.  For example, changing <tt class="docutils literal"><span class="pre">(A+B-A)</span></tt> into <tt class="docutils literal"><span class="pre">(B+A-A)</span></tt>,
+permitting it to be optimized into <tt class="docutils literal"><span class="pre">(B+0)</span></tt> then <tt class="docutils literal"><span class="pre">(B)</span></tt>.</dd>
+</dl>
+<dl class="docutils" id="stack-roots">
+<span id="roots"></span><dt><strong>Root</strong></dt>
+<dd>In garbage collection, a pointer variable lying outside of the <a class="reference internal" href="#heap">heap</a> from
+which the collector begins its reachability analysis. In the context of code
+generation, “root” almost always refers to a “stack root” — a local or
+temporary variable within an executing function.</dd>
+<dt><strong>RPO</strong></dt>
+<dd>Reverse postorder</dd>
+</dl>
+</div>
+<div class="section" id="s">
+<h3>S<a class="headerlink" href="#s" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils" id="safe-point">
+<dt><strong>Safe Point</strong></dt>
+<dd>In garbage collection, it is necessary to identify <a class="reference internal" href="#stack-roots">stack roots</a> so that
+reachability analysis may proceed. It may be infeasible to provide this
+information for every instruction, so instead the information may is
+calculated only at designated safe points. With a copying collector,
+<a class="reference internal" href="#derived-pointers">derived pointers</a> must not be retained across safe points and <a class="reference internal" href="#object-pointers">object
+pointers</a> must be reloaded from stack roots.</dd>
+<dt><strong>SDISel</strong></dt>
+<dd>Selection DAG Instruction Selection.</dd>
+<dt><strong>SCC</strong></dt>
+<dd>Strongly Connected Component</dd>
+<dt><strong>SCCP</strong></dt>
+<dd>Sparse Conditional Constant Propagation</dd>
+<dt><strong>SLP</strong></dt>
+<dd>Superword-Level Parallelism, same as <a class="reference internal" href="#lexicon-bb-vectorization"><em>Basic-Block Vectorization</em></a>.</dd>
+<dt><strong>SRoA</strong></dt>
+<dd>Scalar Replacement of Aggregates</dd>
+<dt><strong>SSA</strong></dt>
+<dd>Static Single Assignment</dd>
+<dt><strong>Stack Map</strong></dt>
+<dd>In garbage collection, metadata emitted by the code generator which
+identifies <a class="reference internal" href="#roots">roots</a> within the stack frame of an executing function.</dd>
+</dl>
+</div>
+<div class="section" id="t">
+<h3>T<a class="headerlink" href="#t" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>TBAA</strong></dt>
+<dd>Type-Based Alias Analysis</dd>
+</dl>
+</div>
+</div>
+</div>
+
+
+          </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="HowToAddABuilder.html" title="How To Add Your Build Configuration To LLVM Buildbot Infrastructure"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="FAQ.html" title="Frequently Asked Questions (FAQ)"
+             >previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="index.html">Documentation</a>»</li>
+ 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2003-2013, LLVM Project.
+      Last updated on 2014-05-06.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/LinkTimeOptimization.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/LinkTimeOptimization.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/LinkTimeOptimization.html (added)
+++ www-releases/trunk/3.4.1/docs/LinkTimeOptimization.html Wed May  7 15:09:32 2014
@@ -0,0 +1,371 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>LLVM Link Time Optimization: Design and Implementation — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="index.html" />
+    <link rel="next" title="Segmented Stacks in LLVM" href="SegmentedStacks.html" />
+    <link rel="prev" title="Exception Handling in LLVM" href="ExceptionHandling.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="index.html">
+    <img src="_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="SegmentedStacks.html" title="Segmented Stacks in LLVM"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="ExceptionHandling.html" title="Exception Handling in LLVM"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="index.html">Documentation</a>»</li>
+ 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="llvm-link-time-optimization-design-and-implementation">
+<h1>LLVM Link Time Optimization: Design and Implementation<a class="headerlink" href="#llvm-link-time-optimization-design-and-implementation" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#description" id="id2">Description</a></li>
+<li><a class="reference internal" href="#design-philosophy" id="id3">Design Philosophy</a><ul>
+<li><a class="reference internal" href="#example-of-link-time-optimization" id="id4">Example of link time optimization</a></li>
+<li><a class="reference internal" href="#alternative-approaches" id="id5">Alternative Approaches</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#multi-phase-communication-between-liblto-and-linker" id="id6">Multi-phase communication between <tt class="docutils literal"><span class="pre">libLTO</span></tt> and linker</a><ul>
+<li><a class="reference internal" href="#phase-1-read-llvm-bitcode-files" id="id7">Phase 1 : Read LLVM Bitcode Files</a></li>
+<li><a class="reference internal" href="#phase-2-symbol-resolution" id="id8">Phase 2 : Symbol Resolution</a></li>
+<li><a class="reference internal" href="#phase-3-optimize-bitcode-files" id="id9">Phase 3 : Optimize Bitcode Files</a></li>
+<li><a class="reference internal" href="#phase-4-symbol-resolution-after-optimization" id="id10">Phase 4 : Symbol Resolution after optimization</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#liblto" id="id11"><tt class="docutils literal"><span class="pre">libLTO</span></tt></a><ul>
+<li><a class="reference internal" href="#lto-module-t" id="id12"><tt class="docutils literal"><span class="pre">lto_module_t</span></tt></a></li>
+<li><a class="reference internal" href="#lto-code-gen-t" id="id13"><tt class="docutils literal"><span class="pre">lto_code_gen_t</span></tt></a></li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="section" id="description">
+<h2><a class="toc-backref" href="#id2">Description</a><a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
+<p>LLVM features powerful intermodular optimizations which can be used at link
+time.  Link Time Optimization (LTO) is another name for intermodular
+optimization when performed during the link stage. This document describes the
+interface and design between the LTO optimizer and the linker.</p>
+</div>
+<div class="section" id="design-philosophy">
+<h2><a class="toc-backref" href="#id3">Design Philosophy</a><a class="headerlink" href="#design-philosophy" title="Permalink to this headline">¶</a></h2>
+<p>The LLVM Link Time Optimizer provides complete transparency, while doing
+intermodular optimization, in the compiler tool chain. Its main goal is to let
+the developer take advantage of intermodular optimizations without making any
+significant changes to the developer’s makefiles or build system. This is
+achieved through tight integration with the linker. In this model, the linker
+treates LLVM bitcode files like native object files and allows mixing and
+matching among them. The linker uses <a class="reference internal" href="#liblto">libLTO</a>, a shared object, to handle LLVM
+bitcode files. This tight integration between the linker and LLVM optimizer
+helps to do optimizations that are not possible in other models. The linker
+input allows the optimizer to avoid relying on conservative escape analysis.</p>
+<div class="section" id="example-of-link-time-optimization">
+<span id="liblto-example"></span><h3><a class="toc-backref" href="#id4">Example of link time optimization</a><a class="headerlink" href="#example-of-link-time-optimization" title="Permalink to this headline">¶</a></h3>
+<p>The following example illustrates the advantages of LTO’s integrated approach
+and clean interface. This example requires a system linker which supports LTO
+through the interface described in this document.  Here, clang transparently
+invokes system linker.</p>
+<ul class="simple">
+<li>Input source file <tt class="docutils literal"><span class="pre">a.c</span></tt> is compiled into LLVM bitcode form.</li>
+<li>Input source file <tt class="docutils literal"><span class="pre">main.c</span></tt> is compiled into native object code.</li>
+</ul>
+<div class="highlight-c++"><div class="highlight"><pre><span class="o">---</span> <span class="n">a</span><span class="p">.</span><span class="n">h</span> <span class="o">---</span>
+<span class="k">extern</span> <span class="kt">int</span> <span class="n">foo1</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
+<span class="k">extern</span> <span class="kt">void</span> <span class="nf">foo2</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
+<span class="k">extern</span> <span class="kt">void</span> <span class="nf">foo4</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
+
+<span class="o">---</span> <span class="n">a</span><span class="p">.</span><span class="n">c</span> <span class="o">---</span>
+<span class="cp">#include "a.h"</span>
+
+<span class="k">static</span> <span class="kt">signed</span> <span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+
+<span class="kt">void</span> <span class="nf">foo2</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span>
+  <span class="n">i</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="k">static</span> <span class="kt">int</span> <span class="nf">foo3</span><span class="p">()</span> <span class="p">{</span>
+  <span class="n">foo4</span><span class="p">();</span>
+  <span class="k">return</span> <span class="mi">10</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="kt">int</span> <span class="nf">foo1</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span>
+  <span class="kt">int</span> <span class="n">data</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">i</span> <span class="o"><</span> <span class="mi">0</span><span class="p">)</span>
+    <span class="n">data</span> <span class="o">=</span> <span class="n">foo3</span><span class="p">();</span>
+
+  <span class="n">data</span> <span class="o">=</span> <span class="n">data</span> <span class="o">+</span> <span class="mi">42</span><span class="p">;</span>
+  <span class="k">return</span> <span class="n">data</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="o">---</span> <span class="n">main</span><span class="p">.</span><span class="n">c</span> <span class="o">---</span>
+<span class="cp">#include <stdio.h></span>
+<span class="cp">#include "a.h"</span>
+
+<span class="kt">void</span> <span class="n">foo4</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span>
+  <span class="n">printf</span><span class="p">(</span><span class="s">"Hi</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="kt">int</span> <span class="n">main</span><span class="p">()</span> <span class="p">{</span>
+  <span class="k">return</span> <span class="n">foo1</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<p>To compile, run:</p>
+<div class="highlight-console"><div class="highlight"><pre><span class="gp">%</span> clang -emit-llvm -c a.c -o a.o   <span class="c"># <-- a.o is LLVM bitcode file</span>
+<span class="gp">%</span> clang -c main.c -o main.o        <span class="c"># <-- main.o is native object file</span>
+<span class="gp">%</span> clang a.o main.o -o main         <span class="c"># <-- standard link command without modifications</span>
+</pre></div>
+</div>
+<ul class="simple">
+<li>In this example, the linker recognizes that <tt class="docutils literal"><span class="pre">foo2()</span></tt> is an externally
+visible symbol defined in LLVM bitcode file. The linker completes its usual
+symbol resolution pass and finds that <tt class="docutils literal"><span class="pre">foo2()</span></tt> is not used
+anywhere. This information is used by the LLVM optimizer and it
+removes <tt class="docutils literal"><span class="pre">foo2()</span></tt>.</li>
+<li>As soon as <tt class="docutils literal"><span class="pre">foo2()</span></tt> is removed, the optimizer recognizes that condition <tt class="docutils literal"><span class="pre">i</span>
+<span class="pre"><</span> <span class="pre">0</span></tt> is always false, which means <tt class="docutils literal"><span class="pre">foo3()</span></tt> is never used. Hence, the
+optimizer also removes <tt class="docutils literal"><span class="pre">foo3()</span></tt>.</li>
+<li>And this in turn, enables linker to remove <tt class="docutils literal"><span class="pre">foo4()</span></tt>.</li>
+</ul>
+<p>This example illustrates the advantage of tight integration with the
+linker. Here, the optimizer can not remove <tt class="docutils literal"><span class="pre">foo3()</span></tt> without the linker’s
+input.</p>
+</div>
+<div class="section" id="alternative-approaches">
+<h3><a class="toc-backref" href="#id5">Alternative Approaches</a><a class="headerlink" href="#alternative-approaches" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt><strong>Compiler driver invokes link time optimizer separately.</strong></dt>
+<dd>In this model the link time optimizer is not able to take advantage of
+information collected during the linker’s normal symbol resolution phase.
+In the above example, the optimizer can not remove <tt class="docutils literal"><span class="pre">foo2()</span></tt> without the
+linker’s input because it is externally visible. This in turn prohibits the
+optimizer from removing <tt class="docutils literal"><span class="pre">foo3()</span></tt>.</dd>
+<dt><strong>Use separate tool to collect symbol information from all object files.</strong></dt>
+<dd>In this model, a new, separate, tool or library replicates the linker’s
+capability to collect information for link time optimization. Not only is
+this code duplication difficult to justify, but it also has several other
+disadvantages.  For example, the linking semantics and the features provided
+by the linker on various platform are not unique. This means, this new tool
+needs to support all such features and platforms in one super tool or a
+separate tool per platform is required. This increases maintenance cost for
+link time optimizer significantly, which is not necessary. This approach
+also requires staying synchronized with linker developements on various
+platforms, which is not the main focus of the link time optimizer. Finally,
+this approach increases end user’s build time due to the duplication of work
+done by this separate tool and the linker itself.</dd>
+</dl>
+</div>
+</div>
+<div class="section" id="multi-phase-communication-between-liblto-and-linker">
+<h2><a class="toc-backref" href="#id6">Multi-phase communication between <tt class="docutils literal"><span class="pre">libLTO</span></tt> and linker</a><a class="headerlink" href="#multi-phase-communication-between-liblto-and-linker" title="Permalink to this headline">¶</a></h2>
+<p>The linker collects information about symbol defininitions and uses in various
+link objects which is more accurate than any information collected by other
+tools during typical build cycles.  The linker collects this information by
+looking at the definitions and uses of symbols in native .o files and using
+symbol visibility information. The linker also uses user-supplied information,
+such as a list of exported symbols. LLVM optimizer collects control flow
+information, data flow information and knows much more about program structure
+from the optimizer’s point of view.  Our goal is to take advantage of tight
+integration between the linker and the optimizer by sharing this information
+during various linking phases.</p>
+<div class="section" id="phase-1-read-llvm-bitcode-files">
+<h3><a class="toc-backref" href="#id7">Phase 1 : Read LLVM Bitcode Files</a><a class="headerlink" href="#phase-1-read-llvm-bitcode-files" title="Permalink to this headline">¶</a></h3>
+<p>The linker first reads all object files in natural order and collects symbol
+information. This includes native object files as well as LLVM bitcode files.
+To minimize the cost to the linker in the case that all .o files are native
+object files, the linker only calls <tt class="docutils literal"><span class="pre">lto_module_create()</span></tt> when a supplied
+object file is found to not be a native object file.  If <tt class="docutils literal"><span class="pre">lto_module_create()</span></tt>
+returns that the file is an LLVM bitcode file, the linker then iterates over the
+module using <tt class="docutils literal"><span class="pre">lto_module_get_symbol_name()</span></tt> and
+<tt class="docutils literal"><span class="pre">lto_module_get_symbol_attribute()</span></tt> to get all symbols defined and referenced.
+This information is added to the linker’s global symbol table.</p>
+<p>The lto* functions are all implemented in a shared object libLTO.  This allows
+the LLVM LTO code to be updated independently of the linker tool.  On platforms
+that support it, the shared object is lazily loaded.</p>
+</div>
+<div class="section" id="phase-2-symbol-resolution">
+<h3><a class="toc-backref" href="#id8">Phase 2 : Symbol Resolution</a><a class="headerlink" href="#phase-2-symbol-resolution" title="Permalink to this headline">¶</a></h3>
+<p>In this stage, the linker resolves symbols using global symbol table.  It may
+report undefined symbol errors, read archive members, replace weak symbols, etc.
+The linker is able to do this seamlessly even though it does not know the exact
+content of input LLVM bitcode files.  If dead code stripping is enabled then the
+linker collects the list of live symbols.</p>
+</div>
+<div class="section" id="phase-3-optimize-bitcode-files">
+<h3><a class="toc-backref" href="#id9">Phase 3 : Optimize Bitcode Files</a><a class="headerlink" href="#phase-3-optimize-bitcode-files" title="Permalink to this headline">¶</a></h3>
+<p>After symbol resolution, the linker tells the LTO shared object which symbols
+are needed by native object files.  In the example above, the linker reports
+that only <tt class="docutils literal"><span class="pre">foo1()</span></tt> is used by native object files using
+<tt class="docutils literal"><span class="pre">lto_codegen_add_must_preserve_symbol()</span></tt>.  Next the linker invokes the LLVM
+optimizer and code generators using <tt class="docutils literal"><span class="pre">lto_codegen_compile()</span></tt> which returns a
+native object file creating by merging the LLVM bitcode files and applying
+various optimization passes.</p>
+</div>
+<div class="section" id="phase-4-symbol-resolution-after-optimization">
+<h3><a class="toc-backref" href="#id10">Phase 4 : Symbol Resolution after optimization</a><a class="headerlink" href="#phase-4-symbol-resolution-after-optimization" title="Permalink to this headline">¶</a></h3>
+<p>In this phase, the linker reads optimized a native object file and updates the
+internal global symbol table to reflect any changes. The linker also collects
+information about any changes in use of external symbols by LLVM bitcode
+files. In the example above, the linker notes that <tt class="docutils literal"><span class="pre">foo4()</span></tt> is not used any
+more. If dead code stripping is enabled then the linker refreshes the live
+symbol information appropriately and performs dead code stripping.</p>
+<p>After this phase, the linker continues linking as if it never saw LLVM bitcode
+files.</p>
+</div>
+</div>
+<div class="section" id="liblto">
+<span id="id1"></span><h2><a class="toc-backref" href="#id11"><tt class="docutils literal"><span class="pre">libLTO</span></tt></a><a class="headerlink" href="#liblto" title="Permalink to this headline">¶</a></h2>
+<p><tt class="docutils literal"><span class="pre">libLTO</span></tt> is a shared object that is part of the LLVM tools, and is intended
+for use by a linker. <tt class="docutils literal"><span class="pre">libLTO</span></tt> provides an abstract C interface to use the LLVM
+interprocedural optimizer without exposing details of LLVM’s internals. The
+intention is to keep the interface as stable as possible even when the LLVM
+optimizer continues to evolve. It should even be possible for a completely
+different compilation technology to provide a different libLTO that works with
+their object files and the standard linker tool.</p>
+<div class="section" id="lto-module-t">
+<h3><a class="toc-backref" href="#id12"><tt class="docutils literal"><span class="pre">lto_module_t</span></tt></a><a class="headerlink" href="#lto-module-t" title="Permalink to this headline">¶</a></h3>
+<p>A non-native object file is handled via an <tt class="docutils literal"><span class="pre">lto_module_t</span></tt>.  The following
+functions allow the linker to check if a file (on disk or in a memory buffer) is
+a file which libLTO can process:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_module_is_object_file</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span><span class="o">*</span><span class="p">)</span>
+<span class="n">lto_module_is_object_file_for_target</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span><span class="o">*</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span><span class="o">*</span><span class="p">)</span>
+<span class="n">lto_module_is_object_file_in_memory</span><span class="p">(</span><span class="k">const</span> <span class="kt">void</span><span class="o">*</span><span class="p">,</span> <span class="kt">size_t</span><span class="p">)</span>
+<span class="n">lto_module_is_object_file_in_memory_for_target</span><span class="p">(</span><span class="k">const</span> <span class="kt">void</span><span class="o">*</span><span class="p">,</span> <span class="kt">size_t</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span><span class="o">*</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>If the object file can be processed by <tt class="docutils literal"><span class="pre">libLTO</span></tt>, the linker creates a
+<tt class="docutils literal"><span class="pre">lto_module_t</span></tt> by using one of:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_module_create</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span><span class="o">*</span><span class="p">)</span>
+<span class="n">lto_module_create_from_memory</span><span class="p">(</span><span class="k">const</span> <span class="kt">void</span><span class="o">*</span><span class="p">,</span> <span class="kt">size_t</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>and when done, the handle is released via</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_module_dispose</span><span class="p">(</span><span class="kt">lto_module_t</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The linker can introspect the non-native object file by getting the number of
+symbols and getting the name and attributes of each symbol via:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_module_get_num_symbols</span><span class="p">(</span><span class="kt">lto_module_t</span><span class="p">)</span>
+<span class="n">lto_module_get_symbol_name</span><span class="p">(</span><span class="kt">lto_module_t</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">int</span><span class="p">)</span>
+<span class="n">lto_module_get_symbol_attribute</span><span class="p">(</span><span class="kt">lto_module_t</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">int</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The attributes of a symbol include the alignment, visibility, and kind.</p>
+</div>
+<div class="section" id="lto-code-gen-t">
+<h3><a class="toc-backref" href="#id13"><tt class="docutils literal"><span class="pre">lto_code_gen_t</span></tt></a><a class="headerlink" href="#lto-code-gen-t" title="Permalink to this headline">¶</a></h3>
+<p>Once the linker has loaded each non-native object files into an
+<tt class="docutils literal"><span class="pre">lto_module_t</span></tt>, it can request <tt class="docutils literal"><span class="pre">libLTO</span></tt> to process them all and generate a
+native object file.  This is done in a couple of steps.  First, a code generator
+is created with:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_codegen_create</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Then, each non-native object file is added to the code generator with:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_codegen_add_module</span><span class="p">(</span><span class="kt">lto_code_gen_t</span><span class="p">,</span> <span class="kt">lto_module_t</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The linker then has the option of setting some codegen options.  Whether or not
+to generate DWARF debug info is set with:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_codegen_set_debug_model</span><span class="p">(</span><span class="kt">lto_code_gen_t</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Which kind of position independence is set with:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_codegen_set_pic_model</span><span class="p">(</span><span class="kt">lto_code_gen_t</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>And each symbol that is referenced by a native object file or otherwise must not
+be optimized away is set with:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_codegen_add_must_preserve_symbol</span><span class="p">(</span><span class="kt">lto_code_gen_t</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span><span class="o">*</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>After all these settings are done, the linker requests that a native object file
+be created from the modules with the settings using:</p>
+<div class="highlight-c"><div class="highlight"><pre><span class="n">lto_codegen_compile</span><span class="p">(</span><span class="kt">lto_code_gen_t</span><span class="p">,</span> <span class="n">size</span><span class="o">*</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>which returns a pointer to a buffer containing the generated native object file.
+The linker then parses that and links it with the rest of the native object
+files.</p>
+</div>
+</div>
+</div>
+
+
+          </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="SegmentedStacks.html" title="Segmented Stacks in LLVM"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="ExceptionHandling.html" title="Exception Handling in LLVM"
+             >previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="index.html">Documentation</a>»</li>
+ 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2003-2013, LLVM Project.
+      Last updated on 2014-05-06.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/MCJITDesignAndImplementation.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/MCJITDesignAndImplementation.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/MCJITDesignAndImplementation.html (added)
+++ www-releases/trunk/3.4.1/docs/MCJITDesignAndImplementation.html Wed May  7 15:09:32 2014
@@ -0,0 +1,246 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>MCJIT Design and Implementation — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="index.html" />
+    <link rel="next" title="LLVM Atomic Instructions and Concurrency Guide" href="Atomics.html" />
+    <link rel="prev" title="The Often Misunderstood GEP Instruction" href="GetElementPtr.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="index.html">
+    <img src="_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="Atomics.html" title="LLVM Atomic Instructions and Concurrency Guide"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="GetElementPtr.html" title="The Often Misunderstood GEP Instruction"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="index.html">Documentation</a>»</li>
+ 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="mcjit-design-and-implementation">
+<h1>MCJIT Design and Implementation<a class="headerlink" href="#mcjit-design-and-implementation" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="introduction">
+<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
+<p>This document describes the internal workings of the MCJIT execution
+engine and the RuntimeDyld component.  It is intended as a high level
+overview of the implementation, showing the flow and interactions of
+objects throughout the code generation and dynamic loading process.</p>
+</div>
+<div class="section" id="engine-creation">
+<h2>Engine Creation<a class="headerlink" href="#engine-creation" title="Permalink to this headline">¶</a></h2>
+<p>In most cases, an EngineBuilder object is used to create an instance of
+the MCJIT execution engine.  The EngineBuilder takes an llvm::Module
+object as an argument to its constructor.  The client may then set various
+options that we control the later be passed along to the MCJIT engine,
+including the selection of MCJIT as the engine type to be created.
+Of particular interest is the EngineBuilder::setMCJITMemoryManager
+function.  If the client does not explicitly create a memory manager at
+this time, a default memory manager (specifically SectionMemoryManager)
+will be created when the MCJIT engine is instantiated.</p>
+<p>Once the options have been set, a client calls EngineBuilder::create to
+create an instance of the MCJIT engine.  If the client does not use the
+form of this function that takes a TargetMachine as a parameter, a new
+TargetMachine will be created based on the target triple associated with
+the Module that was used to create the EngineBuilder.</p>
+<img alt="_images/MCJIT-engine-builder.png" src="_images/MCJIT-engine-builder.png" />
+<p>EngineBuilder::create will call the static MCJIT::createJIT function,
+passing in its pointers to the module, memory manager and target machine
+objects, all of which will subsequently be owned by the MCJIT object.</p>
+<p>The MCJIT class has a member variable, Dyld, which contains an instance of
+the RuntimeDyld wrapper class.  This member will be used for
+communications between MCJIT and the actual RuntimeDyldImpl object that
+gets created when an object is loaded.</p>
+<img alt="_images/MCJIT-creation.png" src="_images/MCJIT-creation.png" />
+<p>Upon creation, MCJIT holds a pointer to the Module object that it received
+from EngineBuilder but it does not immediately generate code for this
+module.  Code generation is deferred until either the
+MCJIT::finalizeObject method is called explicitly or a function such as
+MCJIT::getPointerToFunction is called which requires the code to have been
+generated.</p>
+</div>
+<div class="section" id="code-generation">
+<h2>Code Generation<a class="headerlink" href="#code-generation" title="Permalink to this headline">¶</a></h2>
+<p>When code generation is triggered, as described above, MCJIT will first
+attempt to retrieve an object image from its ObjectCache member, if one
+has been set.  If a cached object image cannot be retrieved, MCJIT will
+call its emitObject method.  MCJIT::emitObject uses a local PassManager
+instance and creates a new ObjectBufferStream instance, both of which it
+passes to TargetManager::addPassesToEmitMC before calling PassManager::run
+on the Module with which it was created.</p>
+<img alt="_images/MCJIT-load.png" src="_images/MCJIT-load.png" />
+<p>The PassManager::run call causes the MC code generation mechanisms to emit
+a complete relocatable binary object image (either in either ELF or MachO
+format, depending on the target) into the ObjectBufferStream object, which
+is flushed to complete the process.  If an ObjectCache is being used, the
+image will be passed to the ObjectCache here.</p>
+<p>At this point, the ObjectBufferStream contains the raw object image.
+Before the code can be executed, the code and data sections from this
+image must be loaded into suitable memory, relocations must be applied and
+memory permission and code cache invalidation (if required) must be completed.</p>
+</div>
+<div class="section" id="object-loading">
+<h2>Object Loading<a class="headerlink" href="#object-loading" title="Permalink to this headline">¶</a></h2>
+<p>Once an object image has been obtained, either through code generation or
+having been retrieved from an ObjectCache, it is passed to RuntimeDyld to
+be loaded.  The RuntimeDyld wrapper class examines the object to determine
+its file format and creates an instance of either RuntimeDyldELF or
+RuntimeDyldMachO (both of which derive from the RuntimeDyldImpl base
+class) and calls the RuntimeDyldImpl::loadObject method to perform that
+actual loading.</p>
+<img alt="_images/MCJIT-dyld-load.png" src="_images/MCJIT-dyld-load.png" />
+<p>RuntimeDyldImpl::loadObject begins by creating an ObjectImage instance
+from the ObjectBuffer it received.  ObjectImage, which wraps the
+ObjectFile class, is a helper class which parses the binary object image
+and provides access to the information contained in the format-specific
+headers, including section, symbol and relocation information.</p>
+<p>RuntimeDyldImpl::loadObject then iterates through the symbols in the
+image.  Information about common symbols is collected for later use.  For
+each function or data symbol, the associated section is loaded into memory
+and the symbol is stored in a symbol table map data structure.  When the
+iteration is complete, a section is emitted for the common symbols.</p>
+<p>Next, RuntimeDyldImpl::loadObject iterates through the sections in the
+object image and for each section iterates through the relocations for
+that sections.  For each relocation, it calls the format-specific
+processRelocationRef method, which will examine the relocation and store
+it in one of two data structures, a section-based relocation list map and
+an external symbol relocation map.</p>
+<img alt="_images/MCJIT-load-object.png" src="_images/MCJIT-load-object.png" />
+<p>When RuntimeDyldImpl::loadObject returns, all of the code and data
+sections for the object will have been loaded into memory allocated by the
+memory manager and relocation information will have been prepared, but the
+relocations have not yet been applied and the generated code is still not
+ready to be executed.</p>
+<p>[Currently (as of August 2013) the MCJIT engine will immediately apply
+relocations when loadObject completes.  However, this shouldn’t be
+happening.  Because the code may have been generated for a remote target,
+the client should be given a chance to re-map the section addresses before
+relocations are applied.  It is possible to apply relocations multiple
+times, but in the case where addresses are to be re-mapped, this first
+application is wasted effort.]</p>
+</div>
+<div class="section" id="address-remapping">
+<h2>Address Remapping<a class="headerlink" href="#address-remapping" title="Permalink to this headline">¶</a></h2>
+<p>At any time after initial code has been generated and before
+finalizeObject is called, the client can remap the address of sections in
+the object.  Typically this is done because the code was generated for an
+external process and is being mapped into that process’ address space.
+The client remaps the section address by calling MCJIT::mapSectionAddress.
+This should happen before the section memory is copied to its new
+location.</p>
+<p>When MCJIT::mapSectionAddress is called, MCJIT passes the call on to
+RuntimeDyldImpl (via its Dyld member).  RuntimeDyldImpl stores the new
+address in an internal data structure but does not update the code at this
+time, since other sections are likely to change.</p>
+<p>When the client is finished remapping section addresses, it will call
+MCJIT::finalizeObject to complete the remapping process.</p>
+</div>
+<div class="section" id="final-preparations">
+<h2>Final Preparations<a class="headerlink" href="#final-preparations" title="Permalink to this headline">¶</a></h2>
+<p>When MCJIT::finalizeObject is called, MCJIT calls
+RuntimeDyld::resolveRelocations.  This function will attempt to locate any
+external symbols and then apply all relocations for the object.</p>
+<p>External symbols are resolved by calling the memory manager’s
+getPointerToNamedFunction method.  The memory manager will return the
+address of the requested symbol in the target address space.  (Note, this
+may not be a valid pointer in the host process.)  RuntimeDyld will then
+iterate through the list of relocations it has stored which are associated
+with this symbol and invoke the resolveRelocation method which, through an
+format-specific implementation, will apply the relocation to the loaded
+section memory.</p>
+<p>Next, RuntimeDyld::resolveRelocations iterates through the list of
+sections and for each section iterates through a list of relocations that
+have been saved which reference that symbol and call resolveRelocation for
+each entry in this list.  The relocation list here is a list of
+relocations for which the symbol associated with the relocation is located
+in the section associated with the list.  Each of these locations will
+have a target location at which the relocation will be applied that is
+likely located in a different section.</p>
+<img alt="_images/MCJIT-resolve-relocations.png" src="_images/MCJIT-resolve-relocations.png" />
+<p>Once relocations have been applied as described above, MCJIT calls
+RuntimeDyld::getEHFrameSection, and if a non-zero result is returned
+passes the section data to the memory manager’s registerEHFrames method.
+This allows the memory manager to call any desired target-specific
+functions, such as registering the EH frame information with a debugger.</p>
+<p>Finally, MCJIT calls the memory manager’s finalizeMemory method.  In this
+method, the memory manager will invalidate the target code cache, if
+necessary, and apply final permissions to the memory pages it has
+allocated for code and data memory.</p>
+</div>
+</div>
+
+
+          </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="Atomics.html" title="LLVM Atomic Instructions and Concurrency Guide"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="GetElementPtr.html" title="The Often Misunderstood GEP Instruction"
+             >previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="index.html">Documentation</a>»</li>
+ 
+      </ul>
+    </div>
+    <div class="footer">
+        © Copyright 2003-2013, LLVM Project.
+      Last updated on 2014-05-06.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
+    </div>
+  </body>
+</html>
\ No newline at end of file

Added: www-releases/trunk/3.4.1/docs/MakefileGuide.html
URL: http://llvm.org/viewvc/llvm-project/www-releases/trunk/3.4.1/docs/MakefileGuide.html?rev=208244&view=auto
==============================================================================
--- www-releases/trunk/3.4.1/docs/MakefileGuide.html (added)
+++ www-releases/trunk/3.4.1/docs/MakefileGuide.html Wed May  7 15:09:32 2014
@@ -0,0 +1,975 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>LLVM Makefile Guide — LLVM 3.4 documentation</title>
+    
+    <link rel="stylesheet" href="_static/llvm-theme.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '3.4',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="top" title="LLVM 3.4 documentation" href="index.html" />
+    <link rel="next" title="Creating an LLVM Project" href="Projects.html" />
+    <link rel="prev" title="LLVM Developer Policy" href="DeveloperPolicy.html" />
+<style type="text/css">
+  table.right { float: right; margin-left: 20px; }
+  table.right td { border: 1px solid #ccc; }
+</style>
+
+  </head>
+  <body>
+<div class="logo">
+  <a href="index.html">
+    <img src="_static/logo.png"
+         alt="LLVM Logo" width="250" height="88"/></a>
+</div>
+
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="Projects.html" title="Creating an LLVM Project"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="DeveloperPolicy.html" title="LLVM Developer Policy"
+             accesskey="P">previous</a> |</li>
+  <li><a href="http://llvm.org/">LLVM Home</a> | </li>
+  <li><a href="index.html">Documentation</a>»</li>
+ 
+      </ul>
+    </div>
+
+
+    <div class="document">
+      <div class="documentwrapper">
+          <div class="body">
+            
+  <div class="section" id="llvm-makefile-guide">
+<h1>LLVM Makefile Guide<a class="headerlink" href="#llvm-makefile-guide" title="Permalink to this headline">¶</a></h1>
+<div class="contents local topic" id="contents">
+<ul class="simple">
+<li><a class="reference internal" href="#introduction" id="id3">Introduction</a></li>
+<li><a class="reference internal" href="#general-concepts" id="id4">General Concepts</a><ul>
+<li><a class="reference internal" href="#projects" id="id5">Projects</a></li>
+<li><a class="reference internal" href="#variable-values" id="id6">Variable Values</a></li>
+<li><a class="reference internal" href="#including-makefiles" id="id7">Including Makefiles</a><ul>
+<li><a class="reference internal" href="#makefile" id="id8"><tt class="docutils literal"><span class="pre">Makefile</span></tt></a></li>
+<li><a class="reference internal" href="#makefile-common" id="id9"><tt class="docutils literal"><span class="pre">Makefile.common</span></tt></a></li>
+<li><a class="reference internal" href="#makefile-config" id="id10"><tt class="docutils literal"><span class="pre">Makefile.config</span></tt></a></li>
+<li><a class="reference internal" href="#makefile-rules" id="id11"><tt class="docutils literal"><span class="pre">Makefile.rules</span></tt></a></li>
+<li><a class="reference internal" href="#comments" id="id12">Comments</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference internal" href="#tutorial" id="id13">Tutorial</a><ul>
+<li><a class="reference internal" href="#libraries" id="id14">Libraries</a><ul>
+<li><a class="reference internal" href="#loadable-modules" id="id15">Loadable Modules</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#tools" id="id16">Tools</a><ul>
+<li><a class="reference internal" href="#jit-tools" id="id17">JIT Tools</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference internal" href="#targets-supported" id="id18">Targets Supported</a><ul>
+<li><a class="reference internal" href="#all-default" id="id19"><tt class="docutils literal"><span class="pre">all</span></tt> (default)</a></li>
+<li><a class="reference internal" href="#all-local" id="id20"><tt class="docutils literal"><span class="pre">all-local</span></tt></a></li>
+<li><a class="reference internal" href="#check" id="id21"><tt class="docutils literal"><span class="pre">check</span></tt></a></li>
+<li><a class="reference internal" href="#check-local" id="id22"><tt class="docutils literal"><span class="pre">check-local</span></tt></a></li>
+<li><a class="reference internal" href="#clean" id="id23"><tt class="docutils literal"><span class="pre">clean</span></tt></a></li>
+<li><a class="reference internal" href="#clean-local" id="id24"><tt class="docutils literal"><span class="pre">clean-local</span></tt></a></li>
+<li><a class="reference internal" href="#dist" id="id25"><tt class="docutils literal"><span class="pre">dist</span></tt></a></li>
+<li><a class="reference internal" href="#dist-check" id="id26"><tt class="docutils literal"><span class="pre">dist-check</span></tt></a></li>
+<li><a class="reference internal" href="#dist-clean" id="id27"><tt class="docutils literal"><span class="pre">dist-clean</span></tt></a></li>
+<li><a class="reference internal" href="#install" id="id28"><tt class="docutils literal"><span class="pre">install</span></tt></a></li>
+<li><a class="reference internal" href="#preconditions" id="id29"><tt class="docutils literal"><span class="pre">preconditions</span></tt></a></li>
+<li><a class="reference internal" href="#printvars" id="id30"><tt class="docutils literal"><span class="pre">printvars</span></tt></a></li>
+<li><a class="reference internal" href="#reconfigure" id="id31"><tt class="docutils literal"><span class="pre">reconfigure</span></tt></a></li>
+<li><a class="reference internal" href="#spotless" id="id32"><tt class="docutils literal"><span class="pre">spotless</span></tt></a></li>
+<li><a class="reference internal" href="#tags" id="id33"><tt class="docutils literal"><span class="pre">tags</span></tt></a></li>
+<li><a class="reference internal" href="#uninstall" id="id34"><tt class="docutils literal"><span class="pre">uninstall</span></tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#variables" id="id35">Variables</a><ul>
+<li><a class="reference internal" href="#control-variables" id="id36">Control Variables</a></li>
+<li><a class="reference internal" href="#override-variables" id="id37">Override Variables</a></li>
+<li><a class="reference internal" href="#readable-variables" id="id38">Readable Variables</a></li>
+<li><a class="reference internal" href="#internal-variables" id="id39">Internal Variables</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="section" id="introduction">
+<h2><a class="toc-backref" href="#id3">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
+<p>This document provides <em>usage</em> information about the LLVM makefile system. While
+loosely patterned after the BSD makefile system, LLVM has taken a departure from
+BSD in order to implement additional features needed by LLVM.  Although makefile
+systems, such as <tt class="docutils literal"><span class="pre">automake</span></tt>, were attempted at one point, it has become clear
+that the features needed by LLVM and the <tt class="docutils literal"><span class="pre">Makefile</span></tt> norm are too great to use
+a more limited tool. Consequently, LLVM requires simply GNU Make 3.79, a widely
+portable makefile processor. LLVM unabashedly makes heavy use of the features of
+GNU Make so the dependency on GNU Make is firm. If you’re not familiar with
+<tt class="docutils literal"><span class="pre">make</span></tt>, it is recommended that you read the <a class="reference external" href="http://www.gnu.org/software/make/manual/make.html">GNU Makefile Manual</a>.</p>
+<p>While this document is rightly part of the <a class="reference external" href="ProgrammersManual.html">LLVM Programmer’s
+Manual</a>, it is treated separately here because of the
+volume of content and because it is often an early source of bewilderment for
+new developers.</p>
+</div>
+<div class="section" id="general-concepts">
+<h2><a class="toc-backref" href="#id4">General Concepts</a><a class="headerlink" href="#general-concepts" title="Permalink to this headline">¶</a></h2>
+<p>The LLVM Makefile System is the component of LLVM that is responsible for
+building the software, testing it, generating distributions, checking those
+distributions, installing and uninstalling, etc. It consists of a several files
+throughout the source tree. These files and other general concepts are described
+in this section.</p>
+<div class="section" id="projects">
+<h3><a class="toc-backref" href="#id5">Projects</a><a class="headerlink" href="#projects" title="Permalink to this headline">¶</a></h3>
+<p>The LLVM Makefile System is quite generous. It not only builds its own software,
+but it can build yours too. Built into the system is knowledge of the
+<tt class="docutils literal"><span class="pre">llvm/projects</span></tt> directory. Any directory under <tt class="docutils literal"><span class="pre">projects</span></tt> that has both a
+<tt class="docutils literal"><span class="pre">configure</span></tt> script and a <tt class="docutils literal"><span class="pre">Makefile</span></tt> is assumed to be a project that uses the
+LLVM Makefile system.  Building software that uses LLVM does not require the
+LLVM Makefile System nor even placement in the <tt class="docutils literal"><span class="pre">llvm/projects</span></tt>
+directory. However, doing so will allow your project to get up and running
+quickly by utilizing the built-in features that are used to compile LLVM. LLVM
+compiles itself using the same features of the makefile system as used for
+projects.</p>
+<p>For complete details on setting up your projects configuration, simply mimic the
+<tt class="docutils literal"><span class="pre">llvm/projects/sample</span></tt> project. Or for further details, consult the
+<a class="reference external" href="Projects.html">Projects</a> page.</p>
+</div>
+<div class="section" id="variable-values">
+<h3><a class="toc-backref" href="#id6">Variable Values</a><a class="headerlink" href="#variable-values" title="Permalink to this headline">¶</a></h3>
+<p>To use the makefile system, you simply create a file named <tt class="docutils literal"><span class="pre">Makefile</span></tt> in your
+directory and declare values for certain variables.  The variables and values
+that you select determine what the makefile system will do. These variables
+enable rules and processing in the makefile system that automatically Do The
+Right Thing (C).</p>
+</div>
+<div class="section" id="including-makefiles">
+<h3><a class="toc-backref" href="#id7">Including Makefiles</a><a class="headerlink" href="#including-makefiles" title="Permalink to this headline">¶</a></h3>
+<p>Setting variables alone is not enough. You must include into your Makefile
+additional files that provide the rules of the LLVM Makefile system. The various
+files involved are described in the sections that follow.</p>
+<div class="section" id="makefile">
+<h4><a class="toc-backref" href="#id8"><tt class="docutils literal"><span class="pre">Makefile</span></tt></a><a class="headerlink" href="#makefile" title="Permalink to this headline">¶</a></h4>
+<p>Each directory to participate in the build needs to have a file named
+<tt class="docutils literal"><span class="pre">Makefile</span></tt>. This is the file first read by <tt class="docutils literal"><span class="pre">make</span></tt>. It has three
+sections:</p>
+<ol class="arabic simple">
+<li>Settable Variables — Required that must be set first.</li>
+<li><tt class="docutils literal"><span class="pre">include</span> <span class="pre">$(LEVEL)/Makefile.common</span></tt> — include the LLVM Makefile system.</li>
+<li>Override Variables — Override variables set by the LLVM Makefile system.</li>
+</ol>
+</div>
+<div class="section" id="makefile-common">
+<span id="level-makefile-common"></span><h4><a class="toc-backref" href="#id9"><tt class="docutils literal"><span class="pre">Makefile.common</span></tt></a><a class="headerlink" href="#makefile-common" title="Permalink to this headline">¶</a></h4>
+<p>Every project must have a <tt class="docutils literal"><span class="pre">Makefile.common</span></tt> file at its top source
+directory. This file serves three purposes:</p>
+<ol class="arabic simple">
+<li>It includes the project’s configuration makefile to obtain values determined
+by the <tt class="docutils literal"><span class="pre">configure</span></tt> script. This is done by including the
+<a class="reference internal" href="#level-makefile-config">$(LEVEL)/Makefile.config</a> file.</li>
+<li>It specifies any other (static) values that are needed throughout the
+project. Only values that are used in all or a large proportion of the
+project’s directories should be placed here.</li>
+<li>It includes the standard rules for the LLVM Makefile system,
+<a class="reference internal" href="#llvm-src-root-makefile-rules">$(LLVM_SRC_ROOT)/Makefile.rules</a>.  This file is the <em>guts</em> of the LLVM
+<tt class="docutils literal"><span class="pre">Makefile</span></tt> system.</li>
+</ol>
+</div>
+<div class="section" id="makefile-config">
+<span id="level-makefile-config"></span><h4><a class="toc-backref" href="#id10"><tt class="docutils literal"><span class="pre">Makefile.config</span></tt></a><a class="headerlink" href="#makefile-config" title="Permalink to this headline">¶</a></h4>
+<p>Every project must have a <tt class="docutils literal"><span class="pre">Makefile.config</span></tt> at the top of its <em>build</em>
+directory. This file is <strong>generated</strong> by the <tt class="docutils literal"><span class="pre">configure</span></tt> script from the
+pattern provided by the <tt class="docutils literal"><span class="pre">Makefile.config.in</span></tt> file located at the top of the
+project’s <em>source</em> directory. The contents of this file depend largely on what
+configuration items the project uses, however most projects can get what they
+need by just relying on LLVM’s configuration found in
+<tt class="docutils literal"><span class="pre">$(LLVM_OBJ_ROOT)/Makefile.config</span></tt>.</p>
+</div>
+<div class="section" id="makefile-rules">
+<span id="llvm-src-root-makefile-rules"></span><h4><a class="toc-backref" href="#id11"><tt class="docutils literal"><span class="pre">Makefile.rules</span></tt></a><a class="headerlink" href="#makefile-rules" title="Permalink to this headline">¶</a></h4>
+<p>This file, located at <tt class="docutils literal"><span class="pre">$(LLVM_SRC_ROOT)/Makefile.rules</span></tt> is the heart of the
+LLVM Makefile System. It provides all the logic, dependencies, and rules for
+building the targets supported by the system. What it does largely depends on
+the values of <tt class="docutils literal"><span class="pre">make</span></tt> <a class="reference internal" href="#variables">variables</a> that have been set <em>before</em>
+<tt class="docutils literal"><span class="pre">Makefile.rules</span></tt> is included.</p>
+</div>
+<div class="section" id="comments">
+<h4><a class="toc-backref" href="#id12">Comments</a><a class="headerlink" href="#comments" title="Permalink to this headline">¶</a></h4>
+<p>User <tt class="docutils literal"><span class="pre">Makefile</span></tt>s need not have comments in them unless the construction is
+unusual or it does not strictly follow the rules and patterns of the LLVM
+makefile system. Makefile comments are invoked with the pound (<tt class="docutils literal"><span class="pre">#</span></tt>) character.
+The <tt class="docutils literal"><span class="pre">#</span></tt> character and any text following it, to the end of the line, are
+ignored by <tt class="docutils literal"><span class="pre">make</span></tt>.</p>
+</div>
+</div>
+</div>
+<div class="section" id="tutorial">
+<h2><a class="toc-backref" href="#id13">Tutorial</a><a class="headerlink" href="#tutorial" title="Permalink to this headline">¶</a></h2>
+<p>This section provides some examples of the different kinds of modules you can
+build with the LLVM makefile system. In general, each directory you provide will
+build a single object although that object may be composed of additionally
+compiled components.</p>
+<div class="section" id="libraries">
+<h3><a class="toc-backref" href="#id14">Libraries</a><a class="headerlink" href="#libraries" title="Permalink to this headline">¶</a></h3>
+<p>Only a few variable definitions are needed to build a regular library.
+Normally, the makefile system will build all the software into a single
+<tt class="docutils literal"><span class="pre">libname.o</span></tt> (pre-linked) object. This means the library is not searchable and
+that the distinction between compilation units has been dissolved. Optionally,
+you can ask for a shared library (.so) or archive library (.a) built.  Archive
+libraries are the default. For example:</p>
+<div class="highlight-makefile"><div class="highlight"><pre><span class="nv">LIBRARYNAME</span> <span class="o">=</span> mylib
+<span class="nv">SHARED_LIBRARY</span> <span class="o">=</span> 1
+<span class="nv">BUILD_ARCHIVE</span> <span class="o">=</span> 1
+</pre></div>
+</div>
+<p>says to build a library named <tt class="docutils literal"><span class="pre">mylib</span></tt> with both a shared library
+(<tt class="docutils literal"><span class="pre">mylib.so</span></tt>) and an archive library (<tt class="docutils literal"><span class="pre">mylib.a</span></tt>) version. The contents of all
+the libraries produced will be the same, they are just constructed differently.
+Note that you normally do not need to specify the sources involved. The LLVM
+Makefile system will infer the source files from the contents of the source
+directory.</p>
+<p>The <tt class="docutils literal"><span class="pre">LOADABLE_MODULE=1</span></tt> directive can be used in conjunction with
+<tt class="docutils literal"><span class="pre">SHARED_LIBRARY=1</span></tt> to indicate that the resulting shared library should be
+openable with the <tt class="docutils literal"><span class="pre">dlopen</span></tt> function and searchable with the <tt class="docutils literal"><span class="pre">dlsym</span></tt> function
+(or your operating system’s equivalents). While this isn’t strictly necessary on
+Linux and a few other platforms, it is required on systems like HP-UX and
+Darwin. You should use <tt class="docutils literal"><span class="pre">LOADABLE_MODULE</span></tt> for any shared library that you
+intend to be loaded into an tool via the <tt class="docutils literal"><span class="pre">-load</span></tt> option.  <a class="reference internal" href="WritingAnLLVMPass.html#writing-an-llvm-pass-makefile"><em>Pass
+documentation</em></a> has an example of why you might
+want to do this.</p>
+<div class="section" id="loadable-modules">
+<h4><a class="toc-backref" href="#id15">Loadable Modules</a><a class="headerlink" href="#loadable-modules" title="Permalink to this headline">¶</a></h4>
+<p>In some situations, you need to create a loadable module. Loadable modules can
+be loaded into programs like <tt class="docutils literal"><span class="pre">opt</span></tt> or <tt class="docutils literal"><span class="pre">llc</span></tt> to specify additional passes to
+run or targets to support.  Loadable modules are also useful for debugging a
+pass or providing a pass with another package if that pass can’t be included in
+LLVM.</p>
+<p>LLVM provides complete support for building such a module. All you need to do is
+use the <tt class="docutils literal"><span class="pre">LOADABLE_MODULE</span></tt> variable in your <tt class="docutils literal"><span class="pre">Makefile</span></tt>. For example, to build
+a loadable module named <tt class="docutils literal"><span class="pre">MyMod</span></tt> that uses the LLVM libraries <tt class="docutils literal"><span class="pre">LLVMSupport.a</span></tt>
+and <tt class="docutils literal"><span class="pre">LLVMSystem.a</span></tt>, you would specify:</p>
+<div class="highlight-makefile"><div class="highlight"><pre><span class="nv">LIBRARYNAME</span> <span class="o">:=</span> MyMod
+<span class="nv">LOADABLE_MODULE</span> <span class="o">:=</span> 1
+<span class="nv">LINK_COMPONENTS</span> <span class="o">:=</span> support system
+</pre></div>
+</div>
+<p>Use of the <tt class="docutils literal"><span class="pre">LOADABLE_MODULE</span></tt> facility implies several things:</p>
+<ol class="arabic">
+<li><dl class="first docutils">
+<dt>There will be no “<tt class="docutils literal"><span class="pre">lib</span></tt>” prefix on the module. This differentiates it from</dt>
+<dd><p class="first last">a standard shared library of the same name.</p>
+</dd>
+</dl>
+</li>
+<li><p class="first">The <a class="reference internal" href="#shared-library">SHARED_LIBRARY</a> variable is turned on.</p>
+</li>
+<li><p class="first">The <a class="reference internal" href="#link-libs-in-shared">LINK_LIBS_IN_SHARED</a> variable is turned on.</p>
+</li>
+</ol>
+<p>A loadable module is loaded by LLVM via the facilities of libtool’s libltdl
+library which is part of <tt class="docutils literal"><span class="pre">lib/System</span></tt> implementation.</p>
+</div>
+</div>
+<div class="section" id="tools">
+<h3><a class="toc-backref" href="#id16">Tools</a><a class="headerlink" href="#tools" title="Permalink to this headline">¶</a></h3>
+<p>For building executable programs (tools), you must provide the name of the tool
+and the names of the libraries you wish to link with the tool. For example:</p>
+<div class="highlight-makefile"><div class="highlight"><pre><span class="nv">TOOLNAME</span> <span class="o">=</span> mytool
+<span class="nv">USEDLIBS</span> <span class="o">=</span> mylib
+<span class="nv">LINK_COMPONENTS</span> <span class="o">=</span> support system
+</pre></div>
+</div>
+<p>says that we are to build a tool name <tt class="docutils literal"><span class="pre">mytool</span></tt> and that it requires three
+libraries: <tt class="docutils literal"><span class="pre">mylib</span></tt>, <tt class="docutils literal"><span class="pre">LLVMSupport.a</span></tt> and <tt class="docutils literal"><span class="pre">LLVMSystem.a</span></tt>.</p>
+<p>Note that two different variables are used to indicate which libraries are
+linked: <