This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC no longer synthesizing v2sf operations from v4sf operations?


Hello!

typedef float v4sf __attribute__((vector_size(16)));
void foo(v4sf *a, v4sf *b, v4sf *c)
{
       *a = *b + *c;
}

we no longer (since 4.0) synthesize v2sf (aka sse) operations
for f.i. -march=athlon (not that we were too successful at this
in 3.4 - we generated horrible code instead).  Instead for !sse2
architectures we generate standard i387 FP code (with some
unnecessary temporaries, but reasonably well).



SSE _is_ v4sf. 'gcc -O2 -msse -S -fomit-frame-pointer' produces:

foo:
       movl    12(%esp), %eax
       movaps  (%eax), %xmm0
       movl    8(%esp), %eax
       addps   (%eax), %xmm0
       movl    4(%esp), %eax
       movaps  %xmm0, (%eax)
       ret

SSE2 is v2df.

Athlon does not handle SSE insns.

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]