fallback: legalize: G_VECREDUCE_ADD <N x i8>

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:legalize: G_VECREDUCE_ADD <N x i8> M
Occurrences:3 in 2 configs, 1 test files, 12 more counted only
Snippet from:fixed-vectors-reduction-int.45f990726b.ll (mutant of fixed-vectors-reduction-int.ll) @vreduce_add_v4i8 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+v,+xtheadba -O1
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define i8 @vreduce_add_v4i8(ptr %x) {
  %C = icmp eq i1 true, true
  %v = load <4 x i8>, ptr %x, align 4
  %red = call i8 @llvm.vector.reduce.add.v4i8(<4 x i8> %v)
  store i1 %C, ptr poison, align 1
  ret i8 %red
}

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

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

Reproduce:

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

Local llc output:

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

Occurrences (3):

InputFunctionConfig
fixed-vectors-reduction-int.45f990726b.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_add_v4i8-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+v,+xtheadba -O1
fixed-vectors-reduction-int.45f990726b.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_add_v256i8-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+v,+xtheadba -O1
fixed-vectors-reduction-int.c9ef01cd28.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_add_v32i8-mtriple=riscv64 -verify-machineinstrs -mattr=+m -O1

Generated 2026-11-29 14:49 UTC.