IIRC, there are passes that also detect memcpy-&quot;equivalent&quot; loops and replace them with the builtin to memcpy (mostly to get the vectorization benefit). And of course there&#x27;s SimplifyLibCalls (or whatever it&#x27;s named) that undoes this or any other &quot;you called a standard library function we know how to inline in this case&quot;.