[all-commits] [llvm/llvm-project] 8d7e73: [RISCV] Teach lowerVECTOR_SHUFFLE to recognize som...
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue Sep 13 11:07:31 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8d7e73effe860286dabfca5702d8e8efc9d43cd4
https://github.com/llvm/llvm-project/commit/8d7e73effe860286dabfca5702d8e8efc9d43cd4
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-09-13 (Tue, 13 Sep 2022)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/lib/Target/RISCV/RISCVISelLowering.h
M llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-buildvec.ll
A llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shufflevector-vnsrl.ll
Log Message:
-----------
[RISCV] Teach lowerVECTOR_SHUFFLE to recognize some shuffles as vnsrl.
Unary shuffles such as <0,2,4,6,8,10,12,14> or <1,3,5,7,9,11,13,15>
where half the elements are returned, can be lowered using vnsrl.
SelectionDAGBuilder lowers such shuffles as a build_vector of
extract_elements since the mask has less elements than the source.
To fix this, I've enable the extractSubvectorIsCheapHook to allow
DAGCombine to rebuild the shuffle using 2 extract_subvectors preceding
the shufffle.
I've gone very conservative on extractSubvectorIsCheapHook to minimize
test impact and match what we have test coverage for. This can be
improved in the future.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D133736
More information about the All-commits
mailing list