[Bug target/32951] missed memcpy -> movdqa optimization.
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 31 15:58:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list