fallback: legalize: G_INSERT_VECTOR_ELT <N x f16>

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_INSERT_VECTOR_ELT <N x f16> M
Occurrences:3 in 3 configs, 2 test files, 17 more counted only
Snippet from:insertelt-fp-soft-promote.ecb1d5c17c.ll (mutant of insertelt-fp-soft-promote.ll) @insertelt_v4f16_idx via llvm-extract
Config:-mtriple=riscv64 -target-abi=lp64d -mattr=+zvfhmin,+zvfbfmin -O1 -verify-machineinstrs
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.3 = external global double
@G.4 = external global double

define <4 x half> @insertelt_v4f16_idx(<4 x half> %v, half %elt, i32 zeroext %idx) {
  %LGV1 = load double, ptr @G.4, align 8
  %LGV = load double, ptr @G.3, align 8
  %r = insertelement <4 x half> %v, half %elt, i32 %idx
  %B = fsub double %LGV, %LGV1
  store double %B, ptr @G.4, align 8
  ret <4 x half> %r
}

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %13:_(<4 x f16>) = G_INSERT_VECTOR_ELT %0:_, %1:_(f16), %8:_(i64) (in function: insertelt_v4f16_idx)
warning: Instruction selection used fallback path for insertelt_v4f16_idx

Occurrences (3):

InputFunctionConfig
fp-fcanonicalize.de01979b04.ll (mutant of fp-fcanonicalize.ll)fcanonicalize_v4f16_nnan--mtriple=riscv32 -mattr=+d,+zfh,+v,+zbb -O2 -code-model=small -verify-machineinstrs
fp-fcanonicalize.ef0aaa6a39.ll (mutant of fp-fcanonicalize.ll)fcanonicalize_v4f16_nnan--mtriple=riscv32 -mattr=+d,+zfh,+zihintpause -O3 -code-model=medium -verify-machineinstrs
insertelt-fp-soft-promote.ecb1d5c17c.ll (mutant of insertelt-fp-soft-promote.ll)insertelt_v4f16_idx-mtriple=riscv64 -target-abi=lp64d -mattr=+zvfhmin,+zvfbfmin -O1 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.