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

Run:explore-bc8218b282-20261015-075519
Kind:crash
Category:Assertion failed: (DstTy.getElementType() == SrcVecTy.getElementType() && "Extract subvector VTs must have the same element type!"), function buildInstr, file MachineIRBuilder.cpp NEW
Occurrences:4 in 2 configs, 2 test files
Snippet from:smulh.100b1ba4d9.ll (mutant of smulh.ll) @smulh_v2i48 via llvm-extract + llvm-reduce
Config:-mtriple=riscv64 -mattr=+m,+v
Local check:reproduces at bc8218b282
Compiler Explorer:https://godbolt.org/z/6bvj1osjM (llc-assertions-trunk, checked 2026-10-14 11:03 UTC): G reproduces

Snippet:

define <2 x i48> @smulh_v2i48(<2 x i48> %x) {
  ret <2 x i48> %x
}

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv64 -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=riscv64 -mattr=+m,+v -global-isel=001-

Reproduce:

llc -mtriple=riscv64 -mattr=+m,+v -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -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:1515: 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=riscv64 -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 '@smulh_v2i48'
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       0x000055c88135654b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x000055c8813533f1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x000055c881356fcb
3  libc.so.6 0x00007f192c245330
4  libc.so.6 0x00007f192c29ec0c pthread_kill + 284
5  libc.so.6 0x00007f192c24527e gsignal + 30
6  libc.so.6 0x00007f192c2288ff abort + 223
7  libc.so.6 0x00007f192c22881b
8  libc.so.6 0x00007f192c23b517
9  llc       0x000055c8834b92b5 llvm::MachineIRBuilder::buildInstr(unsigned int, llvm::ArrayRef<llvm::DstOp>, llvm::ArrayRef<llvm::SrcOp>, std::optional<unsigned int>) + 12405
10 llc       0x000055c8833cff9f llvm::CSEMIRBuilder::buildInstr(unsigned int, llvm::ArrayRef<llvm::DstOp>, llvm::ArrayRef<llvm::SrcOp>, std::optional<unsigned int>) + 2991
11 llc       0x000055c8834b4c9c llvm::MachineIRBuilder::buildExtractSubvector(llvm::DstOp const&, llvm::SrcOp const&, unsigned int) + 76
12 llc       0x000055c88257452f
13 llc       0x000055c8833c5d90 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       0x000055c8825716ac
15 llc       0x000055c883432180 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*) + 3552
16 llc       0x000055c88343342d llvm::IRTranslatorLegacy::runOnMachineFunction(llvm::MachineFunction&) + 733
17 llc       0x000055c88191d9ed llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 653
18 llc       0x000055c8816add37 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
19 llc       0x000055c8816b6232 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
20 llc       0x000055c8816aeae0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
21 llc       0x000055c88135dba8 llcMain + 12056
22 llc       0x000055c8812986af main + 63
23 libc.so.6 0x00007f192c22a1ca
24 libc.so.6 0x00007f192c22a28b __libc_start_main + 139
25 llc       0x000055c8812985a5 _start + 37

Occurrences (4):

InputFunctionConfig
smulh.100b1ba4d9.ll (mutant of smulh.ll)-mtriple=riscv64 -mattr=+m,+v
smulh.efaf3084ca.ll (mutant of smulh.ll)-mtriple=riscv32 -mattr=+m,+v
umulh.8197f72a60.ll (mutant of umulh.ll)-mtriple=riscv32 -mattr=+m,+v
umulh.9aafd4092b.ll (mutant of umulh.ll)-mtriple=riscv64 -mattr=+m,+v

Generated 2026-10-15 08:05 UTC.