------- Comment #13 from ubizjak at gmail dot com  2009-06-28 12:13 -------
(In reply to comment #12)

> Shouldn't we be able to use mmx regs here?  Thus not rely on
> type_for_widest_vector_mode, but instead see if the original vector
> mode is supported by the backend?

Please note that v2sf instructions are 3dnow! insns, not SSE.

Some time ago, it was decided that we don't want generic verctorizer to mess
around with mmx registers due to missing [f]emms insn emission.

Renaming "mmx_addv2sf3" pattern to "addv2sf2" and using -m3dnow will generate
expected pfadd, but without femms:

test:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $32, %esp
        movl    $1065353216, %eax
        movl    $0, %edx
        movl    %eax, -24(%ebp)
        movl    %edx, -20(%ebp)
        movl    $0, %eax
        movl    $1065353216, %edx
        movl    %eax, -16(%ebp)
        movl    %edx, -12(%ebp)
        movq    -16(%ebp), %mm0
        movq    -24(%ebp), %mm1
        pfadd   %mm1, %mm0
        movq    %mm0, -8(%ebp)
        leave
        ret


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40550

Reply via email to