[all-commits] [llvm/llvm-project] 7a0b9d: [RISCV] Generaize reduction tree matching to all i...

Philip Reames via All-commits all-commits at lists.llvm.org
Tue Oct 3 07:34:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a0b9daac9edde4293d2e9fdf30d8b35c04d16a6
      https://github.com/llvm/llvm-project/commit/7a0b9daac9edde4293d2e9fdf30d8b35c04d16a6
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2023-10-03 (Tue, 03 Oct 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-explodevector.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-formation.ll

  Log Message:
  -----------
  [RISCV] Generaize reduction tree matching to all integer reductions (#68014)

This builds on the transform introduced in
https://github.com/llvm/llvm-project/pull/67821, and generalizes it for
all integer reduction types.

A couple of notes:
* This will only form smax/smin/umax/umin reductions when zbb is
enabled. Otherwise, we lower the min/max expressions early. I don't care
about this case, and don't plan to address this further.
* This excludes floating point. Floating point introduces concerns about
associativity. I may or may not do a follow up patch for that case.
* The explodevector test change is mildly undesirable from a clarity
perspective. If anyone sees a good way to rewrite that to stablize the
test, please suggest.




More information about the All-commits mailing list