[PATCH] D131873: [PowerPC] Optimize compare by using record form in post-RA.

Esme Yi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 14 22:07:04 PDT 2022


Esme created this revision.
Esme added reviewers: shchenz, nemanjai, lkail, qiucf, PowerPC.
Herald added subscribers: kbarton, hiraditya.
Herald added a project: All.
Esme requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We currently optimize the comparison only in SSA, therefore we may miss some optimization opportunities where the input of comparison is lowered from COPY in post-RA.
Ie. `ExpandPostRA::LowerCopy` is called after `PPCInstrInfo::optimizeCompareInstr`.

This patch optimizes the comparison in post-RA.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131873

Files:
  llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  llvm/lib/Target/PowerPC/PPCInstrInfo.h
  llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp
  llvm/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
  llvm/test/CodeGen/PowerPC/cmp_elimination.ll
  llvm/test/CodeGen/PowerPC/csr-split.ll
  llvm/test/CodeGen/PowerPC/rlwinm-zero-ext.ll
  llvm/test/CodeGen/PowerPC/setcc-logic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131873.452588.patch
Type: text/x-patch
Size: 7522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220815/f5af801b/attachment.bin>


More information about the llvm-commits mailing list