This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve i?86/x86-64 movmem (PR target/21329)


Jakub Jelinek <jakub@redhat.com> writes:

> Hi!
>
> For very small move sizes, say movl $2, %ecx; rep; movsl,
> doing instead movsl; movsl; is both shorter and faster (and decreases
> register preasure).

Actually movl ... ; movl ... would be even faster for very small
N. movsl has  few cycles setup cost, which movl is ideally 1 cycle.
I believe that is true on the P4 too.
However movsl is probably smaller, so -Os might prefer that.

-Andi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]