[PATCH] D115602: [X86] Memset is lowered to rep stos if MinSize is present

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 16 00:16:40 PST 2021


pengfei added a comment.

In D115602#3195463 <https://reviews.llvm.org/D115602#3195463>, @spatel wrote:

> I don't remember seeing this part of x86 codegen before, so adding some more reviewers. I'm also not sure what is recommended as the best perf x86 asm on recent CPUs. Should we be using this for "optsize" too?

Neither do I. I saw Clang only has the builtin support `__builtin_memcpy_inline` by D73543 <https://reviews.llvm.org/D73543>. But GCC has the tuning code: https://github.com/gcc-mirror/gcc/commit/a32452a5442cd05040af53787af0d8b537ac77a6
Like the descriptions in GCC patch, this is not all win solution. But for minsize and optsize, this should be good to go. https://godbolt.org/z/4r8zTqfhY


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115602/new/

https://reviews.llvm.org/D115602



More information about the llvm-commits mailing list