[PATCH] D156477: [RISCVRVVInitUndef] Remove implicit single use assumption for IMPLICIT_DEF

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 12:19:33 PDT 2023


reames created this revision.
reames added reviewers: craig.topper, BeMg.
Herald added subscribers: luke, 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, asb, 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.

The code was written with the implicit assumption that each IMPLICIT_DEF either a) the tied operand, or b) an untied source, but not both.  This is true right now, but an upcoming change may allow CSE of IMPLICIT_DEFs in some cases, so let's rewrite the code to handle that possibility.

I added an MIR case which demonstrates the multiple use IMPLICIT_DEF.  To my knowledge, this is not a reachable configuration from IR right now.

As an aside, this makes the structure a much closer match with the sub-reg liveness case, and we can probably just merge these routines.  (Future work.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156477

Files:
  llvm/lib/Target/RISCV/RISCVRVVInitUndef.cpp
  llvm/test/CodeGen/RISCV/rvv/undef-earlyclobber-chain.ll
  llvm/test/CodeGen/RISCV/rvv/undef-earlyclobber-chain.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156477.544882.patch
Type: text/x-patch
Size: 9241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230727/a18478fc/attachment.bin>


More information about the llvm-commits mailing list