crash: Assertion failed: (Val.getLLTTy(*getMRI()).isValid() && "invalid operand type"), function buildStore, file MachineIRBuilder.cpp

Run:main-d9924131a4-20261128-102057
Kind:crash
Category:Assertion failed: (Val.getLLTTy(*getMRI()).isValid() && "invalid operand type"), function buildStore, file MachineIRBuilder.cpp M
Occurrences:4 in 4 configs, 4 test files
Snippet from:vlsegff-rv32-dead.ee8c12cf2d.ll (mutant of vlsegff-rv32-dead.ll) @test_vlseg2ff_dead_all via llvm-extract
Config:-mtriple=riscv32 -mattr=+zve64x -verify-machineinstrs
Local check:reproduces at d9924131a4
Compiler Explorer:https://godbolt.org/z/G6doqjqE1 (llc-assertions-trunk, checked 2026-10-25 18:43 UTC): G reproduces

Snippet:

define void @test_vlseg2ff_dead_all(ptr %base, i32 %vl) {
entry:
  %A = alloca target("riscv.vector.tuple", <vscale x 32 x i8>, 2), align 64
  store target("riscv.vector.tuple", <vscale x 32 x i8>, 2) poison, ptr %A, align 64
  %0 = tail call { target("riscv.vector.tuple", <vscale x 32 x i8>, 2), i32 } @llvm.riscv.vlseg2ff.triscv.vector.tuple_nxv32i8_2t.i32.p0(target("riscv.vector.tuple", <vscale x 32 x i8>, 2) poison, ptr %base, i32 %vl, i32 4)
  %E = extractvalue { target("riscv.vector.tuple", <vscale x 32 x i8>, 2), i32 } %0, 0
  store target("riscv.vector.tuple", <vscale x 32 x i8>, 2) %E, ptr %A, align 64
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare { target("riscv.vector.tuple", <vscale x 32 x i8>, 2), i32 } @llvm.riscv.vlseg2ff.triscv.vector.tuple_nxv32i8_2t.i32.p0(target("riscv.vector.tuple", <vscale x 32 x i8>, 2), ptr captures(none), i32, i32 immarg) #0

attributes #0 = { nocallback nofree nosync nounwind willreturn }

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv32 -mattr=+zve64x -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.*1340llc: /root/llvm-project/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp:520: llvm::MachineInstrBuilder llvm::MachineIRBuilder::buildStore(const llvm::SrcOp&, const llvm::SrcOp&, llvm::MachineMemOperand&): Assertion `Val.getLLTTy(*getMRI()).isValid() && "invalid operand type"' 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=+zve64x -verify-machineinstrs -global-isel=0021-

Reproduce:

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

Local llc output:

llc: /home/runner/work/llvm-fuzz/llvm-fuzz/llvm-project/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp:522: MachineInstrBuilder llvm::MachineIRBuilder::buildStore(const SrcOp &, const SrcOp &, MachineMemOperand &): Assertion `Val.getLLTTy(*getMRI()).isValid() && "invalid operand type"' 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=+zve64x -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 'IRTranslator' on function '@test_vlseg2ff_dead_all'
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       0x00005598c7b62b5b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x00005598c7b5fb31 llvm::sys::RunSignalHandlers() + 369
2  llc       0x00005598c7b635db
3  libc.so.6 0x00007fcbec445330
4  libc.so.6 0x00007fcbec49ebec pthread_kill + 284
5  libc.so.6 0x00007fcbec44527e gsignal + 30
6  libc.so.6 0x00007fcbec4288ff abort + 223
7  libc.so.6 0x00007fcbec42881b
8  libc.so.6 0x00007fcbec43b517
9  llc       0x00005598c84d3419 llvm::MachineIRBuilder::buildStore(llvm::SrcOp const&, llvm::SrcOp const&, llvm::MachineMemOperand&) + 265
10 llc       0x00005598c844097d llvm::IRTranslatorImpl::translateStore(llvm::User const&, llvm::MachineIRBuilder&) + 1277
11 llc       0x00005598c844f583 llvm::IRTranslatorImpl::translate(llvm::Instruction const&) + 611
12 llc       0x00005598c845213d llvm::IRTranslatorImpl::runOnMachineFunction(llvm::MachineFunction&, llvm::function_ref<llvm::GISelCSEInfo* ()>, bool, llvm::function_ref<llvm::AAResults* ()>, llvm::function_ref<llvm::BranchProbabilityInfo* ()>, llvm::function_ref<llvm::AssumptionCache* ()>, llvm::TargetLibraryInfo*, llvm::LibcallLoweringInfo const*, llvm::SSPLayoutInfo*) + 4205
13 llc       0x00005598c845312d llvm::IRTranslatorLegacy::runOnMachineFunction(llvm::MachineFunction&) + 733
14 llc       0x00005598c67db891 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc       0x00005598c6d777f7 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc       0x00005598c6d7fd12 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc       0x00005598c6d785a0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc       0x00005598c5fd28c9
19 llc       0x00005598c5fcfa53 main + 1747
20 libc.so.6 0x00007fcbec42a1ca
21 libc.so.6 0x00007fcbec42a28b __libc_start_main + 139
22 llc       0x00005598c5fceb65 _start + 37

Occurrences (4):

InputFunctionConfig
vlseg-rv32.034e00dc8d.ll (mutant of vlseg-rv32.ll)-mtriple=riscv32 -mattr=+zve64d,+f,+d,+zvfh,+zvfbfmin -verify-machineinstrs
vlseg-rv64.5e5fcbae0b.ll (mutant of vlseg-rv64.ll)-mtriple=riscv64 -mattr=+zve64d,+f,+d,+zvfh,+zvfbfmin -verify-machineinstrs
vlsegff-rv32-dead.ee8c12cf2d.ll (mutant of vlsegff-rv32-dead.ll)-mtriple=riscv32 -mattr=+zve64x -verify-machineinstrs
vlsegff-rv64-dead.145e02e533.ll (mutant of vlsegff-rv64-dead.ll)-mtriple=riscv64 -mattr=+zve64x -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.