[PATCH] D103277: [RISCV] Teach VSETVLI insertion to look through PHIs to prove we don't need to insert a vsetvli.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 12:42:45 PDT 2021


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

If an instruction's AVL operand is a PHI node in the same block,
we may be able to peek through the PHI to find vsetvli instructions
that produce the AVL in other basic blocks. If we can prove those
vsetvli instructions have the same VTYPE and were the last vsetvli
in their respective blocks, then we don't need to insert a vsetvli
for this pseudo instruction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103277

Files:
  llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
  llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103277.348358.patch
Type: text/x-patch
Size: 5462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210527/6216d8bc/attachment-0001.bin>


More information about the llvm-commits mailing list