[PATCH] D127461: [SelectionDAG] Use __memcmpeq to replace bcmp and bool usage memcmp

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 14:23:57 PDT 2022


MaskRay added a comment.

> [SelectionDAG]

I feel that `[SimplifyLibCalls] ` is more appropriate. The main change is there.

> -fglibc-version=ver

This seems fine to me. Agree with efriedma that every platform adding someway looks bad, but that is the current state.
I can see that a generic glibc version option can be useful. E.g. we had a workaround for exp10* in f5689f830414bdb60ce56ff37c182b6cebcedd0b.
Some `Triple.isOSLinux()` uses be better reword using a glibc version.
I think the hard thing is to decide a default value, which isn't clear in llvm-project's build and target requirement.

(From https://reviews.llvm.org/D56593#3586673)

> -fbuiltin-__memcmpeq

https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html says "There is no corresponding -fbuiltin-function option".

If Clang decides to add this, it looks good and I am happy to implement it :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127461



More information about the llvm-commits mailing list