alexey-bataev wrote: I would keep the original functions. Maybe, do some early checks for index 0 and later checks for index 1, but still keep the existing abstractions. https://github.com/llvm/llvm-project/pull/148672