fallback: legalize: G_VECREDUCE_OR <N x i1>

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_VECREDUCE_OR <N x i1> M
Occurrences:5 in 3 configs, 1 test files, 23 more counted only
Snippet from:fixed-vectors-vreductions-mask.122a23e166.ll (mutant of fixed-vectors-vreductions-mask.ll) @vreduce_or_v2i1 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+m -O3
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.3 = external global i1

define zeroext i1 @vreduce_or_v2i1(<2 x i1> %v) {
  %red = call i1 @llvm.vector.reduce.or.v2i1(<2 x i1> %v)
  %C = icmp ne i1 %red, %red
  store i1 %C, ptr @G.3, align 1
  ret i1 %red
}

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

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %4:_(i1) = G_VECREDUCE_OR %0:_(<2 x i1>) (in function: vreduce_or_v2i1)
warning: Instruction selection used fallback path for vreduce_or_v2i1

Occurrences (5):

InputFunctionConfig
fixed-vectors-vreductions-mask.122a23e166.ll (mutant of fixed-vectors-vreductions-mask.ll)vreduce_or_v2i1-mtriple=riscv64 -verify-machineinstrs -mattr=+m -O3
fixed-vectors-vreductions-mask.122a23e166.ll (mutant of fixed-vectors-vreductions-mask.ll)vreduce_or_v1024i1-mtriple=riscv64 -verify-machineinstrs -mattr=+m -O3
fixed-vectors-vreductions-mask.478762f31c.ll (mutant of fixed-vectors-vreductions-mask.ll)vreduce_or_v128i1-mtriple=riscv32 -verify-machineinstrs -mattr=+m -O1
fixed-vectors-vreductions-mask.8d4b64e2f8.ll (mutant of fixed-vectors-vreductions-mask.ll)vreduce_or_v2i1-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v,+zfhmin -O2
fixed-vectors-vreductions-mask.8d4b64e2f8.ll (mutant of fixed-vectors-vreductions-mask.ll)vreduce_or_v512i1-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+v,+zfhmin -O2

Generated 2026-11-29 14:49 UTC.