fallback: legalize: G_VECREDUCE_SMIN <N x i16>

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:legalize: G_VECREDUCE_SMIN <N x i16> M
Occurrences:5 in 5 configs, 2 test files, 3 more counted only
Snippet from:fixed-vectors-reduction-int.032dc3ab0b.ll (mutant of fixed-vectors-reduction-int.ll) @vreduce_smin_v4i16 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v -O1
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.4 = external global i1

define i16 @vreduce_smin_v4i16(ptr %x) {
  %LGV = load i1, ptr @G.4, align 1
  %v = load <4 x i16>, ptr %x, align 8
  %red = call i16 @llvm.vector.reduce.smin.v4i16(<4 x i16> %v)
  %C = icmp sge i1 %LGV, false
  store i1 %C, ptr poison, align 1
  ret i16 %red
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.smin.v4i16(<4 x i16>) #0

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

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v -O1 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v -O1 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %4:_(i16) = G_VECREDUCE_SMIN %3:_(<4 x i16>) (in function: vreduce_smin_v4i16)
warning: Instruction selection used fallback path for vreduce_smin_v4i16

Occurrences (5):

InputFunctionConfig
fixed-vectors-reduction-int-vp.0d95c54044.ll (mutant of fixed-vectors-reduction-int-vp.ll)vpreduce_smin_v4i16-mtriple=riscv32 -verify-machineinstrs -O3
fixed-vectors-reduction-int-vp.9a3dde88c5.ll (mutant of fixed-vectors-reduction-int-vp.ll)vpreduce_smin_v2i16-mtriple=riscv32 -verify-machineinstrs -O0
fixed-vectors-reduction-int.032dc3ab0b.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_smin_v4i16-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v -O1
fixed-vectors-reduction-int.21d346ec64.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_smin_v128i16-mtriple=riscv32 -verify-machineinstrs -mattr=+m -O1
fixed-vectors-reduction-int.ae5e154994.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_smin_v16i16-mtriple=riscv64 -verify-machineinstrs -O2

Generated 2026-11-29 14:49 UTC.