This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] gfx11 subtarget features & early tests
ClosedPublic

Authored by Joe_Nash on May 9 2022, 12:30 PM.

Details

Reviewers
Petar.Avramovic
foad
Group Reviewers
Restricted Project
Commits
rG18ed279a3a4a: [AMDGPU] gfx11 subtarget features & early tests
Summary

Tablegen definitions for subtarget features and cpp predicate functions to
access the features.
New Sub-TargetProcessors and common latencies.
Simple changes to MIR codegen tests which pass on gfx11 because they have the
same output as previous subtargets or operate on pseudo instructions which
are reused from previous subtargets.

Contributors:
Jay Foad <jay.foad@amd.com>
Petar Avramovic <Petar.Avramovic@amd.com>

Patch 4/N for upstreaming of AMDGPU gfx11 architecture

Depends on D124538

Diff Detail

Event Timeline

Joe_Nash created this revision.May 9 2022, 12:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2022, 12:30 PM
Joe_Nash requested review of this revision.May 9 2022, 12:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2022, 12:30 PM
Joe_Nash added reviewers: Petar.Avramovic, foad, Restricted Project.May 9 2022, 12:31 PM
foad accepted this revision.May 10 2022, 5:08 AM

Contributors:
Jay Foad <jay.foad@amd.com>

Please don't feel obliged to credit me (unless you feel it's important for the historical record).

llvm/lib/Target/AMDGPU/AMDGPU.td
367

Nit: "16-bit"

This revision is now accepted and ready to land.May 10 2022, 5:08 AM

LGTM also, I am just double checking tests, might add a few more comments soon.

llvm/lib/Target/AMDGPU/GCNSubtarget.h
708–709

Can you use same line break as above? clang-format did this probably.

llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.exp.mir
20–31

What happened here? No need to delete.

llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-flat.mir
935–957

This is interesting test change, which patch allows offset fold for this?

Can you also add comment that test changes for some memory instructions are caused by subtarget feature that allows offset folding (to be precise not having feature that forbids offset folding). Maybe separate these tests to another patch.

llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-flat.mir
935–957

GFX11 does not have subtarget feature that stops folding of offsets for some address spaces (here hasFlatSegmentOffsetBug()).

Joe_Nash marked 5 inline comments as done.May 10 2022, 7:06 AM

Contributors:
Jay Foad <jay.foad@amd.com>

Please don't feel obliged to credit me (unless you feel it's important for the historical record).

I appreciate that. It is not a big burden, I'm just making a best effort basis to give some credit. If you explicitly DON'T want to be there I can of course remove it.

Can you also add comment that test changes for some memory instructions are caused by subtarget feature that allows offset folding (to be precise not having feature that forbids offset folding). Maybe separate these tests to another patch.

Added a your suggested comment.

llvm/lib/Target/AMDGPU/GCNSubtarget.h
708–709

Yep, clang-format. I am never quite sure whether to match existing style or unify on clang-format. I'll match existing in this case.

Joe_Nash updated this revision to Diff 428365.May 10 2022, 7:07 AM
Joe_Nash marked an inline comment as done.

Fix deleted test case. Update commit msg

Petar.Avramovic accepted this revision.May 10 2022, 7:09 AM
This revision was landed with ongoing or failed builds.May 11 2022, 7:59 AM
This revision was automatically updated to reflect the committed changes.
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-local.mir