https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116497

--- Comment #9 from andi at firstfloor dot org ---
On Tue, Aug 27, 2024 at 08:02:53AM +0000, rguenth at gcc dot gnu.org wrote:
> Hmm, why would a tail call need to save extra regs over what the callers 
> caller
> already saved?  We're returning to that after all.

The tail call doesn't need to save anything extra, but the original
function entering the tail call loop needs to, otherwise the tail
calls clobbering stuff would violate assumptions of its caller.

So the transformation is

original_caller -> add no_caller_saved_registers
tailcall loop functions -> add no_callee_saved_registers

Reply via email to