crash: LLVM ERROR: cannot implicitly convert a scalable size to a fixed-width size in `TypeSize::operator ScalarTy()`

Run:explore-b577f07195-20261129-105236
Kind:crash
Category:LLVM ERROR: cannot implicitly convert a scalable size to a fixed-width size in `TypeSize::operator ScalarTy()`
Occurrences:13 in 12 configs, 5 test files, 2488 more counted only
Snippet from:vscale-add-fold-multi-use.ll @load_nxv48i32 via llvm-extract
Config:-mtriple=riscv64 -mattr=+m,+v,+f,+d
Local check:reproduces at b577f07195
Compiler Explorer:https://godbolt.org/z/svvTznjn8 (llc-assertions-trunk, checked 2026-10-25 18:43 UTC): G reproduces

Snippet:

define void @load_nxv48i32(ptr %x) {
  %v = load volatile <vscale x 48 x i32>, ptr %x, align 256
  ret void
}

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv64 -mattr=+m,+v,+f,+d -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.*1340LLVM ERROR: cannot implicitly convert a scalable size to a fixed-width size in `TypeSize::operator ScalarTy()`
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,+f,+d -global-isel=008-

Reproduce:

llc -mtriple=riscv64 -mattr=+m,+v,+f,+d -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -mattr=+m,+v,+f,+d -global-isel=0 snippet.ll -o -

Local llc output:

LLVM ERROR: cannot implicitly convert a scalable size to a fixed-width size in `TypeSize::operator ScalarTy()`
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,+f,+d -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* -o -
1.	Running pass 'Function Pass Manager' on module '<stdin>'.
2.	Running pass 'Legalizer' on function '@load_nxv48i32'
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       0x0000556a12a659eb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x0000556a12a629c1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x0000556a12a6646b
3  libc.so.6 0x00007f2c5f645330
4  libc.so.6 0x00007f2c5f69ebec pthread_kill + 284
5  libc.so.6 0x00007f2c5f64527e gsignal + 30
6  libc.so.6 0x00007f2c5f6288ff abort + 223
7  llc       0x0000556a129bddfd llvm::report_fatal_error(llvm::Twine const&, bool) + 429
8  llc       0x0000556a129bdc46
9  llc       0x0000556a129bdeeb
10 llc       0x0000556a13396889
11 llc       0x0000556a13365fd9 llvm::legalizeMachineFunction(llvm::MachineFunction&, llvm::LegalizerInfo const&, llvm::ArrayRef<llvm::GISelChangeObserver*>, llvm::LostDebugLocObserver&, llvm::MachineIRBuilder&, llvm::LibcallLoweringInfo const*, llvm::GISelValueTracking*) + 1753
12 llc       0x0000556a13367d20
13 llc       0x0000556a13367942 llvm::LegalizerLegacy::runOnMachineFunction(llvm::MachineFunction&) + 242
14 llc       0x0000556a116df6b1 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc       0x0000556a11c7ab37 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc       0x0000556a11c83052 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc       0x0000556a11c7b8e0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc       0x0000556a10ed6149
19 llc       0x0000556a10ed32d3 main + 1747
20 libc.so.6 0x00007f2c5f62a1ca
21 libc.so.6 0x00007f2c5f62a28b __libc_start_main + 139
22 llc       0x0000556a10ed23e5 _start + 37

Occurrences (13):

InputFunctionConfig
allocate-lmul-2-4-8.ll-mtriple=riscv64 -mattr=+m,+v -verify-machineinstrs
allocate-lmul-2-4-8.ll-mtriple=riscv64 -mattr=+m,+v,+prefer-vsetvli-over-read-vlenb -verify-machineinstrs
allocate-lmul-2-4-8.ll-mtriple=riscv64 -mattr=+m,+v,+zba -verify-machineinstrs
allocate-lmul-2-4-8.ll-mtriple=riscv64 -mattr=+m,+v,+zba,+prefer-vsetvli-over-read-vlenb -verify-machineinstrs
allocate-lmul-2-4-8.ll-mtriple=riscv64 -mattr=+v -verify-machineinstrs
allocate-lmul-2-4-8.ll-mtriple=riscv64 -mattr=+v,+prefer-vsetvli-over-read-vlenb -verify-machineinstrs
calling-conv-fastcc.ll-mtriple=riscv32 -mattr=+m,+v -verify-machineinstrs
calling-conv-fastcc.ll-mtriple=riscv64 -mattr=+m,+v -verify-machineinstrs
legalize-load-sdnode.ll-mtriple=riscv32 -mattr=+m,+v,+zvfh,+f,+d -verify-machineinstrs
legalize-load-sdnode.ll-mtriple=riscv64 -mattr=+m,+v,+zvfh,+f,+d -verify-machineinstrs
vscale-add-fold-multi-use.ll-mtriple=riscv64 -mattr=+m,+v,+f,+d
zve32-types.ll-mtriple=riscv32 -mattr=+zve32f,+f,+zvl64b -verify-machineinstrs
zve32-types.ll-mtriple=riscv64 -mattr=+zve32f,+f,+zvl64b -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.