[PATCH] D61754: [PowerPC] Custom lower known CR bit spills

Lei Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 12:38:27 PDT 2019


lei created this revision.
lei added reviewers: power-llvm-team, hfinkel, echristo, nemanjai, stefanp.
Herald added subscribers: jsji, kbarton, hiraditya, qcolombet.
Herald added a project: LLVM.

For known CRBit spills, CRSET/CRUNSET, it is more efficient to just load and spill the known value instead of extracting the bit.

eg. This sequence is currently used to spill a CRUNSET:

  crclr   4*cr5+lt
  mfocrf  r3,4
  rlwinm  r3,r3,20,0,0
  stw     r3,132(r1)

This patch custom lower it to:

  li  r3,0
  stw r3,132(r1)


Repository:
  rL LLVM

https://reviews.llvm.org/D61754

Files:
  llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
  llvm/test/CodeGen/PowerPC/knowCRBitSpill.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61754.198886.patch
Type: text/x-patch
Size: 9223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190509/13744aaa/attachment.bin>


More information about the llvm-commits mailing list