From 41b485c9c35b90bb7ee55dca2d5375980e546039 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 8 Feb 2009 23:00:09 +0000 Subject: [PATCH] Document llvm.umul.with.overflow indicating that it's badly broken and not intended for use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64104 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/docs/LangRef.html b/docs/LangRef.html index b7c7f1b5464..ada3eacc3b8 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -216,6 +216,7 @@
  • 'llvm.ssub.with.overflow.* Intrinsics
  • 'llvm.usub.with.overflow.* Intrinsics
  • 'llvm.smul.with.overflow.* Intrinsics
  • +
  • 'llvm.umul.with.overflow.* Intrinsics
  • Debugger intrinsics
  • @@ -6170,6 +6171,59 @@ overflow.

    + +
    + 'llvm.umul.with.overflow.*' Intrinsics +
    + +
    + +
    Syntax:
    + +

    This is an overloaded intrinsic. You can use llvm.umul.with.overflow +on any integer bit width.

    + +
    +  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)
    +
    + +
    Overview:
    + +

    Warning: 'llvm.umul.with.overflow' is badly broken. It is +actively being fixed, but it should not currently be used!

    + +

    The 'llvm.umul.with.overflow' family of intrinsic functions perform +a unsigned multiplication of the two arguments, and indicate whether an overflow +occurred during the unsigned multiplication.

    + +
    Arguments:
    + +

    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 i1. %a +and %b are the two values that will undergo unsigned +multiplication.

    + +
    Semantics:
    + +

    The 'llvm.umul.with.overflow' 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.

    + +
    Examples:
    +
    +  %res = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b)
    +  %sum = extractvalue {i32, i1} %res, 0
    +  %obit = extractvalue {i32, i1} %res, 1
    +  br i1 %obit, label %overflow, label %normal
    +
    + +
    +
    Debugger Intrinsics