HomePhabricator

[PowerPC] Custom lower known CR bit spills

Description

[PowerPC] Custom lower known CR bit spills

For known CRBit spills, CRSET/CRUNSET, it is more efficient to 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)

Differential Revision: https://reviews.llvm.org/D61754

Details

Committed
leiMay 14 2019, 7:27 AM
Differential Revision
D61754: [PowerPC] Custom lower known CR bit spills
Parents
rL360676: [llvm-readobj] - Apply clang format. NFC.
Branches
Unknown
Tags
Unknown