Page MenuHomePhabricator

[AMDGPU] flat scratch ST addressing mode on gfx10
ClosedPublic

Authored by rampitec on Thu, Oct 15, 3:01 PM.

Details

Summary

GFX10 enables third addressing mode for flat scratch instructions,
an ST mode. In that mode both register operands are omitted and
only swizzled offset is used in addition to flat_scratch base.

Diff Detail

Event Timeline

rampitec created this revision.Thu, Oct 15, 3:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptThu, Oct 15, 3:01 PM
rampitec requested review of this revision.Thu, Oct 15, 3:01 PM
foad added a subscriber: foad.Fri, Oct 16, 8:57 AM
foad added a comment.Mon, Oct 19, 6:15 AM

LGTM.

llvm/lib/Target/AMDGPU/FLATInstructions.td
239

Use !not? See D89331.

rampitec updated this revision to Diff 299147.Mon, Oct 19, 2:03 PM
rampitec marked an inline comment as done.
rampitec added a reviewer: foad.
  • Use !not in td file.
  • Only enable ST mode from gfx1030.
arsenm added inline comments.Mon, Oct 19, 2:23 PM
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
754

Add a comment explaining what this means

rampitec updated this revision to Diff 299171.Mon, Oct 19, 2:29 PM
rampitec marked an inline comment as done.

Added comment.

arsenm accepted this revision.Mon, Oct 19, 3:26 PM
This revision is now accepted and ready to land.Mon, Oct 19, 3:26 PM
This revision was automatically updated to reflect the committed changes.
foad added inline comments.Tue, Oct 20, 1:20 AM
llvm/lib/Target/AMDGPU/AMDGPU.td
1140–1141

I think technically the assembler/disassembler support should be in GFX10.1, it's just that we don't want the compiler to generate them until GFX10.3 because of hardware bugs. Maybe at least add a comment explaining why the predicate is FeatureGFX10_3Insts here?

rampitec added inline comments.Tue, Oct 20, 1:24 AM
llvm/lib/Target/AMDGPU/AMDGPU.td
1140–1141

Given the errata there is no difference to Vega. It was possible to encode off/off from start. It just plain does not work and no point to support or allow.