[Bug target/19530] MMX load intrinsic produces SSE superfluous instructions (movlps)

guardia at sympatico dot ca gcc-bugzilla@gcc.gnu.org
Mon Jan 24 18:09:00 GMT 2005


------- Additional Comments From guardia at sympatico dot ca  2005-01-24 18:09 -------
MMX intrinsics don't seem to be a standard (?), but I'm under the impression
that _mm_cvtsi32_si64 is supposed to generate MMX code. I just tested With (GCC)
4.0.0 20050123, and with -mmmx flag, the result is still the same, with the
-msse flag I now get :

        movss   12(%ebp), %xmm0
        movlps  %xmm0, (%eax)

Which is correct, but what I'm trying to get is a MOVD so I don't have to fish
back into memory to use the integer I wanted to load in an mmx register.

Or is there another way to generate a MOVD?

Also,  _mm_unpacklo_pi8 (check moo2.i) still generates superfluous movlps :
        punpcklbw       %mm0, %mm0
        movl    %esp, %ebp
        subl    $8, %esp
        movl    8(%ebp), %eax
        movq    %mm0, -8(%ebp)
        movlps  -8(%ebp), %xmm1
        movlps  %xmm1, (%eax)

I guess any MMX intrinsics that makes use of the (__m64) cast conversion will
suffer from the same problem..... I think the fix to all these problems would be
to prevent the register allocator from using SSE registers when compiling MMX
intrinsics.. ?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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



More information about the Gcc-bugs mailing list