[PATCH] D109394: [RISCV] Enable CGP to sink splat operands of Add/Sub/Mul.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 7 14:38:05 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: frasercrmck, rogfer01, HsiangKai, evandro, arcbbb, khchen.
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.

LICM may have pulled out a splat, but with .vx instructions we
can fold it into an operation.

This patch enables CGP to reverse the LICM transform and move the
splat back into the loop.

I've started with the commutable integer operations, but we can
extend this with more operations in future patches.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109394

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/test/CodeGen/RISCV/rvv/sink-splat-operands.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109394.371194.patch
Type: text/x-patch
Size: 24488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210907/726710d7/attachment-0001.bin>


More information about the llvm-commits mailing list