https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- I think we need __builtin_memchr et al to be usable in constant expressions, because replacing them with hand-written loops would be a step backwards. For uses outside constant expressions we want to go to libc and benefit from the optimization work put into the libc routines.