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

Run:explore-db12fc36f6-20261127-115111
Kind:crash
Category:Assertion failed: (Bits != 0 && "Cannot print this instruction."), function printInstruction, file RISCVGenAsmWriter.inc
Occurrences:3 in 3 configs, 2 test files, 53 more counted only
Snippet from:stack-protector-target.ll @func via llvm-extract
Config:-mtriple=riscv64-linux
Local check:reproduces at db12fc36f6
Compiler Explorer:https://godbolt.org/z/3GKhcfv36 (llc-assertions-trunk, checked 2026-10-25 18:43 UTC): G reproduces

Snippet:

; Function Attrs: nounwind sspreq
define void @func() #0 {
  %1 = alloca i32, align 4
  call void @capture(ptr %1)
  ret void
}

declare void @capture(ptr)

attributes #0 = { nounwind 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=0016-

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:53918: 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       0x0000555f73576c1b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000555f73573bf1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000555f7357769b
3  libc.so.6 0x00007f6226e45330
4  libc.so.6 0x00007f6226e9ebec pthread_kill + 284
5  libc.so.6 0x00007f6226e4527e gsignal + 30
6  libc.so.6 0x00007f6226e288ff abort + 223
7  libc.so.6 0x00007f6226e2881b
8  libc.so.6 0x00007f6226e3b517
9  llc       0x0000555f71c722ae
10 llc       0x0000555f71c74779
11 llc       0x0000555f728f3685 llvm::MCTargetStreamer::prettyPrintAsm(llvm::MCInstPrinter&, unsigned long, llvm::MCInst const&, llvm::MCSubtargetInfo const&, llvm::raw_ostream&) + 37
12 llc       0x0000555f7291469c
13 llc       0x0000555f71a19119
14 llc       0x0000555f71eddca5 llvm::AsmPrinter::emitFunctionBody() + 5733
15 llc       0x0000555f71a13b17
16 llc       0x0000555f721ef761 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
17 llc       0x0000555f7278ba77 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
18 llc       0x0000555f72793f92 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
19 llc       0x0000555f7278c820 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
20 llc       0x0000555f719e6689
21 llc       0x0000555f719e3813 main + 1747
22 libc.so.6 0x00007f6226e2a1ca
23 libc.so.6 0x00007f6226e2a28b __libc_start_main + 139
24 llc       0x0000555f719e2925 _start + 37

Occurrences (3):

InputFunctionConfig
stack-guard-global.ll-mtriple=riscv64 -verify-machineinstrs
stack-protector-target.ll-mtriple=riscv64-linux
stack-guard-global.6f140ca233.ll (mutant of stack-guard-global.ll)-mtriple=riscv64 -verify-machineinstrs -mattr=+zicsr,+zfa -O0 -code-model=medium

Generated 2026-11-29 14:49 UTC.