crash: Assertion failed: (VAs.size() >= 2 && "Expected at least 2 VAs."), function int, file RISCVCallLowering.cpp

Run:explore-b577f07195-20261129-105236
Kind:crash
Category:Assertion failed: (VAs.size() >= 2 && "Expected at least 2 VAs."), function int, file RISCVCallLowering.cpp
Occurrences:3 in 3 configs, 2 test files, 119 more counted only
Snippet from:fastcc-bf16.ll @callee via llvm-extract
Config:-mtriple=riscv32 -mattr=+zfbfmin -target-abi=ilp32 -verify-machineinstrs
Local check:reproduces at b577f07195
Compiler Explorer:https://godbolt.org/z/W9fr3dGMq (llc-assertions-trunk, checked 2026-10-25 18:43 UTC): G reproduces

Snippet:

; Function Attrs: nounwind
define fastcc bfloat @callee(<32 x bfloat> %A) #0 {
  %B = extractelement <32 x bfloat> %A, i32 0
  ret bfloat %B
}

attributes #0 = { nounwind }

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv32 -mattr=+zfbfmin -target-abi=ilp32 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.*1340llc: /root/llvm-project/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp:117: virtual unsigned int {anonymous}::RISCVOutgoingValueHandler::assignCustomValue(llvm::CallLowering::ArgInfo&, llvm::ArrayRef<llvm::CCValAssign>, std::function<void()>*): Assertion `VAs.size() >= 2 && "Expected at least 2 VAs."' 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:
SelectionDAG (control)-mtriple=riscv32 -mattr=+zfbfmin -target-abi=ilp32 -verify-machineinstrs -global-isel=002-

Reproduce:

llc -mtriple=riscv32 -mattr=+zfbfmin -target-abi=ilp32 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+zfbfmin -target-abi=ilp32 -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

llc: /home/runner/work/llvm-fuzz/llvm-fuzz/llvm-project/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp:122: virtual unsigned int (anonymous namespace)::RISCVOutgoingValueHandler::assignCustomValue(CallLowering::ArgInfo &, ArrayRef<CCValAssign>, std::function<void ()> *): Assertion `VAs.size() >= 2 && "Expected at least 2 VAs."' 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/runner/work/llvm-fuzz/llvm-fuzz/llvm-project/build/bin/llc -mtriple=riscv32 -mattr=+zfbfmin -target-abi=ilp32 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* -o -
1.	Running pass 'Function Pass Manager' on module '<stdin>'.
2.	Running pass 'IRTranslator' on function '@callee'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  llc       0x0000559bf4f029eb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000559bf4eff9c1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000559bf4f0346b
3  libc.so.6 0x00007f0909a45330
4  libc.so.6 0x00007f0909a9ebec pthread_kill + 284
5  libc.so.6 0x00007f0909a4527e gsignal + 30
6  libc.so.6 0x00007f0909a288ff abort + 223
7  libc.so.6 0x00007f0909a2881b
8  libc.so.6 0x00007f0909a3b517
9  llc       0x0000559bf356cc52
10 llc       0x0000559bf577dba0 llvm::CallLowering::handleAssignments(llvm::CallLowering::ValueHandler&, llvm::SmallVectorImpl<llvm::CallLowering::ArgInfo>&, llvm::CCState&, llvm::SmallVectorImpl<llvm::CCValAssign>&, llvm::MachineIRBuilder&, llvm::ArrayRef<llvm::Register>) const + 928
11 llc       0x0000559bf356979d
12 llc       0x0000559bf57da31f llvm::IRTranslatorImpl::translateRet(llvm::User const&, llvm::MachineIRBuilder&) + 239
13 llc       0x0000559bf57f21cd llvm::IRTranslatorImpl::runOnMachineFunction(llvm::MachineFunction&, llvm::function_ref<llvm::GISelCSEInfo* ()>, bool, llvm::function_ref<llvm::AAResults* ()>, llvm::function_ref<llvm::BranchProbabilityInfo* ()>, llvm::function_ref<llvm::AssumptionCache* ()>, llvm::TargetLibraryInfo*, llvm::LibcallLoweringInfo const*, llvm::SSPLayoutInfo*) + 4205
14 llc       0x0000559bf57f31bd llvm::IRTranslatorLegacy::runOnMachineFunction(llvm::MachineFunction&) + 733
15 llc       0x0000559bf3b7c6b1 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
16 llc       0x0000559bf4117b37 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
17 llc       0x0000559bf4120052 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
18 llc       0x0000559bf41188e0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
19 llc       0x0000559bf3373149
20 llc       0x0000559bf33702d3 main + 1747
21 libc.so.6 0x00007f0909a2a1ca
22 libc.so.6 0x00007f0909a2a28b __libc_start_main + 139
23 llc       0x0000559bf336f3e5 _start + 37

Occurrences (3):

InputFunctionConfig
fastcc-bf16.ll-mtriple=riscv32 -mattr=+zfbfmin -target-abi=ilp32 -verify-machineinstrs
inline-asm-bf-constraint-f.ll-mtriple=riscv32 -mattr=+zfbfmin,+zfh -target-abi=ilp32 -verify-machineinstrs
fastcc-bf16.1ab0a7d63f.ll (mutant of fastcc-bf16.ll)-mtriple=riscv32 -target-abi=ilp32 -verify-machineinstrs -mattr=+zfbfmin -O2

Generated 2026-11-29 14:49 UTC.