[PATCH] D47214: [InstCombine] Replace bcmp/bcopy with memcmp/memmove

Piotr Padlewski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 29 06:31:36 PDT 2018


Prazek added a comment.

In https://reviews.llvm.org/D47214#1109007, @xbolva00 wrote:

> And two facts..
>
> 1. LLVM already replaces bzero with memset
> 2. There are many source codes related to networking which uses bcopy, bcmp.
>
>   So I dont think this patch is totally useless.
>
>   Maybe @Prazek can do review of this patch for me?


The code and tests look good, but I have the same opinion as others - we can't add new transforms without them providing a sufficient value compared to maintaining cost.
Maybe try to come up with at least a microbenchmark that would show the gain. You can also benchmark LNT test suite and see if there is any improvement, but the microbenchmark should be easier.


Repository:
  rL LLVM

https://reviews.llvm.org/D47214





More information about the llvm-commits mailing list