public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/19530] New: MMX load intrinsic produces SSE superflus instructions (movlps)
@ 2005-01-19 14:56 guardia at sympatico dot ca
  2005-01-19 14:59 ` [Bug regression/19530] " guardia at sympatico dot ca
                   ` (30 more replies)
  0 siblings, 31 replies; 32+ messages in thread
From: guardia at sympatico dot ca @ 2005-01-19 14:56 UTC (permalink / raw)
  To: gcc-bugs

When I compile this code :
#include <mmintrin.h>
__m64 moo(int i) {
    __m64 tmp = _mm_cvtsi32_si64(i);
   return tmp;
}
With (GCC) 4.0.0 20050116 like so:
   gcc -O3 -S -mmmx moo.c
I get this (without the function pop/push etc)
	movd	12(%ebp), %mm0
	movq	%mm0, (%eax)
However, if I use the -msse flag instead of -mmmx, I get this:
	movd	12(%ebp), %mm0
	movq	%mm0, -8(%ebp)
	movlps	-8(%ebp), %xmm1
	movlps	%xmm1, (%eax)

gcc 3.4.2 does not display this behavior. I didn't get the chance to test it on
my Linux installation yet, but I'm pretty sure it's going to give the same
results.. I didn't use any special flags configuring or building gcc (just
../gcc-4.0-20050116/configure --enable-languages=c,c++ , and make bootstrap)
With -O0 flag instead of -O3, we see that it seems that gcc replaced some movq's
by movlps's (why??) and they do not get cancelled out during optimization..

I will attach the .i file generated by "gcc -O3 -S -msse moo.c".


I also tried a "direct conversion":
__m64 tmp = (__m64) (long long) i;
But I get a compiler error:
   internal compiler error: in convert_move, at expr.c:367

-- 
           Summary: MMX load intrinsic produces SSE superflus instructions
                    (movlps)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: guardia at sympatico dot ca
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-mingw32
  GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32


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


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2005-06-22 23:00 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-19 14:56 [Bug regression/19530] New: MMX load intrinsic produces SSE superflus instructions (movlps) guardia at sympatico dot ca
2005-01-19 14:59 ` [Bug regression/19530] " guardia at sympatico dot ca
2005-01-19 15:02 ` pinskia at gcc dot gnu dot org
2005-01-19 15:03 ` [Bug target/19530] " pinskia at gcc dot gnu dot org
2005-01-19 15:07 ` pinskia at gcc dot gnu dot org
2005-01-20  2:27 ` pinskia at gcc dot gnu dot org
2005-01-20 14:01 ` [Bug target/19530] MMX load intrinsic produces SSE superfluous " bangerth at dealii dot org
2005-01-20 18:34 ` cvs-commit at gcc dot gnu dot org
2005-01-20 18:44 ` rth at gcc dot gnu dot org
2005-01-20 18:44 ` rth at gcc dot gnu dot org
2005-01-20 18:45 ` pinskia at gcc dot gnu dot org
2005-01-24 18:09 ` guardia at sympatico dot ca
2005-01-26 15:47 ` rth at gcc dot gnu dot org
2005-01-26 18:38 ` rth at gcc dot gnu dot org
2005-01-26 18:40 ` rth at gcc dot gnu dot org
2005-01-26 23:51 ` guardia at sympatico dot ca
2005-01-27  0:00 ` guardia at sympatico dot ca
2005-01-27  0:08 ` guardia at sympatico dot ca
2005-01-27  0:12 ` rth at gcc dot gnu dot org
2005-01-27  2:30 ` guardia at sympatico dot ca
2005-01-27  3:53 ` rth at gcc dot gnu dot org
2005-01-27  3:55 ` rth at gcc dot gnu dot org
2005-01-27  6:19 ` guardia at sympatico dot ca
2005-01-27 22:56 ` guardia at sympatico dot ca
2005-01-29  4:47 ` guardia at sympatico dot ca
2005-01-29 19:21 ` guardia at sympatico dot ca
2005-06-21 11:18 ` steven at gcc dot gnu dot org
2005-06-21 13:26 ` guardia at sympatico dot ca
2005-06-22  7:02 ` uros at kss-loka dot si
2005-06-22 22:01 ` guardia at sympatico dot ca
2005-06-22 22:18 ` pinskia at gcc dot gnu dot org
2005-06-22 23:00 ` guardia at sympatico dot ca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).