diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -2233,13 +2233,19 @@ value of min. If the attribute is not present, no assumptions are made about the range of vscale. ``"min-legal-vector-width"=""`` - This attribute indicates the minimum legal vector width required by the - calling convension. It is the maximum width of vector arguments and - returnings in the function and functions called by this function. Because - all the vectors are supposed to be legal type for compatibility. - Backends are free to ignore the attribute if they don't need to support - different maximum legal vector types or such information can be inferred by - other attributes. + This attribute indicates the minimum vector width in bits that code + generator must make them legal. It is required by the target’s ABI. + A target like X86 may dynamically decide vector types in the function are + legal or not according to optimizations. When this attribute is set, code + generator will not turn vector types with the same or below size illegal. + The value is calculated from the vector arguments and returnings in the + function and functions directly called by this function. + A value 0 means no vector types in arguments and returnings in the function + as well as its callees. Lack of the attribute means the IR didn't come from + clang and can't be trusted to have been audited. + This attribute doesn't guarantee arbitrary vector width specified will be + treated as legal type in code generator. Users are not encouraged to + directly pass or return vector types out of the capacity of their targets. Call Site Attributes ----------------------