[PATCH] Bug 15391: Fix rejecting valid int / ptr vector attributes

Dan Gohman dan433584 at gmail.com
Fri Sep 6 10:04:38 PDT 2013


On Wed, Sep 4, 2013 at 1:37 PM, Matt Arsenault <Matthew.Arsenault at amd.com>wrote:

>   Don't accept sret or nest for vectors of pointers. Update LangRef to
> mention vectors.
>
>   I'm not sure about nest, and I'm not sure about noalias. Are the
> pointers within the vector allowed to alias another in the vector?
>
> http://llvm-reviews.chandlerc.com/D1561
>
> CHANGE SINCE LAST DIFF
>   http://llvm-reviews.chandlerc.com/D1561?vs=3933&id=4043#toc
>
> Files:
>   docs/LangRef.rst
>   lib/IR/Attributes.cpp
>   test/Verifier/vector-type-attributes.ll
>
> Index: docs/LangRef.rst
> ===================================================================
> --- docs/LangRef.rst
> +++ docs/LangRef.rst
> @@ -661,14 +661,16 @@
>
>  ``zeroext``
>      This indicates to the code generator that the parameter or return
> -    value should be zero-extended to the extent required by the target's
> -    ABI (which is usually 32-bits, but is 8-bits for a i1 on x86-64) by
> -    the caller (for a parameter) or the callee (for a return value).
> +    value should be zero-extended to the extent required by the
> +    target's ABI (which is usually 32-bits, but is 8-bits for a i1 on
> +    x86-64) by the caller (for a parameter) or the callee (for a
> +    return value). When applied to a vector, this is per-component.
>  ``signext``
>      This indicates to the code generator that the parameter or return
>      value should be sign-extended to the extent required by the target's
>      ABI (which is usually 32-bits) by the caller (for a parameter) or
> -    the callee (for a return value).
> +    the callee (for a return value). When applied to a vector, this is
> +    per-component.
>

zeroext and signext exist to solve a specific and fairly ugly ABI situation
known to exist specifically with scalar integers. Do you have any
motivating use cases for extending this to vectors?

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130906/fabe53ee/attachment.html>


More information about the llvm-commits mailing list