diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 2d72e548ec82a..add9ac68de25d 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -20238,18 +20238,31 @@ Overview: """"""""" The '``llvm.vector.experimental.partial.reduce.add.*``' intrinsics reduce the -concatenation of the two vector operands down to the number of elements dictated -by the result type. The result type is a vector type that matches the type of the -first operand vector. +concatenation of the two vector arguments down to the number of elements of the +result vector type. Arguments: """""""""" -Both arguments must be vectors of matching element types. The first argument type must -match the result type, while the second argument type must have a vector length that is a -positive integer multiple of the first vector/result type. The arguments must be either be -both fixed or both scalable vectors. +The first argument is an integer vector with the same type as the result. +The second argument is a vector with a length that is a known integer multiple +of the result's type, while maintaining the same element type. + +Semantics: +"""""""""" + +Other than the reduction operator (e.g. add) the way in which the concatinated +arguments is reduced is entirely unspecified. By their nature these intrinsics +are not expected to be useful in isolation but instead implement the first phase +of an overall reduction operation. + +The typical use case is loop vectorization where reductions are split into an +in-loop phase, where maintaining an unordered vector result is important for +performance, and an out-of-loop phase to calculate the final scalar result. + +By not introducing any new ordering constraints these intrinsics maximize the +abilitity to utilise a target's accumulation instructions. '``llvm.experimental.vector.histogram.*``' Intrinsic ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^