fallback: legalize: G_SEXTLOAD s32,p10,s16

Run:explore-04ca53e65f-20261014-114124
Kind:fallback
Category:legalize: G_SEXTLOAD s32,p10,s16 NEW
Occurrences:1 in 1 configs, 1 test files
Snippet from:addrspacecast.0f51e39d62.ll (mutant of addrspacecast.ll) @cast1 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs
Local check:reproduces at 04ca53e65f
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i8

define void @cast1(ptr %ptr) {
  %LGV = load i8, ptr @G, align 1
  %castptr = addrspacecast ptr %ptr to ptr addrspace(10)
  %L = load i16, ptr addrspace(10) %castptr, align 2
  %B = ashr i8 0, %LGV
  %G = getelementptr ptr addrspace(10), ptr %ptr, i16 %L
  call void @foo(ptr addrspace(10) %castptr)
  store ptr %G, ptr poison, align 8
  store i8 %B, ptr @G, align 1
  ret void
}

declare void @foo(ptr addrspace(10))

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %7:_(s32) = G_SEXTLOAD %3:_(p10) :: (load (s16) from %ir.castptr, addrspace 10) (in function: cast1)
warning: Instruction selection used fallback path for cast1

Occurrences (1):

InputFunctionConfig
addrspacecast.0f51e39d62.ll (mutant of addrspacecast.ll)cast1-mtriple=riscv32 -verify-machineinstrs

Generated 2026-10-15 08:05 UTC.