This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] SILoadStoreOptimizer: Allow merging across a swizzled access
ClosedPublic

Authored by foad on Jan 26 2022, 9:39 AM.

Details

Summary

Swizzled accesses are not merged, but there is no particular reason not
to merge two instructions if any of the intervening instructions happens
to be a swizzled access.

This moves the check for swizzled accesses out of checkAndPrepareMerge
into collectMergeableInsts where I think it makes more sense.

Diff Detail

Event Timeline

foad created this revision.Jan 26 2022, 9:39 AM
foad requested review of this revision.Jan 26 2022, 9:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2022, 9:39 AM

Is there a test with an aliasing swizzled store in between of two operations preventing the merge?

foad added a comment.Jan 27 2022, 4:14 AM

Is there a test with an aliasing swizzled store in between of two operations preventing the merge?

There is now: gfx9_tbuffer_load_merge_across_swizzled_store (see c5d2b97a6992). This patch does not affect it.

piotr accepted this revision.Jan 27 2022, 6:34 AM

LGTM

This revision is now accepted and ready to land.Jan 27 2022, 6:34 AM
This revision was landed with ongoing or failed builds.Jan 27 2022, 6:44 AM
This revision was automatically updated to reflect the committed changes.