https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113978
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #1) > This is an ABI issue. I am not sure if GCC is correct or LLVM is correct. 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. > But basically clang/LLVM is returning in %zmm0 and %zmm1 while GCC is > returning via memory. There is certainly not anything in the psABI that would return something in %zmm0/%zmm1 pair I believe.