This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][RFC] Update isLegalAddressingMode for GFX9 SMEM signed offsets
ClosedPublic

Authored by foad on Jul 18 2023, 5:39 AM.

Details

Diff Detail

Event Timeline

foad created this revision.Jul 18 2023, 5:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 5:39 AM
foad requested review of this revision.Jul 18 2023, 5:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 5:39 AM
foad added a reviewer: Restricted Project.Jul 18 2023, 5:41 AM

a) I don't know how to test this.
b) I'm not even sure if it's correct. Negative offsets are only allowed for regular SMEM loads/stores/atomics. For S_BUFFER_* the signed offset has to be >= 0. I don't know if this code is distinguishing those cases.
Any thoughts?

foad updated this revision to Diff 541479.Jul 18 2023, 5:42 AM

Fix comment

I'd hope something like https://godbolt.org/z/cqPPTsdKb works by testing if CGP sinks it like the other addressing mode tests we have

arsenm accepted this revision.Jul 20 2023, 3:39 PM
This revision is now accepted and ready to land.Jul 20 2023, 3:39 PM
This revision was landed with ongoing or failed builds.Jul 21 2023, 3:04 AM
This revision was automatically updated to reflect the committed changes.