[PATCH] D145272: [RISCV] Teach performCombineVMergeAndVOps to combine unmasked TU vpmerge with a masked MU TA op.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 13:18:40 PST 2023


craig.topper created this revision.
craig.topper added reviewers: reames, frasercrmck, nitinjohnraj, fakepaper56.
Herald added subscribers: luke, VincentWu, vkmr, evandro, 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, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

We can form a MU TU operation and remove the merge if they use the
same merge value.

My primary interest was a case involving VP intrinsics from our downstream,
but it requires another optimization that isn't in upstream yet. So I've used
RVV intrinsics to get the desired instructions.

Co-authored-by: Nitin John Raj <nitin.raj at sifive.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145272

Files:
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
  llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-masked-vops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145272.502240.patch
Type: text/x-patch
Size: 12273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230303/40684fdb/attachment.bin>


More information about the llvm-commits mailing list