crash: Assertion failed: (isReg() && "This is not a register operand!"), function getReg, file MachineOperand.h

Run:main-db12fc36f6-20261127-110859
Kind:crash
Category:Assertion failed: (isReg() && "This is not a register operand!"), function getReg, file MachineOperand.h
Occurrences:38 in 10 configs, 6 test files
Snippet from:vsm4k.ll @intrinsic_vsm4k_vi_nxv4i32_i32 via llvm-extract + llvm-reduce
Config:-mtriple=riscv32 -mattr=+v,+zvksed -verify-machineinstrs
Local check:reproduces at db12fc36f6
Compiler Explorer:https://godbolt.org/z/xfETW5n7M (llc-assertions-trunk, checked 2026-10-25 18:43 UTC): G reproduces

Snippet:

define <vscale x 4 x i32> @intrinsic_vsm4k_vi_nxv4i32_i32() {
entry:
  %a = call <vscale x 4 x i32> @llvm.riscv.vsm4k.nxv4i32.i32.i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i32> zeroinitializer, i32 0, i32 0)
  ret <vscale x 4 x i32> %a
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare <vscale x 4 x i32> @llvm.riscv.vsm4k.nxv4i32.i32.i32(<vscale x 4 x i32>, <vscale x 4 x i32>, i32 immarg, i32) #0

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv32 -mattr=+v,+zvksed -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.*1340llc: /root/llvm-project/llvm/include/llvm/CodeGen/MachineOperand.h:376: llvm::Register llvm::MachineOperand::getReg() const: Assertion `isReg() && "This is not a register operand!"' 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=+v,+zvksed -verify-machineinstrs -global-isel=005-

Reproduce:

llc -mtriple=riscv32 -mattr=+v,+zvksed -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+v,+zvksed -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

llc: /home/runner/work/llvm-fuzz/llvm-fuzz/llvm-project/llvm/include/llvm/CodeGen/MachineOperand.h:376: Register llvm::MachineOperand::getReg() const: Assertion `isReg() && "This is not a register operand!"' 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=+v,+zvksed -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 'Legalizer' on function '@intrinsic_vsm4k_vi_nxv4i32_i32'
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       0x000055a3a14bfc1b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x000055a3a14bcbf1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x000055a3a14c069b
3  libc.so.6 0x00007f9b70c45330
4  libc.so.6 0x00007f9b70c9ebec pthread_kill + 284
5  libc.so.6 0x00007f9b70c4527e gsignal + 30
6  libc.so.6 0x00007f9b70c288ff abort + 223
7  libc.so.6 0x00007f9b70c2881b
8  libc.so.6 0x00007f9b70c3b517
9  llc       0x000055a39fb5cb7c
10 llc       0x000055a3a1dcc19c llvm::LegalizerHelper::legalizeInstrStep(llvm::MachineInstr&, llvm::LostDebugLocObserver&) + 220
11 llc       0x000055a3a1dc0539 llvm::legalizeMachineFunction(llvm::MachineFunction&, llvm::LegalizerInfo const&, llvm::ArrayRef<llvm::GISelChangeObserver*>, llvm::LostDebugLocObserver&, llvm::MachineIRBuilder&, llvm::LibcallLoweringInfo const*, llvm::GISelValueTracking*) + 1753
12 llc       0x000055a3a1dc2280
13 llc       0x000055a3a1dc1ea2 llvm::LegalizerLegacy::runOnMachineFunction(llvm::MachineFunction&) + 242
14 llc       0x000055a3a0138761 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc       0x000055a3a06d4a77 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc       0x000055a3a06dcf92 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc       0x000055a3a06d5820 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc       0x000055a39f92f689
19 llc       0x000055a39f92c813 main + 1747
20 libc.so.6 0x00007f9b70c2a1ca
21 libc.so.6 0x00007f9b70c2a28b __libc_start_main + 139
22 llc       0x000055a39f92b925 _start + 37

Occurrences (38) (first 15):

InputFunctionConfig
fixed-vectors-xsfvcp-x.ll-mtriple=riscv32 -mattr=+v,+zvfh,+xsfvcp -verify-machineinstrs
fixed-vectors-xsfvcp-x.ll-mtriple=riscv64 -mattr=+v,+zvfh,+xsfvcp -verify-machineinstrs
vaeskf1.ll-mtriple=riscv32 -mattr=+v,+zvkned -verify-machineinstrs
vaeskf1.ll-mtriple=riscv64 -mattr=+v,+zvkned -verify-machineinstrs
vaeskf2.ll-mtriple=riscv32 -mattr=+v,+zvkned -verify-machineinstrs
vaeskf2.ll-mtriple=riscv64 -mattr=+v,+zvkned -verify-machineinstrs
vsm3c.ll-mtriple=riscv32 -mattr=+v,+zvksh -verify-machineinstrs
vsm3c.ll-mtriple=riscv64 -mattr=+v,+zvksh -verify-machineinstrs
vsm4k.ll-mtriple=riscv32 -mattr=+v,+zvksed -verify-machineinstrs
vsm4k.ll-mtriple=riscv64 -mattr=+v,+zvksed -verify-machineinstrs
xsfvcp-x.ll-mtriple=riscv32 -mattr=+v,+xsfvcp,+zvfh -verify-machineinstrs
xsfvcp-x.ll-mtriple=riscv64 -mattr=+v,+xsfvcp,+zvfh -verify-machineinstrs
fixed-vectors-xsfvcp-x.301a5c492a.ll (mutant of fixed-vectors-xsfvcp-x.ll)-mtriple=riscv32 -mattr=+v,+zvfh,+xsfvcp -verify-machineinstrs
fixed-vectors-xsfvcp-x.424d36caae.ll (mutant of fixed-vectors-xsfvcp-x.ll)-mtriple=riscv64 -mattr=+v,+zvfh,+xsfvcp -verify-machineinstrs
fixed-vectors-xsfvcp-x.81db014437.ll (mutant of fixed-vectors-xsfvcp-x.ll)-mtriple=riscv32 -mattr=+v,+zvfh,+xsfvcp -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.