fallback: legalize: G_FMAXNUM <N x f16>

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_FMAXNUM <N x f16> M
Occurrences:6 in 4 configs, 2 test files, 10 more counted only
Snippet from:fixed-vectors-vfmax-vp.4997e68f7d.ll (mutant of fixed-vectors-vfmax-vp.ll) @vfmax_vv_v2f16 via llvm-extract
Config:-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+d,+v,+zvkb -O3
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global <2 x half>

define <2 x half> @vfmax_vv_v2f16(<2 x half> %va, <2 x half> %vb, <2 x i1> %m, i32 zeroext %evl) {
  %B = fsub <2 x half> %va, %va
  %v = call <2 x half> @llvm.maxnum.v2f16(<2 x half> %va, <2 x half> %vb)
  store <2 x half> %B, ptr @G, align 4
  ret <2 x half> %v
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x half> @llvm.maxnum.v2f16(<2 x half>, <2 x half>) #0

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

Reproduce:

llc -mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+d,+v,+zvkb -O3 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+d,+v,+zvkb -O3 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %14:_(<2 x f16>) = G_FMAXNUM %0:_, %1:_ (in function: vfmax_vv_v2f16)
warning: Instruction selection used fallback path for vfmax_vv_v2f16

Occurrences (6):

InputFunctionConfig
fixed-vectors-vfmax-vp.4997e68f7d.ll (mutant of fixed-vectors-vfmax-vp.ll)vfmax_vv_v2f16-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+d,+v,+zvkb -O3
fixed-vectors-vfmax-vp.b379d673b6.ll (mutant of fixed-vectors-vfmax-vp.ll)vfmax_vv_v4f16_unmasked-mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+d,+v,+zicsr -O2
fixed-vectors-vfmax-vp.b379d673b6.ll (mutant of fixed-vectors-vfmax-vp.ll)vfmax_vv_v8f16_unmasked-mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+d,+v,+zicsr -O2
fixed-vectors-vfmax.a698257b0d.ll (mutant of fixed-vectors-vfmax.ll)vfmax_v2f16_fv-mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+d,+zfh,+zvfh,+zvfbfmin -O2
fixed-vectors-vfmax.a698257b0d.ll (mutant of fixed-vectors-vfmax.ll)vfmax_v4f16_vf-mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+d,+zfh,+zvfh,+zvfbfmin -O2
fixed-vectors-vfmax.b62713d8bd.ll (mutant of fixed-vectors-vfmax.ll)vfmax_v4f16_vf-mtriple=riscv64 -verify-machineinstrs -mattr=+d,+zfh,+experimental-zvfbfa,+v,+zfhmin -O2

Generated 2026-11-29 14:49 UTC.