This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] allow multi-dword flat scratch access since GFX9
ClosedPublic

Authored by rampitec on Jan 16 2020, 12:46 PM.

Details

Summary

This is supported starting with GFX9.

Diff Detail

Event Timeline

rampitec created this revision.Jan 16 2020, 12:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2020, 12:46 PM

This also needs to be reproduce for globalisel

llvm/lib/Target/AMDGPU/SIISelLowering.cpp
7388

Should move this into a predicate function inside the subtarget

llvm/test/CodeGen/AMDGPU/flat-address-space.ll
160

What is the alignment situation for this? I thought unaligned scratch access was introduced but we never started using it?

rampitec marked an inline comment as done.Jan 16 2020, 1:01 PM
rampitec added inline comments.
llvm/test/CodeGen/AMDGPU/flat-address-space.ll
160

Unaligned works too. In fact unaligned works even on VI and I do not have CI to test.

rampitec updated this revision to Diff 238594.Jan 16 2020, 1:12 PM
rampitec marked an inline comment as done.

Added subtarget predicate.

arsenm accepted this revision.Jan 16 2020, 5:24 PM
arsenm added inline comments.
llvm/test/CodeGen/AMDGPU/flat-address-space.ll
173

Should add some underaligned cases

This revision is now accepted and ready to land.Jan 16 2020, 5:24 PM
rampitec marked an inline comment as done.Jan 17 2020, 10:34 AM
rampitec added inline comments.
llvm/test/CodeGen/AMDGPU/flat-address-space.ll
173

We have it in the same test: @flat_scratch_unaligned_load() and @flat_scratch_unaligned_store(). They are split.
This would be a separate change to allow unaligned flat.

This revision was automatically updated to reflect the committed changes.