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

Run:explore-d9924131a4-20261128-105811
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, 1688 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 d9924131a4
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       0x000055cef2eb3b5b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x000055cef2eb0b31 llvm::sys::RunSignalHandlers() + 369
2  llc       0x000055cef2eb45db
3  libc.so.6 0x00007f36f1245330
4  libc.so.6 0x00007f36f129ebec pthread_kill + 284
5  libc.so.6 0x00007f36f124527e gsignal + 30
6  libc.so.6 0x00007f36f12288ff abort + 223
7  llc       0x000055cef2e0bf6d llvm::report_fatal_error(llvm::Twine const&, bool) + 429
8  llc       0x000055cef2e0bdb6
9  llc       0x000055cef2e0c05b
10 llc       0x000055cef37e47f9
11 llc       0x000055cef37b3f49 llvm::legalizeMachineFunction(llvm::MachineFunction&, llvm::LegalizerInfo const&, llvm::ArrayRef<llvm::GISelChangeObserver*>, llvm::LostDebugLocObserver&, llvm::MachineIRBuilder&, llvm::LibcallLoweringInfo const*, llvm::GISelValueTracking*) + 1753
12 llc       0x000055cef37b5c90
13 llc       0x000055cef37b58b2 llvm::LegalizerLegacy::runOnMachineFunction(llvm::MachineFunction&) + 242
14 llc       0x000055cef1b2c891 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
15 llc       0x000055cef20c87f7 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
16 llc       0x000055cef20d0d12 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
17 llc       0x000055cef20c95a0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
18 llc       0x000055cef13238c9
19 llc       0x000055cef1320a53 main + 1747
20 libc.so.6 0x00007f36f122a1ca
21 libc.so.6 0x00007f36f122a28b __libc_start_main + 139
22 llc       0x000055cef131fb65 _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.