http://llvm.org/bugs/show_bug.cgi?id=21541
Bug ID: 21541
Summary: poor codegen for unaligned fixed-size memcpy/memmove
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
void copy32byte(void *pDst, const void *pSrc) {
__builtin_memmove(pDst, pSrc, 32);
}
clang++ -O3 -march=btver2 -c testcopy.cpp -o test.o
generates:
__Z10copy32bytePvPKv:
0000000000000000 pushq %rbp
0000000000000001 movq %rsp, %rbp
0000000000000004 movq (%rsi), %rax
0000000000000007 movq 0x8(%rsi), %rcx
000000000000000b movq 0x10(%rsi), %rdx
000000000000000f movq 0x18(%rsi), %rsi
0000000000000013 movq %rsi, 0x18(%rdi)
0000000000000017 movq %rdx, 0x10(%rdi)
000000000000001b movq %rcx, 0x8(%rdi)
000000000000001f movq %rax, (%rdi)
0000000000000022 popq %rbp
0000000000000023 retq
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs