crash: Assertion failed: (BestRC && "Couldn't find the register class"), function getCommonMinimalPhysRegClass, file TargetRegisterInfo.cpp

Run:explore-db12fc36f6-20261127-115111
Kind:crash
Category:Assertion failed: (BestRC && "Couldn't find the register class"), function getCommonMinimalPhysRegClass, file TargetRegisterInfo.cpp M
Occurrences:3 in 3 configs, 1 test files, 6 more counted only
Snippet from:zilsd.6fee865a5f.ll (mutant of zilsd.ll) @select_i64 via llvm-extract
Config:-mtriple=riscv32 -target-abi=ilp32d -mattr=+d,+zilsd -O1 -verify-machineinstrs
Local check:reproduces at db12fc36f6
Compiler Explorer:https://godbolt.org/z/cWbqvrYxq (llc-assertions-trunk, checked 2026-11-27 15:31 UTC): G reproduces

Snippet:

; Function Attrs: nounwind
define i64 @select_i64(i1 %c, i64 %a, i64 %b) #0 {
  %r = select i1 %c, i64 %a, i64 %b
  %C = icmp uge i64 %b, %r
  store i1 %C, ptr poison, align 1
  ret i64 %r
}

attributes #0 = { nounwind }

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv32 -target-abi=ilp32d -mattr=+d,+zilsd -O1 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.*1340llc: /root/llvm-project/llvm/lib/CodeGen/TargetRegisterInfo.cpp:216: const TargetRegisterClass* getCommonMinimalPhysRegClass(const llvm::TargetRegisterInfo*, llvm::MCRegister, llvm::MCRegister): Assertion `BestRC && "Couldn't find the register class"' 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 -target-abi=ilp32d -mattr=+d,+zilsd -O1 -verify-machineinstrs -global-isel=0013-

Reproduce:

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

Local llc output:

llc: /home/runner/work/llvm-fuzz/llvm-fuzz/llvm-project/llvm/lib/CodeGen/TargetRegisterInfo.cpp:216: const TargetRegisterClass *getCommonMinimalPhysRegClass(const TargetRegisterInfo *, MCRegister, MCRegister): Assertion `BestRC && "Couldn't find the register class"' 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 -target-abi=ilp32d -mattr=+d,+zilsd -O1 -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 'Post-RA pseudo instruction expansion pass' on function '@select_i64'
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       0x00005558c4b8dc1b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x00005558c4b8abf1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x00005558c4b8e69b
3  libc.so.6 0x00007f5a9e445330
4  libc.so.6 0x00007f5a9e49ebec pthread_kill + 284
5  libc.so.6 0x00007f5a9e44527e gsignal + 30
6  libc.so.6 0x00007f5a9e4288ff abort + 223
7  libc.so.6 0x00007f5a9e42881b
8  libc.so.6 0x00007f5a9e43b517
9  llc       0x00005558c3b66438 llvm::TargetRegisterInfo::getCommonMinimalPhysRegClass(llvm::MCRegister, llvm::MCRegister) const + 248
10 llc       0x00005558c30362ec
11 llc       0x00005558c3b41847 llvm::TargetInstrInfo::lowerCopy(llvm::MachineInstr*) const + 359
12 llc       0x00005558c36b0f1b
13 llc       0x00005558c36b1673
14 llc       0x00005558c3806761 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc       0x00005558c3da2a77 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc       0x00005558c3daaf92 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc       0x00005558c3da3820 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc       0x00005558c2ffd689
19 llc       0x00005558c2ffa813 main + 1747
20 libc.so.6 0x00007f5a9e42a1ca
21 libc.so.6 0x00007f5a9e42a28b __libc_start_main + 139
22 llc       0x00005558c2ff9925 _start + 37

Occurrences (3):

InputFunctionConfig
zilsd.2d5e81d5d6.ll (mutant of zilsd.ll)-mtriple=riscv32 -target-abi=ilp32d -mattr=+d,+zilsd -O0 -verify-machineinstrs
zilsd.6fee865a5f.ll (mutant of zilsd.ll)-mtriple=riscv32 -target-abi=ilp32d -mattr=+d,+zilsd -O1 -verify-machineinstrs
zilsd.be2cc1f16a.ll (mutant of zilsd.ll)-mtriple=riscv32 -target-abi=ilp32d -mattr=+d,+zilsd,+zbs -O1 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.