[llvm] [RISCV] Fix musttail with indirect arguments by forwarding incoming pointers (PR #185094)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 19 04:36:48 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 173014 tests passed
* 3210 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### LLVM
<details>
<summary>LLVM.CodeGen/RISCV/musttail-indirect-args.ll</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=riscv32 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/RISCV/musttail-indirect-args.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/RISCV/musttail-indirect-args.ll --check-prefix=RV32
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=riscv32 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/RISCV/musttail-indirect-args.ll -o -
# .---command stderr------------
# | llc: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp:24833: virtual SDValue llvm::RISCVTargetLowering::LowerCall(CallLoweringInfo &, SmallVectorImpl<SDValue> &) const: Assertion `!IsTailCall && "Tail call not allowed if stack is used " "for passing parameters"' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=riscv32 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/RISCV/musttail-indirect-args.ll -o -
# | 1.	Running pass 'Function Pass Manager' on module '/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/RISCV/musttail-indirect-args.ll'.
# | 2.	Running pass 'RISC-V DAG->DAG Pattern Instruction Selection' on function '@caller_musttail_nine_indirect'
# |  #0 0x000000000863ff98 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:13
# |  #1 0x000000000863cf01 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# |  #2 0x0000000008640db1 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:448:38
# |  #3 0x00007aa289ac5330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# |  #4 0x00007aa289b1eb2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# |  #5 0x00007aa289ac527e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# |  #6 0x00007aa289aa88ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# |  #7 0x00007aa289aa881b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
# |  #8 0x00007aa289abb517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
# |  #9 0x00000000062cf0b4 llvm::RISCVTargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&, llvm::SmallVectorImpl<llvm::SDValue>&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp:24831:7
# | #10 0x0000000008346058 llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:11530:13
# | #11 0x000000000836a676 llvm::SelectionDAGBuilder::lowerInvokable(llvm::TargetLowering::CallLoweringInfo&, llvm::BasicBlock const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:0:44
# | #12 0x000000000834f812 getNode /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:161:36
# | #13 0x000000000834f812 llvm::SelectionDAGBuilder::LowerCallTo(llvm::CallBase const&, llvm::SDValue, bool, bool, llvm::BasicBlock const*, llvm::TargetLowering::PtrAuthInfo const*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:9258:20
# | #14 0x0000000008336d64 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:9855:1
# | #15 0x0000000008328a96 getValueID /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/IR/Value.h:544:12
# | #16 0x0000000008328a96 getOpcode /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/IR/Instruction.h:343:39
# | #17 0x0000000008328a96 isTerminator /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/IR/Instruction.h:346:51
# | #18 0x0000000008328a96 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1394:10
# | #19 0x0000000008406345 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void, true, llvm::BasicBlock>, false, true>, llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void, true, llvm::BasicBlock>, false, true>, bool&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:0:12
# | #20 0x00000000084059c3 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1692:8
# | #21 0x0000000008402ab1 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:660:22
# | #22 0x0000000008400180 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:401:20
# | #23 0x00000000072ec163 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:10
# | #24 0x000000000785dd08 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:0:27
# | #25 0x00000000078657b2 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1444:13
# | #26 0x000000000785e77b runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1513:27
# | #27 0x000000000785e77b llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:531:44
# | #28 0x0000000004fdfcbb compileModule(char**, llvm::SmallVectorImpl<llvm::PassPlugin>&, llvm::LLVMContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:882:17
# | #29 0x0000000004fdcc03 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:460:13
# | #30 0x00007aa289aaa1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #31 0x00007aa289aaa28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #32 0x0000000004fd8725 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x4fd8725)
# `-----------------------------
# error: command failed with exit status: -6
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/RISCV/musttail-indirect-args.ll --check-prefix=RV32
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/RISCV/musttail-indirect-args.ll --check-prefix=RV32
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/185094


More information about the llvm-commits mailing list