https://github.com/SamTebbs33 approved this pull request. Nice one. I wonder if a test to make sure your current test actually gets tail-predicated would be good, or if that's outside the scope of this patch. https://github.com/llvm/llvm-project/pull/69709