diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-06 21:44:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-06 21:44:57 +0000 |
commit | 35bda8914c0d1c02a6f90f42e7810c83150737e1 (patch) | |
tree | b210ccd009a7ac5331c76c6393b5b45d141d12d0 /docs | |
parent | bd75021465e7f8c81785e692cfd3ce559764e46f (diff) | |
download | external_llvm-35bda8914c0d1c02a6f90f42e7810c83150737e1.zip external_llvm-35bda8914c0d1c02a6f90f42e7810c83150737e1.tar.gz external_llvm-35bda8914c0d1c02a6f90f42e7810c83150737e1.tar.bz2 |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/LangRef.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html index da365ff..f799749 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -3441,7 +3441,8 @@ Instruction</a> </div> <h5>Syntax:</h5> <pre> - <result> = udiv <ty> <op1>, <op2> <i>; yields {ty}:result</i> + <result> = udiv <ty> <op1>, <op2> <i>; yields {ty}:result</i> + <result> = udiv exact <ty> <op1>, <op2> <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> <result> = udiv i32 4, %var <i>; yields {i32}:result = 4 / %var</i> |