[all-commits] [llvm/llvm-project] 84413e: [RISCV] Support fixed-length vector truncates

Fraser Cormack via All-commits all-commits at lists.llvm.org
Thu Feb 25 04:18:03 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84413e1947427a917a3e55abfc1f66c42adc751b
      https://github.com/llvm/llvm-project/commit/84413e1947427a917a3e55abfc1f66c42adc751b
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-02-25 (Thu, 25 Feb 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
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-exttrunc.ll

  Log Message:
  -----------
  [RISCV] Support fixed-length vector truncates

This patch extends support for our custom-lowering of scalable-vector
truncates to include those of fixed-length vectors. It does this by
co-opting the custom RISCVISD::TRUNCATE_VECTOR node and adding mask and
VL operands. This avoids unnecessary duplication of patterns and
inflation of the ISel table.

Some truncates go through CONCAT_VECTORS which currently isn't
efficiently handled, as it goes through the stack. This can be improved
upon in the future.

Reviewed By: craig.topper

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




More information about the All-commits mailing list