fallback: legalize: G_INSERT_SUBVECTOR <vscale x 2 x s16>,<4 x s16>

Run:explore-bc8218b282-20261015-075519
Kind:fallback
Category:legalize: G_INSERT_SUBVECTOR <vscale x 2 x s16>,<4 x s16> NEW
Occurrences:4 in 2 configs, 2 test files
Snippet from:smulh.9211ef6e3c.ll (mutant of smulh.ll) @smulh_v4i16 via llvm-extract
Config:-mtriple=riscv64 -mattr=+m,+v
Local check:reproduces at bc8218b282
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.4 = external global <4 x i16>

; Function Attrs: nounwind
define <4 x i16> @smulh_v4i16(<4 x i16> %x, <4 x i16> %y) #0 {
  %S = shufflevector <4 x i16> %y, <4 x i16> %x, <4 x i32> poison
  %r = call <4 x i16> @llvm.smulh.v4i16(<4 x i16> %x, <4 x i16> %y)
  store <4 x i16> %S, ptr @G.4, align 8
  ret <4 x i16> %r
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i16> @llvm.smulh.v4i16(<4 x i16>, <4 x i16>) #1

attributes #0 = { nounwind }
attributes #1 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %12:_(<vscale x 2 x s16>) = G_INSERT_SUBVECTOR %11:_, %4:_(<4 x s16>), 0 (in function: smulh_v4i16)
warning: Instruction selection used fallback path for smulh_v4i16

Occurrences (4):

InputFunctionConfig
smulh.9211ef6e3c.ll (mutant of smulh.ll)smulh_v4i16-mtriple=riscv64 -mattr=+m,+v
smulh.fd4469f2c3.ll (mutant of smulh.ll)smulh_v4i16-mtriple=riscv32 -mattr=+m,+v
umulh.0875b967dc.ll (mutant of umulh.ll)umulh_v4i16-mtriple=riscv64 -mattr=+m,+v
umulh.9715c22551.ll (mutant of umulh.ll)umulh_v4i16-mtriple=riscv32 -mattr=+m,+v

Generated 2026-10-15 08:05 UTC.