This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/32951] missed memcpy -> movdqa optimization.



------- Comment #5 from hjl dot tools at gmail dot com  2008-03-31 15:57 -------
Can you use

[hjl@gnu-6 tmp]$ cat v.c
#include <emmintrin.h>

__m128i load1( char const* buf )
{
  return _mm_loadu_si128 ((__m128i const *) buf);
}

__m128i load2( char const* buf )
{
  return _mm_load_si128 ((__m128i const *) buf);
}
[hjl@gnu-6 tmp]$ /usr/gcc-4.4/bin/gcc -O2 v.c -S 
[hjl@gnu-6 tmp]$ cat v.s
        .file   "v.c"
        .text
        .p2align 4,,15
.globl load2
        .type   load2, @function
load2:
.LFB519:
        movdqa  (%rdi), %xmm0
        ret
.LFE519:
        .size   load2, .-load2
        .p2align 4,,15
.globl load1
        .type   load1, @function
load1:
.LFB518:
        movdqu  (%rdi), %xmm0
        ret
.LFE518:
        .size   load1, .-load1


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]