[PATCH] D158019: [RISCVInsertVSETVLI] Handle vl-preserve case in backwards rewrite

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 13:44:47 PDT 2023


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

This updates the backwards mutation code to handle the case where the previous vset was in vl-preserving (x0, x0) form, but that VL was never used before the next vset which changes the VL.  Since this requires writing both VL operands, eliminate the restriction on removing GPR producing vsetv as well.  (The register will now be written by the earlier vsetv.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158019

Files:
  llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
  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-reduction-int.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-unaligned.ll
  llvm/test/CodeGen/RISCV/rvv/vreductions-int-vp.ll
  llvm/test/CodeGen/RISCV/rvv/vreductions-int.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158019.550455.patch
Type: text/x-patch
Size: 16253 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230815/24813a70/attachment.bin>


More information about the llvm-commits mailing list