diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index a867ee01c538..9d2d226ddc6c 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/docs/LangRef.html @@ -257,8 +257,8 @@
  • Half Precision Floating Point Intrinsics
      -
    1. 'llvm.convert.to.fp16' Intrinsic
    2. -
    3. 'llvm.conver.from.fp16' Intrinsic
    4. +
    5. 'llvm.convert.to.fp16' Intrinsic
    6. +
    7. 'llvm.convert.from.fp16' Intrinsic
  • Debugger intrinsics
  • @@ -6619,16 +6619,23 @@ LLVM.

    -

    Half precision floating point is storage-only format. That is why the values - in such format should be promoted to single precision format before any - operations. LLVM provides intrinsics for conversions to single precision and - back.

    - +

    Half precision floating point is storage-only format. This means that it is + an encoding (typically for density in memory) but typically does not support + computation in the format.

    + +

    This means that you code must first load the half-precision floating point + value as an i16, then convert it to float with llvm.convert.from.fp16. + Computation can then be performed on the float value (including extending to + double etc). When the value is ready to be stored back to memory, this is + done by converting to float if needed, then converting to i16 with + llvm.convert.to.fp16, then + storing as an i16 value.

    - 'llvm.convert.to.fp16' Intrinsic + 'llvm.convert.to.fp16' Intrinsic
    @@ -6650,8 +6657,8 @@ LLVM.

    Semantics:

    The 'llvm.convert.to.fp16' intrinsic function performs a conversion from single precision floating point format to half precision - floating point format. Since the format is storage only the return value is - just an i16 which contains the converted number.

    + floating point format. The return value is just an i16 which + contains the converted number.

    Examples:
    @@ -6663,7 +6670,7 @@ LLVM.

    @@ -6684,9 +6691,9 @@ LLVM.

    Semantics:

    The 'llvm.convert.from.fp16' intrinsic function performs a - conversion from half single precision floating point format to signle - precision floating point format. Since the format is storage only the - argument is represented by an i16 value.

    + conversion from half single precision floating point format to signgle + precision floating point format. The input half-float value is represented by + an i16 value.

    Examples: