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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #7)
> The psABI doesn't cover that.  It only talks about __m128, __m256 and __m512
> types, and
> as both compilers use the GNU vector_size attribute extension under the hood
> for those types, that is how __attribute__((vector_size ({16,32,64})))
> should behave.
> Smaller vectors (vector_size 2, 4, 8) on x86_64 are in GCC passed like
> __m128 (I think), larger vectors or even __m256/__m512 if AVX/AVX512 isn't
> supported are classified as MEMORY like > 16 byte structures/unions.

And given that vector_size is a GNU extension and GCC behaves that way since
GCC 4.0
(I think since https://gcc.gnu.org/legacy-ml/gcc-patches/2004-07/msg01512.html
,
before that
typedef char V __attribute__((vector_size (128)));
V foo (V* p) { return *p; }
has been rejected, we only supported natively supported vectors in GCC 3.x), so
I think LLVM needs to be fixed to match that.

Reply via email to