Clang and some middle-end optimizations may need these helper functions. This can reduce some duplications.