I fixed x86 tail calls in LLVM
https://github.com/llvm/llvm-project/pull/168956
Tail calls passing structs had been broken since forever, and it made me mad enough to write C++.
It's a little tricky because sometimes it requires shuffling values around on the stack and you have to make sure to not overwrite values you'll need later. This was fixed in the arm backend a while ago, and I was able to port that approach to the x86 backend. The plan is to include this in LLVM 22.
Together with some other changes it seems like guaranteed tail calls in rust might actually, finally happen.