AviadCo wrote: @ftynse I prefer to land it as `func` transform. If you wanna guide me about to deal with the `ReturnOp` creation and make the utils function working `FunctionOpInterface` it is also works for me. https://github.com/llvm/llvm-project/pull/143381