This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Do not handle _SGPR SMEM instructions in SILoadStoreOptimizer
ClosedPublic

Authored by foad on Apr 25 2023, 2:29 AM.

Details

Summary

After D147334 we never select _SGPR forms of SMEM instructions on
subtargets that also support the _SGPR_IMM form, so there is no need to
handle them here.

Diff Detail

Event Timeline

foad created this revision.Apr 25 2023, 2:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2023, 2:29 AM
foad requested review of this revision.Apr 25 2023, 2:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2023, 2:29 AM
kosarev accepted this revision.Apr 25 2023, 7:38 AM

LGTM. Another option might be to assert on the _SGPR cases, probably with a comment explaining the reason, rather than just removing them. The instructions still exist.

This revision is now accepted and ready to land.Apr 25 2023, 7:38 AM
This revision was landed with ongoing or failed builds.Apr 25 2023, 7:43 AM
This revision was automatically updated to reflect the committed changes.
foad added a comment.Apr 25 2023, 7:48 AM

Another option might be to assert on the _SGPR cases, probably with a comment explaining the reason, rather than just removing them. The instructions still exist.

I plan to continue work on D147335 which will remove the _SGPR Real instructions (on GFX10+). This will cause a hard failure if we accidentally select the _SGPR Pseudos, giving the same kind of assurance as the assertion you suggested.