[PATCH] D56593: [SelectionDAG][RFC] Allow the user to specify a memeq function (v5).

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 08:32:22 PDT 2022


courbet added a comment.

In D56593#3585621 <https://reviews.llvm.org/D56593#3585621>, @goldstein.w.n wrote:

> In D56593#3584237 <https://reviews.llvm.org/D56593#3584237>, @courbet wrote:
>
>> In D56593#3582442 <https://reviews.llvm.org/D56593#3582442>, @xbolva00 wrote:
>>
>>> @courbet Any followup as we have got "'__memcmpeq" ?
>>
>> I was under the impression that `bcmp` was redirecting to `__memcmpeq` when the latter was available. Isn't that sufficient ?
>
> It is not.
>
> This was rejected for the same reasons the `bcmp` optimizations where rejected. `bcmp` is not standardized and since
> glibc has been maintaining it as a true `memcmp` (that can be used for sort), there is not reason for users to not have
> begun to rely on that behavior.

This is kinda sad, but OK.

>> I don't think we can call `__memcmpeq` directly because this will not work on older versions of the glibc (as discussed above).
>
> I have a patch here: https://reviews.llvm.org/D127461

I personally don't have a strong opinion, but I know that during the initial RFC some people were against adding a backend flag for this (https://reviews.llvm.org/D56248): see the discussion here: https://lists.llvm.org/pipermail/llvm-dev/2019-January/128827.html.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56593



More information about the llvm-commits mailing list