]> granicus.if.org Git - llvm/commit
X86 memcpy: use REPMOVSB instead of REPMOVS{Q,D,W} for inline copies
authorClement Courbet <courbet@google.com>
Fri, 21 Apr 2017 09:20:39 +0000 (09:20 +0000)
committerClement Courbet <courbet@google.com>
Fri, 21 Apr 2017 09:20:39 +0000 (09:20 +0000)
commit3b883555dda94c6c92b270a0a87692b251b057fd
treec2d1df0c2fac09db5a82d1943e74941f16d751ec
parent102d78ca396966bcbb988724d7555e02c6d20fff
X86 memcpy: use REPMOVSB instead of REPMOVS{Q,D,W} for inline copies
when the subtarget has fast strings.

This has two advantages:
  - Speed is improved. For example, on Haswell thoughput improvements increase
    linearly with size from 256 to 512 bytes, after which they plateau:
    (e.g. 1% for 260 bytes, 25% for 400 bytes, 40% for 508 bytes).
  - Code is much smaller (no need to handle boundaries).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300957 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86.td
lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86SelectionDAGInfo.cpp
lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h
test/CodeGen/X86/memcpy-struct-by-value.ll [new file with mode: 0644]