[all-commits] [llvm/llvm-project] 033139: [RISCV] Support scalable-vector masked gather oper...

Fraser Cormack via All-commits all-commits at lists.llvm.org
Thu Mar 18 02:33:18 PDT 2021


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

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.h
    A llvm/test/CodeGen/RISCV/rvv/mgather-sdnode.ll

  Log Message:
  -----------
  [RISCV] Support scalable-vector masked gather operations

This patch supports the masked gather intrinsics in RVV.

The RVV indexed load/store instructions only support the "unsigned unscaled"
addressing mode; indices are implicitly zero-extended or truncated to XLEN and
are treated as byte offsets. This ISA supports the intrinsics directly, but not
the majority of various forms of the MGATHER SDNode that LLVM combines to. Any
signed or scaled indexing is extended to the XLEN value type and scaled
accordingly. This is done during DAG combining as widening the index types to
XLEN may produce illegal vectors that require splitting, e.g.
nxv16i8->nxv16i64.

Support for scalable-vector CONCAT_VECTORS was added to avoid spilling via the
stack when lowering split legalized index operands.

Reviewed By: craig.topper

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




More information about the All-commits mailing list