https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88998

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ubizjak at gmail dot com

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 45503
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45503&action=edit
Proposed patch

We can use cvtdq2pd instead of cvtpi2pd and directly use xmm input register.
The  patched compiler generates:

        vmovd   %edi, %xmm1
        vpinsrd $1, %esi, %xmm1, %xmm0
        vcvtdq2pd       %xmm0, %xmm0
        vhaddpd %xmm0, %xmm0, %xmm0
        ret

which avoids MMX registers altogether.

The patch also amends cvtpd2pi/cvttpd2pi in a similar way, so it can output
directly to xmm register.

Reply via email to