fallback: legalize: G_VECREDUCE_AND s32,<4 x s32>

Run:explore-04ca53e65f-20261014-114124
Kind:fallback
Category:legalize: G_VECREDUCE_AND s32,<4 x s32>
Occurrences:4 in 2 configs, 1 test files
Snippet from:double_reduct.ll @and_i32 via llvm-extract
Config:-mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=ilp32d -verify-machineinstrs
Local check:reproduces at 04ca53e65f
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define i32 @and_i32(<4 x i32> %a, <4 x i32> %b) {
  %r1 = call i32 @llvm.vector.reduce.and.v4i32(<4 x i32> %a)
  %r2 = call i32 @llvm.vector.reduce.and.v4i32(<4 x i32> %b)
  %r = and i32 %r1, %r2
  ret i32 %r
}

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

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

Reproduce:

llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=ilp32d -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=ilp32d -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %5:_(s32) = G_VECREDUCE_AND %1:_(<4 x s32>) (in function: and_i32)
warning: Instruction selection used fallback path for and_i32

Occurrences (4):

InputFunctionConfig
double_reduct.lland_i32-mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=ilp32d -verify-machineinstrs
double_reduct.lland_i32-mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d -verify-machineinstrs
double_reduct.eec746ea63.ll (mutant of double_reduct.ll)and_i32-mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=ilp32d -verify-machineinstrs
double_reduct.f06241b276.ll (mutant of double_reduct.ll)and_i32-mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d -verify-machineinstrs

Generated 2026-10-15 08:05 UTC.