[RISCV] Add cost model for fixed broadcast shuffle
authorShihPo Hung <shihpo.hung@sifive.com>
Wed, 30 Nov 2022 12:58:52 +0000 (04:58 -0800)
committerShihPo Hung <shihpo.hung@sifive.com>
Wed, 30 Nov 2022 12:58:52 +0000 (04:58 -0800)
commit0e6f0b7cc38391f3365a862266a8aef50d093135
tree014695363823f32a97698a691cd154953b110b02
parentbb1eca6bbb470e4fea111f4a6929be6f7a4524b3
 [RISCV] Add cost model for fixed broadcast shuffle

This patch adds basic broadcast shuffle costs in order to enable SLP vectorization.
And adds `getLMULCost` to consider reciprocal throughput for different LMUL.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D137276
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
llvm/test/Analysis/CostModel/RISCV/fixed-shuffle-broadcast.ll [new file with mode: 0644]