[RISCV] Unify scalable- and fixed-vector EXTRACT_SUBVECTOR lowering
authorFraser Cormack <fraser@codeplay.com>
Mon, 22 Feb 2021 14:14:10 +0000 (14:14 +0000)
committerFraser Cormack <fraser@codeplay.com>
Thu, 25 Feb 2021 11:46:57 +0000 (11:46 +0000)
commit821f8bb29a8967fc1dc6520fda4a2b94b9c7ea0d
treeb0a07a1b517463abfc56d647c9afb49d61e67ad6
parentd0a6f8bb6568979e986eb4b8938dba537e75db7b
[RISCV] Unify scalable- and fixed-vector EXTRACT_SUBVECTOR lowering

This patch unifies the two disparate paths for lowering
EXTRACT_SUBVECTOR operations under one roof. Consequently, with this
patch it is possible to support any fixed-length subvector extraction,
not just "cast-like" ones.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D97192
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll [new file with mode: 0644]