fallback: legalize: G_VECREDUCE_FMAXIMUM <N x f16>

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_VECREDUCE_FMAXIMUM <N x f16> M
Occurrences:3 in 3 configs, 1 test files, 13 more counted only
Snippet from:fixed-vectors-reduction-fp.b85002b2e5.ll (mutant of fixed-vectors-reduction-fp.ll) @vreduce_fmaximum_v128f16_nonans via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d -O2
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.2 = external global i1

define half @vreduce_fmaximum_v128f16_nonans(ptr %x) {
  %LGV1 = load i1, ptr @G.2, align 1
  %G = getelementptr ptr, ptr %x, i1 %LGV1
  %v = load <128 x half>, ptr %x, align 256
  %red = call nnan half @llvm.vector.reduce.fmaximum.v128f16(<128 x half> %v)
  store ptr %G, ptr poison, align 8
  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=riscv32 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d -O2 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d -O2 -global-isel=0 snippet.ll -o -

Local llc output:

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

Occurrences (3):

InputFunctionConfig
fixed-vectors-reduction-fp.92d97e931f.ll (mutant of fixed-vectors-reduction-fp.ll)vreduce_fmaximum_v128f16-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+v,+zfh,+zvfh,+f,+d -O2
fixed-vectors-reduction-fp.b85002b2e5.ll (mutant of fixed-vectors-reduction-fp.ll)vreduce_fmaximum_v128f16_nonans-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zfh,+zvfhmin,+f,+d -O2
fixed-vectors-reduction-fp.d472028377.ll (mutant of fixed-vectors-reduction-fp.ll)vreduce_fmaximum_v64f16-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+v,+zfh,+zvfh,+f,+d -O1

Generated 2026-11-29 14:49 UTC.