[PATCH] D92089: [PowerPC] Materialize i64 constants by enumerated patterns.

EsmeYi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 25 03:21:08 PST 2020


Esme created this revision.
Esme added reviewers: jsji, steven.zhang, nemanjai, shchenz, hfinkel, qiucf, lkail, PowerPC.
Herald added subscribers: llvm-commits, asbirlea, kbarton, hiraditya.
Herald added a project: LLVM.
Esme requested review of this revision.

Some constants can be handled with less instructions than our current results. And it seems our original approach is not very easy to extend. Therefore this patch proposes to materialize all 64-bit constants by enumerated patterns.

I traversed almost all constants to verified the functionality of these pattens. A traversed comparison of the number of instructions used by the original method and the new method has also been completed, where no degradation was caused by this patch.

Improvements of this patch are shown in `llvm/test/CodeGen/PowerPC/constants-i64.ll`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92089

Files:
  llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  llvm/test/CodeGen/PowerPC/aix-cc-abi.ll
  llvm/test/CodeGen/PowerPC/arr-fp-arg-no-copy.ll
  llvm/test/CodeGen/PowerPC/bperm.ll
  llvm/test/CodeGen/PowerPC/combine_ext_trunc.ll
  llvm/test/CodeGen/PowerPC/constants-i64.ll
  llvm/test/CodeGen/PowerPC/f128-fma.ll
  llvm/test/CodeGen/PowerPC/f128-passByValue.ll
  llvm/test/CodeGen/PowerPC/fast-isel-pcrel.ll
  llvm/test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll
  llvm/test/CodeGen/PowerPC/funnel-shift.ll
  llvm/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll
  llvm/test/CodeGen/PowerPC/negctr.ll
  llvm/test/CodeGen/PowerPC/ori_imm32.ll
  llvm/test/CodeGen/PowerPC/ori_imm64.ll
  llvm/test/CodeGen/PowerPC/pr43976.ll
  llvm/test/CodeGen/PowerPC/pr45448.ll
  llvm/test/CodeGen/PowerPC/rematerializable-instruction-machine-licm.ll
  llvm/test/CodeGen/PowerPC/sms-grp-order.ll
  llvm/test/CodeGen/PowerPC/srem-vector-lkk.ll
  llvm/test/CodeGen/PowerPC/tailcall-speculatable-callee.ll
  llvm/test/CodeGen/PowerPC/unaligned-addressing-mode.ll
  llvm/test/CodeGen/PowerPC/urem-vector-lkk.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92089.307563.patch
Type: text/x-patch
Size: 63308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201125/2cbcb97f/attachment.bin>


More information about the llvm-commits mailing list