Artem-B wrote: This sounds like it may be useful outside of AMDGPU back-end. @jhuber6 this is something that may come handy for implementing general library functions. https://github.com/llvm/llvm-project/pull/74737