Page MenuHomePhabricator

[PowerPC] Replace float load/store pair with integer load/store pair when it's only used in load/store

Authored by wuzish on Jul 4 2019, 1:10 AM.



Replace float load/store pair with integer load/store pair when it's only used in load/store, because float load/store instructions cost more cycles then integer load/store.

A typical scenario is when there is a call with more than 13 float arguments passing, we need pass them by stack. So we need a load/store pair to do such memory operation if the variable is global variable.

Diff Detail

Event Timeline

wuzish created this revision.Jul 4 2019, 1:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2019, 1:10 AM
MaskRay added a subscriber: MaskRay.Jul 4 2019, 6:48 AM

gentle pin... It's a follow-up of

jsji requested changes to this revision.Jul 15 2019, 6:57 AM

In theory this should be a good idea, especially with P9, we can remove the "restrict" dispatch constraints for lfs/lfd.

Can you get some performance data w and w/o this?

Request change to split the NFC patch out. Thanks.


Please add some comments here about why we deem it is profitable?


Maybe it would be better to be explicit here, check for f32 and f64 only?


Please commit the testcase in a NFC patch first, then only show difference here.

This revision now requires changes to proceed.Jul 15 2019, 6:57 AM
wuzish updated this revision to Diff 210044.Jul 16 2019, 1:30 AM

Address comments

This comment was removed by wuzish.

After run bmk 2017 cpu for fortran and c/c++, there is some noise, no obvious degression. Some have little improvement about 1%~2%.

Gentle pin..

jsji accepted this revision.Jul 22 2019, 8:25 AM


This revision is now accepted and ready to land.Jul 22 2019, 8:25 AM
This revision was automatically updated to reflect the committed changes.