https://github.com/vporpo commented: I think I figured out what the problem was. I have updated the comments. To summarize, just drop `ret void` and change the code to InsertBefore UI, and the test should pass. https://github.com/llvm/llvm-project/pull/101856