[PATCH v8 2/3] String: Add hidden defs for __memcmpeq() to enable internal usage
H.J. Lu
hjl.tools@gmail.com
Fri Oct 22 00:40:33 GMT 2021
On Thu, Oct 21, 2021 at 5:19 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Thu, 21 Oct 2021, Noah Goldstein via Libc-alpha wrote:
>
> > > > The compiler knows other semantics of memcmp (it might sometimes expand a
> > > > memcmp with a small fixed size inline, for example). So changing to a
> > > > direct call to __memcmpeq by hand isn't even always an optimization;
> > Will compilers not implement the same optimization for __memcmpeq?
>
> Why should they? It's intended as an ABI, not an API - that is, an
> alternative assembler name the compiler name generate calls to, not a
> function for which it should find calls in its input.
>
Compiler builtin optimization doesn't work well for glibc:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67220
--
H.J.
More information about the Libc-alpha
mailing list