This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] stop reverse mem op generation when the feeder has more than one users
ClosedPublic

Authored by shchenz on Apr 9 2021, 12:48 AM.

Details

Summary

We should consider the feeder user number when we do reverse memory operation transformation. Otherwise, we may get negative impact.

Diff Detail

Event Timeline

shchenz created this revision.Apr 9 2021, 12:48 AM
shchenz requested review of this revision.Apr 9 2021, 12:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2021, 12:48 AM
nemanjai accepted this revision.Apr 12 2021, 4:26 AM

LGTM.

llvm/lib/Target/PowerPC/PPCISelLowering.cpp
14421

It is not clear why the fact that there is no D-Form makes this unprofitable.
Perhaps:

// If there are other uses of the shuffle, the swap cannot be avoided.
// Forcing the use of an X-Form (since swapped stores only have 
// X-Forms) without removing the swap is unprofitable.
This revision is now accepted and ready to land.Apr 12 2021, 4:26 AM
This revision was automatically updated to reflect the committed changes.
shchenz added inline comments.Apr 12 2021, 7:45 PM
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
14421

Thanks. It was updated in the commit.