[PATCH] D144535: [RISCV] Enable machine copy propagation for copy-like instructions

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 22:18:38 PST 2023


pcwang-thead created this revision.
pcwang-thead added reviewers: asb, reames, craig.topper, kito-cheng.
Herald added subscribers: luke, VincentWu, armkevincheng, sjarus, eric-k256, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, kristof.beyls, arichardson.
Herald added a project: All.
pcwang-thead requested review of this revision.
Herald added subscribers: llvm-commits, eopXD, MaskRay.
Herald added a project: LLVM.

Like what has been done in AArch64 (D125335 <https://reviews.llvm.org/D125335>).

We enable this under `-O2` to show the codegen diffs here but we
may only do this under `-O3` like AArch64.

There are two cases that we may produce these eliminable copies:

1. ISel of `FrameIndex`. Like `rvv/fixed-vectors-calling-conv.ll`.
2. Tail duplication. Like `select-optimize-multiple.ll`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144535

Files:
  llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
  llvm/test/CodeGen/RISCV/O3-pipeline.ll
  llvm/test/CodeGen/RISCV/copyprop.ll
  llvm/test/CodeGen/RISCV/fpclamptosat.ll
  llvm/test/CodeGen/RISCV/fpclamptosat_vec.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-calling-conv.ll
  llvm/test/CodeGen/RISCV/sadd_sat.ll
  llvm/test/CodeGen/RISCV/sadd_sat_plus.ll
  llvm/test/CodeGen/RISCV/select-optimize-multiple.ll
  llvm/test/CodeGen/RISCV/split-offsets.ll
  llvm/test/CodeGen/RISCV/ssub_sat.ll
  llvm/test/CodeGen/RISCV/ssub_sat_plus.ll
  llvm/test/Transforms/LoopStrengthReduce/RISCV/lsr-drop-solution.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144535.499368.patch
Type: text/x-patch
Size: 14388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230222/f2d17baa/attachment.bin>


More information about the llvm-commits mailing list