------- Comment #29 from ubizjak at gmail dot com  2008-03-20 00:01 -------
Now we generate:

-m32 -mmmx -msse2:

test:
        subl    $20, %esp
        movl    w, %eax
        movl    w+4, %edx
        movl    %ebx, 12(%esp)
        movl    %esi, 16(%esp)
        movl    %eax, (%esp)
        movzwl  (%esp), %ecx
        movl    %edx, 4(%esp)
        movzwl  2(%esp), %ebx
        movzwl  4(%esp), %esi
        movzwl  6(%esp), %eax
        addl    %ecx, %ecx
        addl    %ebx, %ebx
        addl    %esi, %esi
        addl    %eax, %eax
        movw    %bx, w+2
        movl    12(%esp), %ebx
        movw    %si, w+4
        movl    16(%esp), %esi
        movw    %ax, w+6
        movl    w+4, %edx
        movw    %cx, w
        movl    w, %eax
        movl    %edx, dw+4
        movl    %eax, dw
        addl    $20, %esp
        ret

-m64 -mmmx -msse2:

test:
        movabsq $9223231297218904063, %rax
        andq    w(%rip), %rax
        addq    %rax, %rax
        movq    %rax, w(%rip)
        movq    w(%rip), %rax
        movq    %rax, dw(%rip)
        ret

The issue with useless reload is PR 12395, as mentioned in Comment #5.


-- 


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

Reply via email to