crash: Assertion failed: (Bits != 0 && "Cannot print this instruction."), function printInstruction, file RISCVGenAsmWriter.inc

Run:explore-04ca53e65f-20261014-114124
Kind:crash
Category:Assertion failed: (Bits != 0 && "Cannot print this instruction."), function printInstruction, file RISCVGenAsmWriter.inc
Occurrences:11 in 2 configs, 2 test files
Snippet from:stack-protector-target.ll @func via llvm-extract + llvm-reduce
Config:-mtriple=riscv64-linux
Local check:reproduces at 04ca53e65f
Compiler Explorer:https://godbolt.org/z/3ET67dxe6 (llc-assertions-trunk, checked 2026-10-14 11:03 UTC): G reproduces

Snippet:

; Function Attrs: sspreq
define void @func() #0 {
  ret void
}

attributes #0 = { sspreq }

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv64-linux -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.*1340llc: /root/build/lib/Target/RISCV/RISCVGenAsmWriter.inc:53883: void llvm::RISCVInstPrinter::printInstruction(const llvm::MCInst*, uint64_t, const llvm::MCSubtargetInfo&, llvm::raw_ostream&): Assertion `Bits != 0 && "Cannot print this 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=riscv64-linux -global-isel=0012-

Reproduce:

llc -mtriple=riscv64-linux -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64-linux -global-isel=0 snippet.ll -o -

Local llc output:

llc: /home/runner/work/llvm-fuzz/llvm-fuzz/llvm-project/build/lib/Target/RISCV/RISCVGenAsmWriter.inc:53883: void llvm::RISCVInstPrinter::printInstruction(const MCInst *, uint64_t, const MCSubtargetInfo &, raw_ostream &): Assertion `Bits != 0 && "Cannot print this 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=riscv64-linux -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* -o -
1.	Running pass 'Function Pass Manager' on module '<stdin>'.
2.	Running pass 'RISC-V Assembly Printer' on function '@func'
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       0x000056330d89379b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x000056330d890641 llvm::sys::RunSignalHandlers() + 369
2  llc       0x000056330d89421b
3  libc.so.6 0x00007fdcee445330
4  libc.so.6 0x00007fdcee49ec0c pthread_kill + 284
5  libc.so.6 0x00007fdcee44527e gsignal + 30
6  libc.so.6 0x00007fdcee4288ff abort + 223
7  libc.so.6 0x00007fdcee42881b
8  libc.so.6 0x00007fdcee43b517
9  llc       0x000056330e64994e
10 llc       0x000056330e64bc99
11 llc       0x000056330d8b0ae5 llvm::MCTargetStreamer::prettyPrintAsm(llvm::MCInstPrinter&, unsigned long, llvm::MCInst const&, llvm::MCSubtargetInfo const&, llvm::raw_ostream&) + 37
12 llc       0x000056330d92645c
13 llc       0x000056330eb45e0a
14 llc       0x000056330eb541c7 llvm::AsmPrinter::emitFunctionBody() + 4855
15 llc       0x000056330eb40c17
16 llc       0x000056330de5ad2d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 653
17 llc       0x000056330dbeacd7 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
18 llc       0x000056330dbf31d2 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
19 llc       0x000056330dbeba80 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
20 llc       0x000056330d89adf8 llcMain + 12056
21 llc       0x000056330d7d662f main + 63
22 libc.so.6 0x00007fdcee42a1ca
23 libc.so.6 0x00007fdcee42a28b __libc_start_main + 139
24 llc       0x000056330d7d6525 _start + 37

Occurrences (11):

InputFunctionConfig
stack-guard-global.ll-mtriple=riscv64 -verify-machineinstrs
stack-protector-target.ll-mtriple=riscv64-linux
stack-guard-global.705b9b3551.ll (mutant of stack-guard-global.ll)-mtriple=riscv64 -verify-machineinstrs
stack-guard-global.a255c2d517.ll (mutant of stack-guard-global.ll)-mtriple=riscv64 -verify-machineinstrs
stack-guard-global.b665a770c1.ll (mutant of stack-guard-global.ll)-mtriple=riscv64 -verify-machineinstrs
stack-guard-global.ca0bec1c98.ll (mutant of stack-guard-global.ll)-mtriple=riscv64 -verify-machineinstrs
stack-guard-global.ec82c9de94.ll (mutant of stack-guard-global.ll)-mtriple=riscv64 -verify-machineinstrs
stack-protector-target.31b8402ef3.ll (mutant of stack-protector-target.ll)-mtriple=riscv64-linux
stack-protector-target.39d811b684.ll (mutant of stack-protector-target.ll)-mtriple=riscv64-linux
stack-protector-target.96438be234.ll (mutant of stack-protector-target.ll)-mtriple=riscv64-linux
stack-protector-target.98a81a6060.ll (mutant of stack-protector-target.ll)-mtriple=riscv64-linux

Generated 2026-10-15 08:05 UTC.