crash: Assertion failed: (MI->getOpcode() == RISCV::QC_C_MILEAVERET && "Unexpected QCI Interrupt Return Instruction"), function restoreCalleeSavedRegisters, file RISCVFrameLowering.cpp

Run:main-db12fc36f6-20261127-110859
Kind:crash
Category:Assertion failed: (MI->getOpcode() == RISCV::QC_C_MILEAVERET && "Unexpected QCI Interrupt Return Instruction"), function restoreCalleeSavedRegisters, file RISCVFrameLowering.cpp NEW M
Occurrences:8 in 2 configs, 1 test files
Snippet from:qci-interrupt-zilsd.c64e08e3aa.ll (mutant of qci-interrupt-zilsd.ll) @test_nest_empty via llvm-extract
Config:-mtriple=riscv32 -mattr=+xqciint,+zilsd,+zclsd,+c -verify-machineinstrs
Local check:reproduces at db12fc36f6
Compiler Explorer:https://godbolt.org/z/vzrbcrYx6 (llc-assertions-trunk, checked 2026-11-27 11:50 UTC): G reproduces

Snippet:

@G = external global float

define void @test_nest_empty() #0 {
  %LGV = load float, ptr @G, align 4
  %C = fcmp ogt float %LGV, 1.000000e+00
  store i1 %C, ptr poison, align 1
  ret void
}

attributes #0 = { "interrupt"="qci-nest" }

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv32 -mattr=+xqciint,+zilsd,+zclsd,+c -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.*1340llc: /root/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:2753: virtual bool llvm::RISCVFrameLowering::restoreCalleeSavedRegisters(llvm::MachineBasicBlock&, llvm::MachineBasicBlock::iterator, llvm::MutableArrayRef<llvm::CalleeSavedInfo>, const llvm::TargetRegisterInfo*) const: Assertion `MI->getOpcode() == RISCV::QC_C_MILEAVERET && "Unexpected QCI Interrupt Return Instruction"' 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=+xqciint,+zilsd,+zclsd,+c -verify-machineinstrs -global-isel=0024-

Reproduce:

llc -mtriple=riscv32 -mattr=+xqciint,+zilsd,+zclsd,+c -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+xqciint,+zilsd,+zclsd,+c -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/RISCVFrameLowering.cpp:2929: virtual bool llvm::RISCVFrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &, MachineBasicBlock::iterator, MutableArrayRef<CalleeSavedInfo>, const TargetRegisterInfo *) const: Assertion `MI->getOpcode() == RISCV::QC_C_MILEAVERET && "Unexpected QCI Interrupt Return Instruction"' 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=+xqciint,+zilsd,+zclsd,+c -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 'Prologue/Epilogue Insertion & Frame Finalization' on function '@test_nest_empty'
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       0x0000563ee6855c1b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000563ee6852bf1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000563ee685669b
3  libc.so.6 0x00007f7de9a45330
4  libc.so.6 0x00007f7de9a9ebec pthread_kill + 284
5  libc.so.6 0x00007f7de9a4527e gsignal + 30
6  libc.so.6 0x00007f7de9a288ff abort + 223
7  libc.so.6 0x00007f7de9a2881b
8  libc.so.6 0x00007f7de9a3b517
9  llc       0x0000563ee4d328ed
10 llc       0x0000563ee56c7764
11 llc       0x0000563ee56cc647
12 llc       0x0000563ee54ce761 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
13 llc       0x0000563ee5a6aa77 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
14 llc       0x0000563ee5a72f92 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
15 llc       0x0000563ee5a6b820 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
16 llc       0x0000563ee4cc5689
17 llc       0x0000563ee4cc2813 main + 1747
18 libc.so.6 0x00007f7de9a2a1ca
19 libc.so.6 0x00007f7de9a2a28b __libc_start_main + 139
20 llc       0x0000563ee4cc1925 _start + 37

Occurrences (8):

InputFunctionConfig
qci-interrupt-zilsd.7c9874e49b.ll (mutant of qci-interrupt-zilsd.ll)-mtriple=riscv32 -mattr=+xqciint,+zilsd -verify-machineinstrs
qci-interrupt-zilsd.7d0d8485d4.ll (mutant of qci-interrupt-zilsd.ll)-mtriple=riscv32 -mattr=+xqciint,+zilsd -verify-machineinstrs
qci-interrupt-zilsd.c64e08e3aa.ll (mutant of qci-interrupt-zilsd.ll)-mtriple=riscv32 -mattr=+xqciint,+zilsd,+zclsd,+c -verify-machineinstrs
qci-interrupt-zilsd.cb0cb7be4d.ll (mutant of qci-interrupt-zilsd.ll)-mtriple=riscv32 -mattr=+xqciint,+zilsd -verify-machineinstrs
qci-interrupt-zilsd.d9b582e3f6.ll (mutant of qci-interrupt-zilsd.ll)-mtriple=riscv32 -mattr=+xqciint,+zilsd,+zclsd,+c -verify-machineinstrs
qci-interrupt-zilsd.db1ba585af.ll (mutant of qci-interrupt-zilsd.ll)-mtriple=riscv32 -mattr=+xqciint,+zilsd,+zclsd,+c -verify-machineinstrs
qci-interrupt-zilsd.db68108735.ll (mutant of qci-interrupt-zilsd.ll)-mtriple=riscv32 -mattr=+xqciint,+zilsd -verify-machineinstrs
qci-interrupt-zilsd.e97e97a17f.ll (mutant of qci-interrupt-zilsd.ll)-mtriple=riscv32 -mattr=+xqciint,+zilsd,+zclsd,+c -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.