This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Improve getNormalLoadInput to reach more splat load opportunities
ClosedPublic

Authored by tingwang on Jun 28 2022, 12:08 AM.

Details

Summary

There are straight forward splat load opportunities blocked by getNormalLoadInput(), since those cases involve consecutive bitcasts. Improve by looking through bitcasts.

Diff Detail

Event Timeline

tingwang created this revision.Jun 28 2022, 12:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2022, 12:08 AM
tingwang requested review of this revision.Jun 28 2022, 12:08 AM
lkail added a subscriber: lkail.Jun 28 2022, 1:27 AM
lkail added inline comments.
llvm/test/CodeGen/PowerPC/load-and-splat.ll
1326

Could you please pre-commit the test?

Sounds reasonable.
Yeah, better pre-commit the case with trunk behavior first and then only show the diff in the patch. By doing this, it is more clear to the reviewer what's wrong without this patch and what this patch exactly changes.

tingwang marked an inline comment as done.Jun 28 2022, 3:26 AM
tingwang updated this revision to Diff 440560.Jun 28 2022, 4:28 AM
tingwang added a reviewer: lkail.

Rebase

nemanjai accepted this revision.Jun 28 2022, 4:31 AM

Ah, this is a good point. I guess we didn't consider that we may have a bitcast of a bitcast. Thanks for fixing this. LGTM.

This revision is now accepted and ready to land.Jun 28 2022, 4:31 AM
This revision was landed with ongoing or failed builds.Jun 28 2022, 5:05 AM
This revision was automatically updated to reflect the committed changes.