[all-commits] [llvm/llvm-project] b7166e: [RISCV] Combine extract_vector_elt followed by VFM...
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue Jan 24 17:16:32 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b7166e252448187f69fe7838b77cfaa1e6982e36
https://github.com/llvm/llvm-project/commit/b7166e252448187f69fe7838b77cfaa1e6982e36
Author: Craig Topper <craig.topper at sifive.com>
Date: 2023-01-24 (Tue, 24 Jan 2023)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp-vp.ll
M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp.ll
M llvm/test/CodeGen/RISCV/rvv/vreductions-fp-vp.ll
Log Message:
-----------
[RISCV] Combine extract_vector_elt followed by VFMV_S_F_VL.
If we're extracting an element and inserting into a undef vector
with the same number of elements, we can use the original vector.
This pattern occurs around reductions that have been cascaded
together.
This can be generalized to wider/narrow vectors by using
insert_subvector/extract_subvector, but we don't have lit tests
for that case currently.
We can also support non-undef before by using a slide or vmv.v.v
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D142264
More information about the All-commits
mailing list