Clang introduced `__builtin_memcpy_inline` (https://reviews.llvm.org/D73543) in 2020 and `__builtin_memset_inline` (https://reviews.llvm.org/D126903) in 2022. The two builtin functions expand memcpy/memset and guarantee that no external functions are called. [1] Past GCC discussion: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/609138.html ("[RFC] Introduce -finline-memset-loops"). [1]: There are some unhandled cases due to re-combining like https://github.com/llvm/llvm-project/issues/56876
I think these builtins are a bad idea.
Also there is no definition of what a compile time constant is. The option supports non constant cases too.