This is an archive of the discontinued LLVM Phabricator instance.

[Power9] Exploit D-Form VSX Scalar loads capable of targeting full VSX register set
ClosedPublic

Authored by nemanjai on Sep 20 2016, 11:56 AM.

Details

Summary

The newly added D-Form load and store instructions in Power9 target the Altivec portion (upper half) of the VSX register set. If we simply favour those instructions over the existing X-Form VSX loads/stores, we are no better off in terms of relieving register pressure. So this patch adds pseudo-ops that will be translated into the correct instruction after RA.
Namely, if the source/target register for the store/load respectively is one of the FPRs, then the FP opcode is emitted, otherwise the VSX opcode is emitted.

In order to ensure we're capable of emitting the D-Form ops without losing the capabilities of emitting the X-Form ops (i.e. when the offset is only available in a register), the "CodeSize" property of the instruction is used to reflect the fact that the X-Form instruction will really be 3 instructions (loading the offset into a GPR followed by the actual op). This will in turn make TblGen favour the D-Form loads when possible which is what we want.

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai updated this revision to Diff 71965.Sep 20 2016, 11:56 AM
nemanjai retitled this revision from to [Power9] Exploit D-Form VSX Scalar loads capable of targeting full VSX register set.
nemanjai updated this object.
nemanjai set the repository for this revision to rL LLVM.
nemanjai added a subscriber: echristo.
kbarton accepted this revision.Sep 23 2016, 12:11 PM
kbarton edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 23 2016, 12:11 PM

Committed revision 283212.

nemanjai closed this revision.Oct 4 2016, 4:36 AM