This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/56199] New: strcpy/strcat builtins generates suboptimal code.
- From: "neleai at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Feb 2013 08:40:55 +0000
- Subject: [Bug target/56199] New: strcpy/strcat builtins generates suboptimal code.
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56199
Bug #: 56199
Summary: strcpy/strcat builtins generates suboptimal code.
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: neleai@seznam.cz
Current strcpy/strcat generates code in form
movabsq $7954893459765158241, %r11
movq %r11,(%rax)
...
Which is slower than copying string from memory using
movq (%rdx),%r11
movq %r11,(%rax)
...
Attached benchmark is 50% faster on sandy bridge for 70 byte string.
Note that icc also translates strcpy into this form(but not strcat for some
reason.)