fallback: legalize: G_VECREDUCE_ADD <N x i32>

Run:main-b577f07195-20261129-101839
Kind:fallback
Category:legalize: G_VECREDUCE_ADD <N x i32>
Occurrences:109 in 19 configs, 9 test files
Snippet from:vecreduce-add-constant-fold.ll @test_const via llvm-extract
Config:-mtriple=riscv64 -mattr=+v -verify-machineinstrs
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define i32 @test_const() {
  %r = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> <i32 1, i32 2, i32 3, i32 4>)
  ret i32 %r
}

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

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

Reproduce:

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

Local llc output:

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

Occurrences (109) (first 15):

InputFunctionConfig
double_reduct.lladd_i32-mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=ilp32d -verify-machineinstrs
double_reduct.lladd_i32-mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d -verify-machineinstrs
combine-reduce-add-to-vcpop.lltest_v2i1-mtriple=riscv32 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v4i1-mtriple=riscv32 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v8i1-mtriple=riscv32 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v16i1-mtriple=riscv32 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v32i1-mtriple=riscv32 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v64i1-mtriple=riscv32 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v128i1-mtriple=riscv32 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v256i1-mtriple=riscv32 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v2i1-mtriple=riscv64 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v4i1-mtriple=riscv64 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v8i1-mtriple=riscv64 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v16i1-mtriple=riscv64 -mattr=+v,+zbb
combine-reduce-add-to-vcpop.lltest_v32i1-mtriple=riscv64 -mattr=+v,+zbb

Generated 2026-11-29 14:49 UTC.