------- Additional Comments From uros at kss-loka dot si 2005-09-27 11:41
-------
I think that following example wins the contest:
vector float f(void) { return (vector float){ a, a, b, b}; }
gcc -O2 -msse -fomit-frame-pointer
subl $28, %esp
movss a, %xmm0
movss %xmm0, 4(%esp)
movss b, %xmm0
movd 4(%esp), %mm0
punpckldq %mm0, %mm0
movss %xmm0, 4(%esp)
movq %mm0, 16(%esp)
movd 4(%esp), %mm0
punpckldq %mm0, %mm0
movq %mm0, 8(%esp)
movlps 16(%esp), %xmm1
movhps 8(%esp), %xmm1
addl $28, %esp
movaps %xmm1, %xmm0
ret
Note the usage of MMX registers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24073