summaryrefslogtreecommitdiffstats
path: root/llvm/docs/LangRef.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-06 21:44:57 +0000
committerChris Lattner <sabre@nondot.org>2011-02-06 21:44:57 +0000
commit35315d065b74537c1290767d0b8da9ca2036fdea (patch)
treee00a09050e0a4552c4a0ecb533c550fea4daa41a /llvm/docs/LangRef.html
parentb54605b8e22fa620bb843637cc15bc74aac9aed5 (diff)
downloadbcm5719-llvm-35315d065b74537c1290767d0b8da9ca2036fdea.tar.gz
bcm5719-llvm-35315d065b74537c1290767d0b8da9ca2036fdea.zip
enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this. Nothing forms exact udivs yet though. This is progress on PR8862 llvm-svn: 124992
Diffstat (limited to 'llvm/docs/LangRef.html')
-rw-r--r--llvm/docs/LangRef.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html
index da365ff808a..f7997495e04 100644
--- a/llvm/docs/LangRef.html
+++ b/llvm/docs/LangRef.html
@@ -3441,7 +3441,8 @@ Instruction</a> </div>
<h5>Syntax:</h5>
<pre>
- &lt;result&gt; = udiv &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
+ &lt;result&gt; = udiv &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
+ &lt;result&gt; = udiv exact &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
@@ -3460,6 +3461,11 @@ Instruction</a> </div>
<p>Division by zero leads to undefined behavior.</p>
+<p>If the <tt>exact</tt> keyword is present, the result value of the
+ <tt>udiv</tt> is a <a href="#trapvalues">trap value</a> if %op1 is not a
+ multiple of %op2 (as such, "((a udiv exact b) mul b) == a").</p>
+
+
<h5>Example:</h5>
<pre>
&lt;result&gt; = udiv i32 4, %var <i>; yields {i32}:result = 4 / %var</i>
OpenPOWER on IntegriCloud