fallback: legalize: G_VECREDUCE_UMIN <N x i16>

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:legalize: G_VECREDUCE_UMIN <N x i16> M
Occurrences:4 in 4 configs, 2 test files, 10 more counted only
Snippet from:fixed-vectors-reduction-int-vp.00a72dc714.ll (mutant of fixed-vectors-reduction-int-vp.ll) @vpreduce_umin_v4i16 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -O2
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.5 = external global i16

define signext i16 @vpreduce_umin_v4i16(i16 signext %s, <4 x i16> %v, <4 x i1> %m, i32 zeroext %evl) {
  %B = sub i16 -1, %s
  %r = call i16 @llvm.vp.reduce.umin.v4i16(i16 %s, <4 x i16> %v, <4 x i1> %m, i32 %evl)
  store i16 %B, ptr @G.5, align 2
  ret i16 %r
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vp.reduce.umin.v4i16(i16, <4 x i16>, <4 x i1>, i32) #0

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

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -O2 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -O2 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %27:_(i16) = G_VECREDUCE_UMIN %25:_(<4 x i16>) (in function: vpreduce_umin_v4i16)
warning: Instruction selection used fallback path for vpreduce_umin_v4i16

Occurrences (4):

InputFunctionConfig
fixed-vectors-reduction-int-vp.00a72dc714.ll (mutant of fixed-vectors-reduction-int-vp.ll)vpreduce_umin_v4i16-mtriple=riscv64 -verify-machineinstrs -O2
fixed-vectors-reduction-int.27934c76b5.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_umin_v2i16-mtriple=riscv32 -verify-machineinstrs -O3
fixed-vectors-reduction-int.94de87f01c.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_umin_v128i16-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+v -O0 -code-model=small
fixed-vectors-reduction-int.b9899a2db0.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_umin_v32i16-mtriple=riscv64 -verify-machineinstrs -mattr=+m -O3 -code-model=medium

Generated 2026-11-29 14:49 UTC.