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

Run:explore-d9924131a4-20261128-105811
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, 103 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 d9924131a4
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       0x0000559929ccdb5b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000559929ccab31 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000559929cce5db
3  libc.so.6 0x00007f36eea45330
4  libc.so.6 0x00007f36eea9ebec pthread_kill + 284
5  libc.so.6 0x00007f36eea4527e gsignal + 30
6  libc.so.6 0x00007f36eea288ff abort + 223
7  libc.so.6 0x00007f36eea2881b
8  libc.so.6 0x00007f36eea3b517
9  llc       0x0000559928337402
10 llc       0x000055992a548b10 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       0x0000559928333f4d
12 llc       0x000055992a5a528f llvm::IRTranslatorImpl::translateRet(llvm::User const&, llvm::MachineIRBuilder&) + 239
13 llc       0x000055992a5bd13d 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       0x000055992a5be12d llvm::IRTranslatorLegacy::runOnMachineFunction(llvm::MachineFunction&) + 733
15 llc       0x0000559928946891 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
16 llc       0x0000559928ee27f7 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
17 llc       0x0000559928eead12 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
18 llc       0x0000559928ee35a0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
19 llc       0x000055992813d8c9
20 llc       0x000055992813aa53 main + 1747
21 libc.so.6 0x00007f36eea2a1ca
22 libc.so.6 0x00007f36eea2a28b __libc_start_main + 139
23 llc       0x0000559928139b65 _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.aee9276b32.ll (mutant of fastcc-bf16.ll)-mtriple=riscv32 -target-abi=ilp32 -verify-machineinstrs -mattr=+zfbfmin -O0 -code-model=medium

Generated 2026-11-29 14:49 UTC.