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

Run:explore-b577f07195-20261129-105236
Kind:crash
Category:Assertion failed: (isReg() && "This is not a register operand!"), function getReg, file MachineOperand.h
Occurrences:12 in 10 configs, 6 test files, 269 more counted only
Snippet from:vsm4k.ll @intrinsic_vsm4k_vi_nxv4i32_i32 via llvm-extract
Config:-mtriple=riscv32 -mattr=+v,+zvksed -verify-machineinstrs
Local check:reproduces at b577f07195
Compiler Explorer:https://godbolt.org/z/1EoKThx1n (llc-assertions-trunk, checked 2026-10-26 12:20 UTC): G reproduces

Snippet:

; Function Attrs: nounwind
define <vscale x 4 x i32> @intrinsic_vsm4k_vi_nxv4i32_i32(<vscale x 4 x i32> %0, i32 %1) #0 {
entry:
  %a = call <vscale x 4 x i32> @llvm.riscv.vsm4k.nxv4i32.i32.i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %0, i32 2, i32 %1)
  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) #1

attributes #0 = { nounwind }
attributes #1 = { 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=003-

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       0x0000557fb27229eb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000557fb271f9c1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000557fb272346b
3  libc.so.6 0x00007fa7d7a45330
4  libc.so.6 0x00007fa7d7a9ebec pthread_kill + 284
5  libc.so.6 0x00007fa7d7a4527e gsignal + 30
6  libc.so.6 0x00007fa7d7a288ff abort + 223
7  libc.so.6 0x00007fa7d7a2881b
8  libc.so.6 0x00007fa7d7a3b517
9  llc       0x0000557fb0dc064c
10 llc       0x0000557fb302ec3c llvm::LegalizerHelper::legalizeInstrStep(llvm::MachineInstr&, llvm::LostDebugLocObserver&) + 220
11 llc       0x0000557fb3022fd9 llvm::legalizeMachineFunction(llvm::MachineFunction&, llvm::LegalizerInfo const&, llvm::ArrayRef<llvm::GISelChangeObserver*>, llvm::LostDebugLocObserver&, llvm::MachineIRBuilder&, llvm::LibcallLoweringInfo const*, llvm::GISelValueTracking*) + 1753
12 llc       0x0000557fb3024d20
13 llc       0x0000557fb3024942 llvm::LegalizerLegacy::runOnMachineFunction(llvm::MachineFunction&) + 242
14 llc       0x0000557fb139c6b1 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc       0x0000557fb1937b37 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc       0x0000557fb1940052 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc       0x0000557fb19388e0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc       0x0000557fb0b93149
19 llc       0x0000557fb0b902d3 main + 1747
20 libc.so.6 0x00007fa7d7a2a1ca
21 libc.so.6 0x00007fa7d7a2a28b __libc_start_main + 139
22 llc       0x0000557fb0b8f3e5 _start + 37

Occurrences (12):

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

Generated 2026-11-29 14:49 UTC.