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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll | ||
---|---|---|
28 | Should we be using a VL of 8 here? |
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll | ||
---|---|---|
74 | The elements we're looking for aren't guaranteed to be in v27. We only know the minimum width of a register is 128 bits. It might be 256 bits or more. In which case all 8 elements are all in v26. I think we have to always slide down to 0 using the full lmul. |
- rebase
- fix codegen for fixed-length types
- add tests for extraction from scalable to fixed-length types
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll | ||
---|---|---|
28 | Based on a conversation with Andrew Waterman I had yesterday, the VL for the slidedown should just cover the elements we care about. Especially when the input LMUL > 1 and the output is LMUL <= 1. The smaller VL would allow the computation for the upper registers to be skipped. It still could be beneficial on CPUs with ALUs narrower than the VLEN. |
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll | ||
---|---|---|
28 | Ah that's interesting, thanks. I've updated the VL for the fixed-length lowering accordingly. |
Should we be using a VL of 8 here?