http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53907
Bug #: 53907 Summary: gcc uses unaligned load when aligned load was requested Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: nel...@seznam.cz A gcc 4.7 and 4.8 emit movdqu instead movdqa for aligned load instrinc. #include <emmintrin.h> __m128i x(char *s){ __m128i sz,z,mvec; s-=((unsigned long) s)%16; sz=_mm_load_si128(s); return sz; } Output of gcc -O3 -S follows .file "int.c" .text .p2align 4,,15 .globl x .type x, @function x: .LFB517: .cfi_startproc movq %rdi, %rax andl $15, %eax negq %rax movdqu (%rdi,%rax), %xmm0 ret .cfi_endproc .LFE517: .size x, .-x .ident "GCC: (Debian 20120704-1) 4.8.0 20120704 (experimental) [trunk revision 189247]" .section .note.GNU-stack,"",@progbits