crash: Assertion failed: ((!isScalable() || isZero()) && "Request for a fixed element count on a scalable object"), function getFixedValue, file TypeSize.h

Run:explore-b577f07195-20261129-105236
Kind:crash
Category:Assertion failed: ((!isScalable() || isZero()) && "Request for a fixed element count on a scalable object"), function getFixedValue, file TypeSize.h
Occurrences:3 in 3 configs, 2 test files, 84 more counted only
Snippet from:alloca-load-store-scalable-array.ll @test via llvm-extract
Config:-mtriple=riscv64 -mattr=+v -verify-machineinstrs -M no-aliases
Local check:reproduces at b577f07195
Compiler Explorer:https://godbolt.org/z/bqh6EeP3M (llc-assertions-trunk, checked 2026-10-26 12:20 UTC): G reproduces

Snippet:

target triple = "riscv64-unknown-unknown-elf"

define void @test(ptr %addr) {
entry:
  %ret = alloca [3 x <vscale x 1 x double>], align 8
  %val = load [3 x <vscale x 1 x double>], ptr %addr, align 8
  store [3 x <vscale x 1 x double>] %val, ptr %ret, align 8
  ret void
}

Compiler Explorer panes:

PaneOptionsExitInstsstderr
GlobalISel-mtriple=riscv64 -mattr=+v -verify-machineinstrs -M no-aliases -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.*1340llc: /root/llvm-project/llvm/include/llvm/Support/TypeSize.h:202: constexpr llvm::details::FixedOrScalableQuantity<LeafTy, ValueTy>::ScalarTy llvm::details::FixedOrScalableQuantity<LeafTy, ValueTy>::getFixedValue() const [with LeafTy = llvm::TypeSize; ValueTy = long unsigned int; llvm::details::FixedOrScalableQuantity<LeafTy, ValueTy>::ScalarTy = long unsigned int]: Assertion `(!isScalable() || isZero()) && "Request for a fixed element count on a scalable object"' 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=+v -verify-machineinstrs -M no-aliases -global-isel=0024-

Reproduce:

llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs -M no-aliases -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs -M no-aliases -global-isel=0 snippet.ll -o -

Local llc output:

llc: /home/runner/work/llvm-fuzz/llvm-fuzz/llvm-project/llvm/include/llvm/Support/TypeSize.h:203: ScalarTy llvm::details::FixedOrScalableQuantity<llvm::TypeSize, unsigned long>::getFixedValue() const [LeafTy = llvm::TypeSize, ValueTy = unsigned long]: Assertion `(!isScalable() || isZero()) && "Request for a fixed element count on a scalable object"' 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=+v -verify-machineinstrs -M no-aliases -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 '@test'
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       0x00005627334729eb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1  llc       0x000056273346f9c1 llvm::sys::RunSignalHandlers() + 369
2  llc       0x000056273347346b
3  libc.so.6 0x00007f88b2445330
4  libc.so.6 0x00007f88b249ebec pthread_kill + 284
5  libc.so.6 0x00007f88b244527e gsignal + 30
6  libc.so.6 0x00007f88b24288ff abort + 223
7  libc.so.6 0x00007f88b242881b
8  libc.so.6 0x00007f88b243b517
9  llc       0x0000562731f16e5b llvm::computeValueLLTs(llvm::DataLayout const&, llvm::Type&, llvm::SmallVectorImpl<llvm::LLT>&, llvm::SmallVectorImpl<unsigned long>*, unsigned long) + 267
10 llc       0x0000562733d484f6 llvm::IRTranslatorImpl::getOrCreateVRegs(llvm::Value const&) + 454
11 llc       0x0000562733d4fea1 llvm::IRTranslatorImpl::translateLoad(llvm::User const&, llvm::MachineIRBuilder&) + 81
12 llc       0x0000562733d5f595 llvm::IRTranslatorImpl::translate(llvm::Instruction const&) + 485
13 llc       0x0000562733d621cd 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*) + 4205
14 llc       0x0000562733d631bd llvm::IRTranslatorLegacy::runOnMachineFunction(llvm::MachineFunction&) + 733
15 llc       0x00005627320ec6b1 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 513
16 llc       0x0000562732687b37 llvm::FPPassManager::runOnFunction(llvm::Function&) + 871
17 llc       0x0000562732690052 llvm::FPPassManager::runOnModule(llvm::Module&) + 50
18 llc       0x00005627326888e0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2000
19 llc       0x00005627318e3149
20 llc       0x00005627318e02d3 main + 1747
21 libc.so.6 0x00007f88b242a1ca
22 libc.so.6 0x00007f88b242a28b __libc_start_main + 139
23 llc       0x00005627318df3e5 _start + 37

Occurrences (3):

InputFunctionConfig
alloca-load-store-scalable-array.ll-mtriple=riscv64 -mattr=+v -verify-machineinstrs -M no-aliases
alloca-load-store-scalable-struct.ll-mtriple=riscv64 -mattr=+m,+d,+v -verify-machineinstrs -M no-aliases
alloca-load-store-scalable-array.863a66af3b.ll (mutant of alloca-load-store-scalable-array.ll)-mtriple=riscv64 -verify-machineinstrs -M no-aliases -mattr=+v,+zve64d -O1 -code-model=small

Generated 2026-11-29 14:49 UTC.