fallback: legalize: G_VECREDUCE_FMAXIMUM <N x f16>

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:legalize: G_VECREDUCE_FMAXIMUM <N x f16> M
Occurrences:3 in 3 configs, 1 test files, 4 more counted only
Snippet from:fixed-vectors-reduction-fp.698eaa4590.ll (mutant of fixed-vectors-reduction-fp.ll) @vreduce_fmaximum_v128f16 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d,+zve32x -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.5 = external global i16

define half @vreduce_fmaximum_v128f16(ptr %x) {
  %LGV = load i16, ptr @G.5, align 2
  %v = load <128 x half>, ptr %x, align 256
  %B = sub i16 0, %LGV
  %red = call half @llvm.vector.reduce.fmaximum.v128f16(<128 x half> %v)
  store i16 %B, ptr poison, align 2
  ret half %red
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare half @llvm.vector.reduce.fmaximum.v128f16(<128 x half>) #0

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

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d,+zve32x -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d,+zve32x -O0 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %6:_(f16) = G_VECREDUCE_FMAXIMUM %3:_(<128 x f16>) (in function: vreduce_fmaximum_v128f16)
warning: Instruction selection used fallback path for vreduce_fmaximum_v128f16

Occurrences (3):

InputFunctionConfig
fixed-vectors-reduction-fp.04fd429025.ll (mutant of fixed-vectors-reduction-fp.ll)vreduce_fmaximum_v128f16-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d,+zfa,+c -O2
fixed-vectors-reduction-fp.307c76de24.ll (mutant of fixed-vectors-reduction-fp.ll)vreduce_fmaximum_v64f16-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d,+zvfh -O0
fixed-vectors-reduction-fp.698eaa4590.ll (mutant of fixed-vectors-reduction-fp.ll)vreduce_fmaximum_v128f16-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d,+zve32x -O0

Generated 2026-11-29 14:49 UTC.