This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] flat scratch ST addressing mode on gfx10
ClosedPublic

Authored by rampitec on Oct 15 2020, 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.Oct 15 2020, 3:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 15 2020, 3:01 PM
rampitec requested review of this revision.Oct 15 2020, 3:01 PM
foad added a subscriber: foad.Oct 16 2020, 8:57 AM
foad added a comment.Oct 19 2020, 6:15 AM

LGTM.

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

Use !not? See D89331.

rampitec updated this revision to Diff 299147.Oct 19 2020, 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.Oct 19 2020, 2:23 PM
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
754

Add a comment explaining what this means

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

Added comment.

arsenm accepted this revision.Oct 19 2020, 3:26 PM
This revision is now accepted and ready to land.Oct 19 2020, 3:26 PM
This revision was automatically updated to reflect the committed changes.
foad added inline comments.Oct 20 2020, 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.Oct 20 2020, 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.