[llvm] [RISCV] Add cost modeling for Zvzip 0.3 (PR #224991)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 22:18:41 PDT 2026


================
@@ -229,6 +229,26 @@ LLVM_ABI bool getShuffleDemandedElts(int SrcWidth, ArrayRef<int> Mask,
 LLVM_ABI bool isMaskedSlidePair(ArrayRef<int> Mask, int NumElts,
                                 std::array<std::pair<int, int>, 2> &SrcInfo);
 
+/// Given a shuffle which can be represented as a pair of two slides, return
----------------
renndong wrote:

I think we can try it, but it may more complicated than AArch64‘s perfect shuffle table which is used only for NEON. For RVV, the table would need to account for more factors, including  the mixed-EMUL, VL, different VLEN support and different instruction extension. Maybe we can narrow the problem in a small scope to take the first step, such as only consider four-element vector with VLEN=128, EMUL = m1 and a limited set of instruction extensions.

https://github.com/llvm/llvm-project/pull/224991


More information about the llvm-commits mailing list