Index: docs/LangRef.rst =================================================================== --- docs/LangRef.rst +++ docs/LangRef.rst @@ -10860,6 +10860,15 @@ LLVM provides intrinsics for some arithmetic with overflow operations. +Each of these intrinsics returns a two-element struct. If no overflow +occurs, the first element of the returned struct will be equal to the +mathematically correct result and the second element will be +0. Otherwise, the first element of the returned struct will be the +unique value that is equivalent to the mathematically correct result +modulo two raised to the k power, where k is the number of bits in the +operand type, and the second element will be 1. The behavior of these +intrinsics is well-defined for all argument values. + '``llvm.sadd.with.overflow.*``' Intrinsics ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^