[all-commits] [llvm/llvm-project] c3652b: [VectorCombine] Fold zero tests of or/umax reducti...

hanbeom via All-commits all-commits at lists.llvm.org
Thu Jun 25 18:24:50 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c3652ba4ade988b0f6ec7a5f205c31e2fffe5a31
      https://github.com/llvm/llvm-project/commit/c3652ba4ade988b0f6ec7a5f205c31e2fffe5a31
  Author: hanbeom <kese111 at gmail.com>
  Date:   2026-06-26 (Fri, 26 Jun 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/AArch64/fold-equivalent-reduction-cmp.ll
    M llvm/test/Transforms/VectorCombine/AArch64/fold-reduce-add-cmp-zero.ll
    M llvm/test/Transforms/VectorCombine/AArch64/fold-signbit-reduction-cmp.ll
    M llvm/test/Transforms/VectorCombine/AArch64/icmp-vector-reduce.ll
    M llvm/test/Transforms/VectorCombine/RISCV/fold-equivalent-reduction-cmp.ll
    M llvm/test/Transforms/VectorCombine/RISCV/fold-reduce-add-cmp-zero.ll
    M llvm/test/Transforms/VectorCombine/RISCV/fold-signbit-reduction-cmp.ll
    M llvm/test/Transforms/VectorCombine/RISCV/icmp-vector-reduce.ll
    M llvm/test/Transforms/VectorCombine/X86/fold-equivalent-reduction-cmp.ll
    A llvm/test/Transforms/VectorCombine/X86/fold-reduction-zero-test.ll
    M llvm/test/Transforms/VectorCombine/X86/fold-signbit-reduction-cmp.ll
    M llvm/test/Transforms/VectorCombine/X86/icmp-vector-reduce.ll

  Log Message:
  -----------
  [VectorCombine] Fold zero tests of or/umax reductions (#205622)

Recognize equality and inequality tests against zero on vector.reduce.or
and vector.reduce.umax. When profitable, replace the scalar reduction
and
compare with a lane-wise comparison followed by an i1 reduce.or or
reduce.and.

Run the existing zero-preserving reduction fold first to retain its more
specific canonicalization opportunities.

Proof: https://alive2.llvm.org/ce/z/pyoTwP
Fixed https://github.com/llvm/llvm-project/issues/205028



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list