[all-commits] [llvm/llvm-project] 77ac31: [RISCV] Add support for fixed vector reductions.

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Mar 9 09:41:18 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77ac3166e59f14dee8301c7770882885fb2cbfa3
      https://github.com/llvm/llvm-project/commit/77ac3166e59f14dee8301c7770882885fb2cbfa3
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-03-09 (Tue, 09 Mar 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.h
    M llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
    M llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
    A llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp.ll
    A llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int.ll

  Log Message:
  -----------
  [RISCV] Add support for fixed vector reductions.

I've included tests that require type legalization to split the
vector. The i64 version of these scalarizes on RV32 due to type
legalization visiting the result before the vector type. So we
have to abort our custom expansion to avoid creating target
specific nodes with an illegal type. Then type legalization ends
up scalarizing. We might be able to fix this by doing custom
splitting for large vectors in our handler to get down to a legal
type.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D98102




More information about the All-commits mailing list