crash: Assertion failed: (DstTy.getElementType() == SrcVecTy.getElementType() && "Extract subvector VTs must have the same element type!"), function buildInstr, file MachineIRBuilder.cpp

Run:explore-b577f07195-20261129-105236
Kind:crash
Category:Assertion failed: (DstTy.getElementType() == SrcVecTy.getElementType() && "Extract subvector VTs must have the same element type!"), function buildInstr, file MachineIRBuilder.cpp
Occurrences:93 in 38 configs, 38 test files, 2246 more counted only
Snippet from:fixed-vectors-sext-vp.ll @vsext_v4i8_v4i7 via llvm-extract
Config:-mtriple=riscv32 -mattr=+m,+v
Local check:reproduces at b577f07195
Compiler Explorer:https://godbolt.org/z/7edKEGE9f (llc-assertions-trunk, checked 2026-10-26 12:19 UTC): G reproduces

Snippet:

define <4 x i8> @vsext_v4i8_v4i7(<4 x i7> %va, <4 x i1> %m, i32 zeroext %evl) {
  %v = sext <4 x i7> %va to <4 x i8>
  ret <4 x i8> %v
}

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv32 -mattr=+m,+v -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.*1340llc: /root/llvm-project/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp:1514: virtual llvm::MachineInstrBuilder llvm::MachineIRBuilder::buildInstr(unsigned int, llvm::ArrayRef<llvm::DstOp>, llvm::ArrayRef<llvm::SrcOp>, std::optional<unsigned int>): Assertion `DstTy.getElementType() == SrcVecTy.getElementType() && "Extract subvector VTs must have the same element 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=+m,+v -global-isel=004-

Reproduce:

llc -mtriple=riscv32 -mattr=+m,+v -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+m,+v -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:1526: virtual MachineInstrBuilder llvm::MachineIRBuilder::buildInstr(unsigned int, ArrayRef<DstOp>, ArrayRef<SrcOp>, std::optional<unsigned int>): Assertion `DstTy.getElementType() == SrcVecTy.getElementType() && "Extract subvector VTs must have the same element 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=+m,+v -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 '@vsext_v4i8_v4i7'
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       0x0000559d7a5d99eb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000559d7a5d69c1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000559d7a5da46b
3  libc.so.6 0x00007f13d1845330
4  libc.so.6 0x00007f13d189ebec pthread_kill + 284
5  libc.so.6 0x00007f13d184527e gsignal + 30
6  libc.so.6 0x00007f13d18288ff abort + 223
7  libc.so.6 0x00007f13d182881b
8  libc.so.6 0x00007f13d183b517
9  llc       0x0000559d7af52c15 llvm::MachineIRBuilder::buildInstr(unsigned int, llvm::ArrayRef<llvm::DstOp>, llvm::ArrayRef<llvm::SrcOp>, std::optional<unsigned int>) + 12405
10 llc       0x0000559d7ae5f01d llvm::CSEMIRBuilder::buildInstr(unsigned int, llvm::ArrayRef<llvm::DstOp>, llvm::ArrayRef<llvm::SrcOp>, std::optional<unsigned int>) + 2989
11 llc       0x0000559d7af4e5fc llvm::MachineIRBuilder::buildExtractSubvector(llvm::DstOp const&, llvm::SrcOp const&, unsigned int) + 76
12 llc       0x0000559d78c44ed8
13 llc       0x0000559d7ae54ba0 llvm::CallLowering::handleAssignments(llvm::CallLowering::ValueHandler&, llvm::SmallVectorImpl<llvm::CallLowering::ArgInfo>&, llvm::CCState&, llvm::SmallVectorImpl<llvm::CCValAssign>&, llvm::MachineIRBuilder&, llvm::ArrayRef<llvm::Register>) const + 928
14 llc       0x0000559d78c41a2c
15 llc       0x0000559d7aec8f23 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*) + 3523
16 llc       0x0000559d7aeca1bd llvm::IRTranslatorLegacy::runOnMachineFunction(llvm::MachineFunction&) + 733
17 llc       0x0000559d792536b1 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
18 llc       0x0000559d797eeb37 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
19 llc       0x0000559d797f7052 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
20 llc       0x0000559d797ef8e0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
21 llc       0x0000559d78a4a149
22 llc       0x0000559d78a472d3 main + 1747
23 libc.so.6 0x00007f13d182a1ca
24 libc.so.6 0x00007f13d182a28b __libc_start_main + 139
25 llc       0x0000559d78a463e5 _start + 37

Occurrences (93) (first 15):

InputFunctionConfig
constant-folding-crash.ll-mtriple=riscv32 -mattr=+v -verify-machineinstrs
constant-folding-crash.ll-mtriple=riscv64 -mattr=+v -verify-machineinstrs
fixed-vectors-bitinsert.ll-mtriple=riscv32 -mattr=+v
fixed-vectors-bitinsert.ll-mtriple=riscv64 -mattr=+v
fixed-vectors-i2fp.ll-mtriple=riscv32 -target-abi=ilp32d -mattr=+v,+zvfh,+experimental-zvfbfa,+f,+d -verify-machineinstrs
fixed-vectors-i2fp.ll-mtriple=riscv32 -target-abi=ilp32d -mattr=+v,+zvfh,+zvfbfmin,+f,+d -verify-machineinstrs
fixed-vectors-i2fp.ll-mtriple=riscv32 -target-abi=ilp32d -mattr=+v,+zvfhmin,+zvfbfmin,+f,+d -verify-machineinstrs
fixed-vectors-i2fp.ll-mtriple=riscv64 -target-abi=lp64d -mattr=+v,+zvfh,+experimental-zvfbfa,+f,+d -verify-machineinstrs
fixed-vectors-i2fp.ll-mtriple=riscv64 -target-abi=lp64d -mattr=+v,+zvfh,+zvfbfmin,+f,+d -verify-machineinstrs
fixed-vectors-i2fp.ll-mtriple=riscv64 -target-abi=lp64d -mattr=+v,+zvfhmin,+zvfbfmin,+f,+d -verify-machineinstrs
fixed-vectors-setcc-int-vp.ll-mtriple=riscv32 -mattr=+v,+m -verify-machineinstrs
fixed-vectors-setcc-int-vp.ll-mtriple=riscv64 -mattr=+v,+m -verify-machineinstrs
fixed-vectors-sext-vp.ll-mtriple=riscv32 -mattr=+m,+v
fixed-vectors-sext-vp.ll-mtriple=riscv64 -mattr=+m,+v
fixed-vectors-shuffle-int.ll-mtriple=riscv32 -mattr=+v -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.