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: unassig...@gcc.gnu.org

        ReportedBy: nel...@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.)

Reply via email to