------- Additional Comments From belyshev at depni dot sinp dot msu dot ru  
2005-09-27 05:49 -------
what happening here is:
                                                xmm0            xmm1
        movss   _a, %xmm1                       {?, ?, ?, ?}    {a, 0, 0, 0}
        movss   _b, %xmm0                       {b, 0, 0, 0}    {a, 0, 0, 0}
        unpcklps        %xmm1, %xmm0            {b, a, 0, 0}    {a, 0, 0, 0}
        movaps  %xmm0, %xmm1                    {b, a, 0, 0}    {b, a, 0, 0}
        xorps   %xmm0, %xmm0                    {0, 0, 0, 0}    {b, a, 0, 0}
        movlhps %xmm1, %xmm0                    {0, 0, b, a}    {b, a, 0, 0}
        ret

note we cannot substitute

        movaps  %xmm0, %xmm1
        xorps   %xmm0, %xmm0
        movlhps %xmm1, %xmm0

with just
    
        movlhps %xmm0, %xmm0
        
because low-order 64 bits of the destination register are not modified,
but instead we could:
                                                xmm0            xmm1
        movss   _a, %xmm1                       {?, ?, ?, ?}    {a, 0, 0, 0}
        movss   _b, %xmm0                       {b, 0, 0, 0}    {a, 0, 0, 0}
        unpcklps %xmm1, %xmm0                   {b, a, 0, 0}    {a, 0, 0, 0}
        shufps  78 /*[1,0,3,2]*/, %xmm0, %xmm0  {0, 0, b, a}    {a, 0, 0, 0}
        ret


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-27 05:49:27
               date|                            |


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

Reply via email to