[all-commits] [llvm/llvm-project] 6a8165: [RISCV] improve `musttail` support (#170547)

Folkert de Vries via All-commits all-commits at lists.llvm.org
Wed Feb 11 08:28:14 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a81656f7d729615c296e5da774e78ad5b21a558
      https://github.com/llvm/llvm-project/commit/6a81656f7d729615c296e5da774e78ad5b21a558
  Author: Folkert de Vries <folkert at folkertdev.nl>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h
    M llvm/test/CodeGen/RISCV/musttail-call.ll
    A llvm/test/CodeGen/RISCV/musttail.ll
    M llvm/test/CodeGen/RISCV/tail-calls.ll

  Log Message:
  -----------
  [RISCV] improve `musttail` support (#170547)

Basically https://github.com/llvm/llvm-project/pull/168506 but for
riscv, so to be clear the hard work here is @heiher 's. I figured we may
as well get some extra eyeballs on this from riscv too.

Previously the riscv backend could not handle `musttail` calls with more
arguments than fit in registers, or any explicit `byval` or `sret`
parameters/return values. Those have now been implemented.

This is part of my push to get more LLVM backends to support `byval` and
`sret` parameters so that rust can stabilize guaranteed tail call
support. See also:

- https://github.com/llvm/llvm-project/pull/168956
- https://github.com/rust-lang/rust/issues/148748

---------

Co-authored-by: WANG Rui <wangrui at loongson.cn>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list