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

Run:main-b577f07195-20261129-101839
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 b577f07195
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       0x0000555e6901d9eb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000555e6901a9c1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000555e6901e46b
3  libc.so.6 0x00007fe77cc45330
4  libc.so.6 0x00007fe77cc9ebec pthread_kill + 284
5  libc.so.6 0x00007fe77cc4527e gsignal + 30
6  libc.so.6 0x00007fe77cc288ff abort + 223
7  libc.so.6 0x00007fe77cc2881b
8  libc.so.6 0x00007fe77cc3b517
9  llc       0x0000555e676bb64c
10 llc       0x0000555e69929c3c llvm::LegalizerHelper::legalizeInstrStep(llvm::MachineInstr&, llvm::LostDebugLocObserver&) + 220
11 llc       0x0000555e6991dfd9 llvm::legalizeMachineFunction(llvm::MachineFunction&, llvm::LegalizerInfo const&, llvm::ArrayRef<llvm::GISelChangeObserver*>, llvm::LostDebugLocObserver&, llvm::MachineIRBuilder&, llvm::LibcallLoweringInfo const*, llvm::GISelValueTracking*) + 1753
12 llc       0x0000555e6991fd20
13 llc       0x0000555e6991f942 llvm::LegalizerLegacy::runOnMachineFunction(llvm::MachineFunction&) + 242
14 llc       0x0000555e67c976b1 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc       0x0000555e68232b37 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc       0x0000555e6823b052 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc       0x0000555e682338e0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc       0x0000555e6748e149
19 llc       0x0000555e6748b2d3 main + 1747
20 libc.so.6 0x00007fe77cc2a1ca
21 libc.so.6 0x00007fe77cc2a28b __libc_start_main + 139
22 llc       0x0000555e6748a3e5 _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.