crash: Assertion failed: (Val.getLLTTy(*getMRI()).isValid() && "invalid operand type"), function buildStore, file MachineIRBuilder.cpp
| Run: | explore-db12fc36f6-20261127-115111 |
| Kind: | crash |
| Category: | Assertion failed: (Val.getLLTTy(*getMRI()).isValid() && "invalid operand type"), function buildStore, file MachineIRBuilder.cpp M |
| Occurrences: | 2 in 2 configs, 2 test files |
| Snippet from: | vloxseg-rv64.dc7d1c7b14.ll (mutant of vloxseg-rv64.ll) @test_vloxseg2_mask_nxv2i8_triscv.vector.tuple_nxv2i8_2t_nxv2i8 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -mattr=+zve64d,+f,+d,+zvfh,+zvfbfmin -O2 |
| Local check: | reproduces at db12fc36f6 |
| Compiler Explorer: | not uploaded (over --godbolt-limit or disabled) |
Snippet:
define <vscale x 2 x i8> @test_vloxseg2_mask_nxv2i8_triscv.vector.tuple_nxv2i8_2t_nxv2i8(ptr %base, <vscale x 2 x i8> %index, i64 %vl, <vscale x 2 x i1> %mask) {
entry:
%A = alloca target("riscv.vector.tuple", <vscale x 2 x i8>, 2), align 16
store target("riscv.vector.tuple", <vscale x 2 x i8>, 2) poison, ptr %A, align 16
%0 = tail call target("riscv.vector.tuple", <vscale x 2 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv.vector.tuple_nxv2i8_2t.p0.nxv2i8.nxv2i1.i64(target("riscv.vector.tuple", <vscale x 2 x i8>, 2) poison, ptr %base, <vscale x 2 x i8> %index, <vscale x 2 x i1> %mask, i64 %vl, i64 1, i64 3)
%1 = call <vscale x 2 x i8> @llvm.riscv.tuple.extract.nxv2i8.triscv.vector.tuple_nxv2i8_2t(target("riscv.vector.tuple", <vscale x 2 x i8>, 2) %0, i32 1)
store target("riscv.vector.tuple", <vscale x 2 x i8>, 2) %0, ptr %A, align 16
ret <vscale x 2 x i8> %1
}
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <vscale x 2 x i8> @llvm.riscv.tuple.extract.nxv2i8.triscv.vector.tuple_nxv2i8_2t(target("riscv.vector.tuple", <vscale x 2 x i8>, 2), i32 immarg) #0
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(read)
declare target("riscv.vector.tuple", <vscale x 2 x i8>, 2) @llvm.riscv.vloxseg2.mask.triscv.vector.tuple_nxv2i8_2t.p0.nxv2i8.nxv2i1.i64(target("riscv.vector.tuple", <vscale x 2 x i8>, 2), ptr captures(none), <vscale x 2 x i8>, <vscale x 2 x i1>, i64, i64 immarg, i64 immarg) #1
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(read) }
Reproduce:
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zve64d,+f,+d,+zvfh,+zvfbfmin -O2 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zve64d,+f,+d,+zvfh,+zvfbfmin -O2 -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=riscv64 -verify-machineinstrs -mattr=+zve64d,+f,+d,+zvfh,+zvfbfmin -O2 -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_vloxseg2_mask_nxv2i8_triscv.vector.tuple_nxv2i8_2t_nxv2i8'
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 0x0000555d00e79c1b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1 llc 0x0000555d00e76bf1 llvm::sys::RunSignalHandlers() + 369
2 llc 0x0000555d00e7a69b
3 libc.so.6 0x00007f8f06245330
4 libc.so.6 0x00007f8f0629ebec pthread_kill + 284
5 libc.so.6 0x00007f8f0624527e gsignal + 30
6 libc.so.6 0x00007f8f062288ff abort + 223
7 libc.so.6 0x00007f8f0622881b
8 libc.so.6 0x00007f8f0623b517
9 llc 0x0000555d017eaa09 llvm::MachineIRBuilder::buildStore(llvm::SrcOp const&, llvm::SrcOp const&, llvm::MachineMemOperand&) + 265
10 llc 0x0000555d01757f6d llvm::IRTranslatorImpl::translateStore(llvm::User const&, llvm::MachineIRBuilder&) + 1277
11 llc 0x0000555d01766b73 llvm::IRTranslatorImpl::translate(llvm::Instruction const&) + 611
12 llc 0x0000555d0176972d 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 0x0000555d0176a71d llvm::IRTranslatorLegacy::runOnMachineFunction(llvm::MachineFunction&) + 733
14 llc 0x0000555cffaf2761 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc 0x0000555d0008ea77 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc 0x0000555d00096f92 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc 0x0000555d0008f820 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc 0x0000555cff2e9689
19 llc 0x0000555cff2e6813 main + 1747
20 libc.so.6 0x00007f8f0622a1ca
21 libc.so.6 0x00007f8f0622a28b __libc_start_main + 139
22 llc 0x0000555cff2e5925 _start + 37
Occurrences (2):
| Input | Function | Config |
|---|
| rv32-spill-zvlsseg.91544d035c.ll (mutant of rv32-spill-zvlsseg.ll) | | -mtriple=riscv32 -mattr=+v,+m -O1 -verify-machineinstrs |
| vloxseg-rv64.dc7d1c7b14.ll (mutant of vloxseg-rv64.ll) | | -mtriple=riscv64 -verify-machineinstrs -mattr=+zve64d,+f,+d,+zvfh,+zvfbfmin -O2 |
Generated 2026-11-29 14:49 UTC.