[all-commits] [llvm/llvm-project] bd4d42: [RISCV] Support EXTRACT_SUBVECTOR on vector masks

Fraser Cormack via All-commits all-commits at lists.llvm.org
Mon Mar 1 03:26:52 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bd4d4216881d2ddba170808a8cd2f7b75cbc8de9
      https://github.com/llvm/llvm-project/commit/bd4d4216881d2ddba170808a8cd2f7b75cbc8de9
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-03-01 (Mon, 01 Mar 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/extract-subvector.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll

  Log Message:
  -----------
  [RISCV] Support EXTRACT_SUBVECTOR on vector masks

This patch adds support for extracting subvectors from vector masks.
This can be either extracting a scalable vector from another, or a fixed-length
vector from a fixed-length or scalable vector.

Since RVV lacks a way to slide vector masks down on an element-wise
basis and we don't know the true length of the vector registers, in many
cases we must resort to using equivalently-sized i8 vectors to perform
the operation. When this is not possible we fall back and extend to a
suitable i8 vector.

Support was also added for fixed-length truncation to mask types.

Reviewed By: craig.topper

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




More information about the All-commits mailing list