It's not just memcpy()!
First of all, there are two variants of memcpy(): one that copies in increasing addresses, and one that copies in decreasing addresses. I call these memcpy_inc() and memcpy_dec(), respectively; with memcpy() itself being arbitrarily either one.
memmove(dst, src, len) uses memcpy_inc() if dst < src, and memcpy_dec() if dst > src.
memrepeat(dest, off, totallen) uses memcpy_inc() with src = dest, dst = dest + off, and len = totallen - off. It speeds up array initialization significantly, works for any array members including structures, and in several old Fortran-C comparisons (Fortran using something similar internally to initialize arrays, and standard C not having one) was the reason of Fortran being faster than C. (Fortran as a language is easier to optimize, and array slicing allows some very powerful techniques, but all those can be implemented in C; just is not in the standard C library. When I started writing MD code, I often had to explain why I was using C and not Fortran, and Fortran users weren't happy when I showed how I could do everything at least as efficiently as anyones Fortran code could. I seem to have a knack of offending people by showing them facts they really don't like.)
Then we have very often used comparison functions, that are very similar to copies, except they read both sources, and abort at first difference.
This includes memcmp(), memmem(), strcmp(), strncmp(), strstr(), and (rarely implemented strnstr()).
Then we have many of the string functions, that use a single character or a small lookup table to determine when to return.
This includes strspn(), strcspn(), strchr(), strrchr(), memchr(), strsep(), strpbrk().
In assembly, these functions have the same base loop, and really only differ in the loop condition. The lookup table based ones do an extra load from the lookup table (using a byte from the string as the offset to the table) and test a bit in the result (since in the lookup table, each entry contains a bit mask, with each bit specifying a class to be checked).
(That said, an instruction to test a bit in a possibly large table by bit index alone – so bits 0,1,2 identify the bit, and bits 3-31 (or whatever the native word size is) the byte offset – is something that is not very often needed, but when needed, might make a significant difference.)
My point earlier was that autoincrement and autodecrement speeds up all these, so much so that the inner loops have no other common code than the autoincrement/decrement load from memory. Looking at ltrace -e str*+mem* output – even for something as simple as the date binary! – shows that these library functions are extremely common; at least as common as memcpy()/memset()/memmove() in typical userspace application code, so picking an approach that makes all these more efficient is a valid strategy in my opinion.
Having watched the x86/x86-64 evolve with respect to its block instructions – rep/repz/repnz cmps/ins/lods/movs/outs/scas/stos –, I do not believe optimizing block operations further than address autoincrement and autodecrement is worth the effort. Indeed, for a number of x86 processors, these instructions were far from optimal, until Intel/AMD put some effort in the microcode to make them efficient again.
For a RISC-type instruction set, having an extension to enable byte and full register-wide address autoincrement and autodecrement loads and stores yields most of the possible speedups. Zeroing aligned memory, entire cachelines or pages, is a separate task, and probably something that should be done in cooperation with the memory controller; but only really necessary/useful for general purpose OSes, where privilege separation and avoiding kernel information leaks are important, and often require zeroing memory.
Apologies for any repetition, but this is important. This does have a measurable impact on many common applications – and a significant one on e.g. the standard Python interpreter (CPython). Run an application via the aforementioned ltrace command, but do note that current C compilers open-code many memory copies etc., and this only logs the library calls.