https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87812
Iain Sandoe <iains at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-10-30 Ever confirmed|0 |1 --- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to H.J. Lu from comment #1) > Without AVX, GCC treats > > typedef qi __attribute__((vector_size (32))) v32qi; > > as a type of 32 bytes, which is passed in memory. Clang does > > # clang -S -msse2 x.c -O2 > ... > movaps .LCPI0_0(%rip), %xmm0 # xmm0 = > [48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102] > movaps %xmm0, %xmm1 > retq > # clang -S -msse2 x.c -O2 -m32 > ... > movaps .LCPI0_0, %xmm0 # xmm0 = > [48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102] > movaps %xmm0, %xmm1 > retl > > They look very odd to me. You either pass it as a vector or you don't. > You can't have it both ways. (when there's no native size support on the hardware) breaking objects into pieces to pass in registers is IMO a reasonable ABI approach. However, I am not here to argue for one or the other - what's needed is a clear statement of the "correct" ABI ad then : * a bug filed against the implementation(s) which don't comply. * a plan to support the mismatch on systems "in the wild". I don't currently have access to icc (or other compilers) so no idea what they do. FWIW clang -mno-sse passes in memory as per the GCC code.