fallback: legalize: G_INSERT_VECTOR_ELT <N x p0>,p0

Run:main-b577f07195-20261129-101839
Kind:fallback
Category:legalize: G_INSERT_VECTOR_ELT <N x p0>,p0 M
Occurrences:2 in 2 configs, 1 test files
Snippet from:fixed-vectors-masked-scatter.5217810880.ll (mutant of fixed-vectors-masked-scatter.ll) @mscatter_v4bf16 via llvm-extract
Config:-mtriple=riscv64 -mattr=+m,+d,+zfhmin,+zvfhmin,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b -target-abi=lp64d -verify-machineinstrs
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global ptr
@G.74 = external global <4 x ptr>

define void @mscatter_v4bf16(<4 x bfloat> %val, <4 x ptr> %ptrs, <4 x i1> %m) {
  %LGV = load ptr, ptr @G, align 8
  call void @llvm.masked.scatter.v4bf16.v4p0(<4 x bfloat> %val, <4 x ptr> align 2 %ptrs, <4 x i1> %m)
  %I = insertelement <4 x ptr> %ptrs, ptr %LGV, i16 1
  store <4 x ptr> %I, ptr @G.74, align 32
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(write)
declare void @llvm.masked.scatter.v4bf16.v4p0(<4 x bfloat>, <4 x ptr>, <4 x i1>) #0

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(write) }

Reproduce:

llc -mtriple=riscv64 -mattr=+m,+d,+zfhmin,+zvfhmin,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b -target-abi=lp64d -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -mattr=+m,+d,+zfhmin,+zvfhmin,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b -target-abi=lp64d -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %34:_(<4 x p0>) = G_INSERT_VECTOR_ELT %1:_, %6:_(p0), %20:_(i64) (in function: mscatter_v4bf16)
warning: Instruction selection used fallback path for mscatter_v4bf16

Occurrences (2):

InputFunctionConfig
fixed-vectors-masked-scatter.5217810880.ll (mutant of fixed-vectors-masked-scatter.ll)mscatter_v4bf16-mtriple=riscv64 -mattr=+m,+d,+zfhmin,+zvfhmin,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b -target-abi=lp64d -verify-machineinstrs
fixed-vectors-masked-scatter.8882c968f9.ll (mutant of fixed-vectors-masked-scatter.ll)mscatter_v4bf16-mtriple=riscv64 -mattr=+m,+d,+zvfh,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b -target-abi=lp64d -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.