]> granicus.if.org Git - llvm/commit
[InstCombine] Transform bcopy to memmove
authorDavid Bolvansky <david.bolvansky@gmail.com>
Wed, 2 Oct 2019 22:49:20 +0000 (22:49 +0000)
committerDavid Bolvansky <david.bolvansky@gmail.com>
Wed, 2 Oct 2019 22:49:20 +0000 (22:49 +0000)
commit863bc82a9a116edd09658a0d3c4a964609f053b6
tree602f23b4966f48fac3ee1419252a23fd1cd5ff78
parenta4a6122eaeb9ce339649ce984a5579d55f2c8b03
[InstCombine] Transform bcopy to memmove

bcopy is still widely used mainly for network apps. Sadly, LLVM has no optimizations for bcopy, but there are some for memmove.
Since bcopy == memmove, it is profitable to transform bcopy to memmove and use current optimizations for memmove for free here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373537 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/bcopy.ll [new file with mode: 0644]