[PATCH] D148834: [RISCV][InsertVSETVLI] Avoid VL toggles for extractelement patterns

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 12:29:50 PDT 2023


reames created this revision.
reames added reviewers: craig.topper, asb, luke, kito-cheng.
Herald added subscribers: jobnoorman, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, bollu, simoncook, johnrusso, rbar, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

Noticed this while looking at some SLP output.  If we have an extractelement, we're probably using a slidedown into an destination with no contents.  Given this, we can allow the slideup to use a larger VL and clobber tail elements of the destination vector.  Doing this allows us to avoid vsetvli toggles in many fixed length vector examples.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148834

Files:
  llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
  llvm/test/CodeGen/RISCV/rvv/extractelt-i1.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vector-shuffle-reverse.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-i1.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp2i-sat.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-load.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-masked-gather.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-masked-scatter.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-store.ll
  llvm/test/CodeGen/RISCV/rvv/fold-vector-cmp.ll
  llvm/test/CodeGen/RISCV/rvv/shuffle-reverse.ll
  llvm/test/CodeGen/RISCV/rvv/vector-splice.ll
  llvm/test/CodeGen/RISCV/rvv/vsplats-i1.ll
  llvm/test/CodeGen/RISCV/urem-seteq-illegal-types.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148834.515433.patch
Type: text/x-patch
Size: 142777 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230420/f6389875/attachment-0001.bin>


More information about the llvm-commits mailing list