[PATCH] D119316: [RISCV] Add a really basic cost model for SK_Splice.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 22:48:56 PST 2022


craig.topper created this revision.
craig.topper added reviewers: frasercrmck, rogfer01, khchen, arcbbb, npanchen, ABataev.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
craig.topper requested review of this revision.
Herald added subscribers: alextsao1999, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

While testing scalable vectors I found that if we generate a
vector splice intrinsic and run the code through the loop unroller,
we'll crash due to an invalid cost.

This adds a basic cost based on the 2 slide instructions used by the
lowering in D119303 <https://reviews.llvm.org/D119303>.

We probably need to factor LMUL into this, but that's true for
arithmetic instructions too. So I've ignored for the moment.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119316

Files:
  llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
  llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
  llvm/test/Analysis/CostModel/RISCV/rvv-shuffle.ll
  llvm/test/Analysis/CostModel/RISCV/splice.ll
  llvm/utils/update_analyze_test_checks.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119316.407053.patch
Type: text/x-patch
Size: 36061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220209/4f414f8b/attachment.bin>


More information about the llvm-commits mailing list