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

Run:main-d9924131a4-20261128-102057
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 d9924131a4
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       0x0000555aeb7ffb5b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000555aeb7fcb31 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000555aeb8005db
3  libc.so.6 0x00007f9249a45330
4  libc.so.6 0x00007f9249a9ebec pthread_kill + 284
5  libc.so.6 0x00007f9249a4527e gsignal + 30
6  libc.so.6 0x00007f9249a288ff abort + 223
7  libc.so.6 0x00007f9249a2881b
8  libc.so.6 0x00007f9249a3b517
9  llc       0x0000555ae9e9cdec
10 llc       0x0000555aec10bbac llvm::LegalizerHelper::legalizeInstrStep(llvm::MachineInstr&, llvm::LostDebugLocObserver&) + 220
11 llc       0x0000555aec0fff49 llvm::legalizeMachineFunction(llvm::MachineFunction&, llvm::LegalizerInfo const&, llvm::ArrayRef<llvm::GISelChangeObserver*>, llvm::LostDebugLocObserver&, llvm::MachineIRBuilder&, llvm::LibcallLoweringInfo const*, llvm::GISelValueTracking*) + 1753
12 llc       0x0000555aec101c90
13 llc       0x0000555aec1018b2 llvm::LegalizerLegacy::runOnMachineFunction(llvm::MachineFunction&) + 242
14 llc       0x0000555aea478891 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc       0x0000555aeaa147f7 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc       0x0000555aeaa1cd12 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc       0x0000555aeaa155a0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc       0x0000555ae9c6f8c9
19 llc       0x0000555ae9c6ca53 main + 1747
20 libc.so.6 0x00007f9249a2a1ca
21 libc.so.6 0x00007f9249a2a28b __libc_start_main + 139
22 llc       0x0000555ae9c6bb65 _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.