[PATCH] D154620: [RISCV] Cleanup dead complexity in RISCVMaskedPseudo after TA/TU merge refactoring [nfc]

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 09:06:48 PDT 2023


reames created this revision.
reames added reviewers: craig.topper, kito-cheng, luke, asb.
Herald added subscribers: jobnoorman, VincentWu, vkmr, frasercrmck, 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: wangpc, eopXD, MaskRay.
Herald added a project: LLVM.

After D154245 <https://reviews.llvm.org/D154245> lands, we have greatly simplified the possible configurations for an entry in the RISCVMaskedPseudo table.  This change goes through and reworks everything which uses that table to exploit the available simplifications.

To justify the correctness here, let me note that we no longer had any use of HasTU=true.  We were left with only the HasTu=false, and IsCombined=true|false cases.  The only usage is IsCombined=false was for the comparison operations.  At the moment, these operations are the only ones in the table without vector policy operands.  Instead of switching on the pseudo value, we can just check the VecPolicy flag instead.

It may be worth adding a passthru operand to the comparisons (which is actually needed to represent tail undefined vs tail agnostic), and a vector policy operand (which is strictly unneeded) just for consistency, but we can do that in a follow up patch for some further simplification if desired.

Note that we do have a few _TU pseudos left at this point.  It's simply that none of them are in the RISCVMaskedPseudo table, and thus don't participate in our post-ISEL transforms.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154620

Files:
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
  llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154620.537757.patch
Type: text/x-patch
Size: 16849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230706/225c70b1/attachment.bin>


More information about the llvm-commits mailing list