diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index b122fd352eaf5..941a7bea6cffe 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -29557,9 +29557,15 @@ Arguments: """""""""" The ``llvm.objectsize`` intrinsic takes four arguments. The first argument is a -pointer to or into the ``object``. The second argument determines whether -``llvm.objectsize`` returns 0 (if true) or -1 (if false) when the object size is -unknown. The third argument controls how ``llvm.objectsize`` acts when ``null`` +pointer to or into the ``object``. + +The second argument determines whether ``llvm.objectsize`` returns the minimum +(if true) or maximum (if false) object size. The minimum size may be any size +smaller than or equal to the actual object size (including 0 if unknown). The +maximum size may be any size greater than or equal to the actual object size +(including -1 if unknown). + +The third argument controls how ``llvm.objectsize`` acts when ``null`` in address space 0 is used as its pointer argument. If it's ``false``, ``llvm.objectsize`` reports 0 bytes available when given ``null``. Otherwise, if the ``null`` is in a non-zero address space or if ``true`` is given for the