fallback: legalize: G_VECREDUCE_XOR <N x i8>

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_VECREDUCE_XOR <N x i8> M
Occurrences:3 in 3 configs, 1 test files, 5 more counted only
Snippet from:fixed-vectors-reduction-int.5eae05ffb5.ll (mutant of fixed-vectors-reduction-int.ll) @vreduce_xor_v2i8 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v,+xtheadba,+zve64d -O1
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i8

define i8 @vreduce_xor_v2i8(ptr %x) {
  %A = alloca i8, align 1
  store i8 poison, ptr %A, align 1
  %LGV = load i8, ptr @G, align 1
  %B = udiv i8 42, %LGV
  %v = load <2 x i8>, ptr %x, align 2
  %red = call i8 @llvm.vector.reduce.xor.v2i8(<2 x i8> %v)
  store i8 %B, ptr %A, align 1
  ret i8 %red
}

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

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %8:_(i8) = G_VECREDUCE_XOR %7:_(<2 x i8>) (in function: vreduce_xor_v2i8)
warning: Instruction selection used fallback path for vreduce_xor_v2i8

Occurrences (3):

InputFunctionConfig
fixed-vectors-reduction-int.2ff16e762f.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_xor_v64i8-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v -O1
fixed-vectors-reduction-int.5eae05ffb5.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_xor_v2i8-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v,+xtheadba,+zve64d -O1
fixed-vectors-reduction-int.827a9eaeef.ll (mutant of fixed-vectors-reduction-int.ll)vreduce_xor_v64i8-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v -O3 -code-model=medium

Generated 2026-11-29 14:49 UTC.