https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88602

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amonakov at gcc dot gnu.org

--- Comment #7 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #6)
> The problem with ext_vector_type is we need to support non-power of 2 vector
> sizes. That means this is a middle-end change first.

We do not need a middle-end change for that. Clang pads ext_vector_type vectors
to a power-of-two size (as well as GNU vector_size vectors). A dereference of a
pointer-to-vector accesses the padded size. This matches OpenCL C
specification:

    For 3-component vector data types, the size of the data type is
    4 * sizeof(component). This means that a 3-component vector data type
    will be aligned to a 4 * sizeof(component) boundary.
    The vload3 and vstore3 built-in functions can be used to read and write,
    respectively, 3-component vector data types from an array of packed scalar
    data type.

(GLSL and OpenCL C do not have larger vectors, so size 3 is the only possible
non-power-of-two size)

Reply via email to