[all-commits] [llvm/llvm-project] 463412: [RISCV] Add test case showing duplicated reduction...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Apr 24 18:20:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 463412e930b248dab06e0f51d92a8cf0e71072fc
      https://github.com/llvm/llvm-project/commit/463412e930b248dab06e0f51d92a8cf0e71072fc
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-04-24 (Mon, 24 Apr 2023)

  Changed paths:
    M llvm/test/CodeGen/RISCV/rvv/fold-binary-reduce.ll

  Log Message:
  -----------
  [RISCV] Add test case showing duplicated reduction due to missing one use check. NFC

We don't check that the extract_vector_elt has one use in combineBinOpToReduce.


  Commit: faa2d69e462146543e168cc6c36a28a7e238ecce
      https://github.com/llvm/llvm-project/commit/faa2d69e462146543e168cc6c36a28a7e238ecce
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-04-24 (Mon, 24 Apr 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fold-binary-reduce.ll

  Log Message:
  -----------
  [RISCV] Ensure extract_vector_elt has a single use in combineBinOpToReduce.

Without this, the original reduction will not be removed and we'll
end up with a second reduction. Reductions are expensive operations so
we should avoid that.


Compare: https://github.com/llvm/llvm-project/compare/09bd5ae49ea8...faa2d69e4621


More information about the All-commits mailing list