crash: Assertion failed: (MF.getSubtarget<RISCVSubtarget>().hasStdExtD()), function getInstrMapping, file RISCVRegisterBankInfo.cpp

Run:explore-b577f07195-20261129-105236
Kind:crash
Category:Assertion failed: (MF.getSubtarget<RISCVSubtarget>().hasStdExtD()), function getInstrMapping, file RISCVRegisterBankInfo.cpp M
Occurrences:3 in 3 configs, 3 test files
Snippet from:vluxei.81a7df42ca.ll (mutant of vluxei.ll) @intrinsic_vluxei_v_nxv2f32_nxv2f32_nxv2i8 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32d -mattr=+zvfhmin,+zvfbfmin -O2
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i1

; Function Attrs: nounwind
define <vscale x 2 x float> @intrinsic_vluxei_v_nxv2f32_nxv2f32_nxv2i8(ptr %0, <vscale x 2 x i8> %1, i32 %2) #0 {
entry:
  %LGV = load i1, ptr @G, align 1
  br i1 %LGV, label %T, label %F

BB:                                               ; preds = %T
  %a = call <vscale x 2 x float> @llvm.riscv.vluxei.nxv2f32.p0.nxv2i8.i32(<vscale x 2 x float> poison, ptr %0, <vscale x 2 x i8> %1, i32 %2)
  ret <vscale x 2 x float> %a

T:                                                ; preds = %entry
  br label %BB

F:                                                ; preds = %entry
  ret <vscale x 2 x float> splat (float f0x7F7FFFFF)
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(read)
declare <vscale x 2 x float> @llvm.riscv.vluxei.nxv2f32.p0.nxv2i8.i32(<vscale x 2 x float>, ptr captures(none), <vscale x 2 x i8>, i32) #1

attributes #0 = { nounwind }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(read) }

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32d -mattr=+zvfhmin,+zvfbfmin -O2 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32d -mattr=+zvfhmin,+zvfbfmin -O2 -global-isel=0 snippet.ll -o -

Local llc output:

note: hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
llc: /home/runner/work/llvm-fuzz/llvm-fuzz/llvm-project/llvm/lib/Target/RISCV/GISel/RISCVRegisterBankInfo.cpp:610: virtual const RegisterBankInfo::InstructionMapping &llvm::RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &) const: Assertion `MF.getSubtarget<RISCVSubtarget>().hasStdExtD()' 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 -verify-machineinstrs -target-abi=ilp32d -mattr=+zvfhmin,+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 'RegBankSelect' on function '@intrinsic_vluxei_v_nxv2f32_nxv2f32_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       0x0000562398b879eb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000562398b849c1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000562398b8846b
3  libc.so.6 0x00007f8d16e45330
4  libc.so.6 0x00007f8d16e9ebec pthread_kill + 284
5  libc.so.6 0x00007f8d16e4527e gsignal + 30
6  libc.so.6 0x00007f8d16e288ff abort + 223
7  libc.so.6 0x00007f8d16e2881b
8  libc.so.6 0x00007f8d16e3b517
9  llc       0x000056239727002d
10 llc       0x0000562399502567
11 llc       0x0000562399501985 llvm::RegBankSelectLegacy::runOnMachineFunction(llvm::MachineFunction&) + 197
12 llc       0x00005623978016b1 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
13 llc       0x0000562397d9cb37 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
14 llc       0x0000562397da5052 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
15 llc       0x0000562397d9d8e0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
16 llc       0x0000562396ff8149
17 llc       0x0000562396ff52d3 main + 1747
18 libc.so.6 0x00007f8d16e2a1ca
19 libc.so.6 0x00007f8d16e2a28b __libc_start_main + 139
20 llc       0x0000562396ff43e5 _start + 37

Occurrences (3):

InputFunctionConfig
sf_vfexpa.7a514d2e22.ll (mutant of sf_vfexpa.ll)-mtriple=riscv32 -verify-machineinstrs -mattr=+zve64f,+zvfh,+xsfvfexpa -O3
vfmin.f865f5af8a.ll (mutant of vfmin.ll)-mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32d -mattr=+zvfh -O1
vluxei.81a7df42ca.ll (mutant of vluxei.ll)-mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32d -mattr=+zvfhmin,+zvfbfmin -O2

Generated 2026-11-29 14:49 UTC.