https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70055
--- Comment #9 from Wilco <wdijkstr at arm dot com> --- (In reply to H.J. Lu from comment #8) > Inlining mempcpy uses a callee-saved register: > ... > > Not inlining mempcpy is preferred. If codesize is the only thing that matters... The cost is not at the caller side but in requiring a separate mempcpy function which causes extra I-cache misses. The only case where mempcpy makes sense is if you can use a shared implementation with zero overhead to memcpy. Btw those tests do want to use memcpy anyway, but you could use (mempcpy) to avoid any unwanted header substitution to ensure the test passes.