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

Run:main-b577f07195-20261129-101839
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 b577f07195
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       0x0000559ec6add9eb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000559ec6ada9c1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000559ec6ade46b
3  libc.so.6 0x00007f7a36645330
4  libc.so.6 0x00007f7a3669ebec pthread_kill + 284
5  libc.so.6 0x00007f7a3664527e gsignal + 30
6  libc.so.6 0x00007f7a366288ff abort + 223
7  libc.so.6 0x00007f7a3662881b
8  libc.so.6 0x00007f7a3663b517
9  llc       0x0000559ec744e4a9 llvm::MachineIRBuilder::buildStore(llvm::SrcOp const&, llvm::SrcOp const&, llvm::MachineMemOperand&) + 265
10 llc       0x0000559ec73bba0d llvm::IRTranslatorImpl::translateStore(llvm::User const&, llvm::MachineIRBuilder&) + 1277
11 llc       0x0000559ec73ca613 llvm::IRTranslatorImpl::translate(llvm::Instruction const&) + 611
12 llc       0x0000559ec73cd1cd 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       0x0000559ec73ce1bd llvm::IRTranslatorLegacy::runOnMachineFunction(llvm::MachineFunction&) + 733
14 llc       0x0000559ec57576b1 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc       0x0000559ec5cf2b37 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc       0x0000559ec5cfb052 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc       0x0000559ec5cf38e0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc       0x0000559ec4f4e149
19 llc       0x0000559ec4f4b2d3 main + 1747
20 libc.so.6 0x00007f7a3662a1ca
21 libc.so.6 0x00007f7a3662a28b __libc_start_main + 139
22 llc       0x0000559ec4f4a3e5 _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.