From 35bda8914c0d1c02a6f90f42e7810c83150737e1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 6 Feb 2011 21:44:57 +0000 Subject: 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 --- docs/LangRef.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docs/LangRef.html') diff --git a/docs/LangRef.html b/docs/LangRef.html index da365ff808..f7997495e0 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -3441,7 +3441,8 @@ Instruction
Syntax:
-  <result> = udiv <ty> <op1>, <op2>   ; yields {ty}:result
+  <result> = udiv <ty> <op1>, <op2>         ; yields {ty}:result
+  <result> = udiv exact <ty> <op1>, <op2>   ; yields {ty}:result
 
Overview:
@@ -3460,6 +3461,11 @@ Instruction

Division by zero leads to undefined behavior.

+

If the exact keyword is present, the result value of the + udiv is a trap value if %op1 is not a + multiple of %op2 (as such, "((a udiv exact b) mul b) == a").

+ +
Example:
   <result> = udiv i32 4, %var          ; yields {i32}:result = 4 / %var
-- 
cgit v1.2.3