This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Change use null for dead sdst to be gfx1030+
ClosedPublic

Authored by dstuttard on Jun 15 2022, 8:52 AM.

Details

Summary

Pre gfx1030 null for sdst is different.
c97436f8b6e2 [AMDGPU] Use null for dead sdst operand - requires a change to make
it not apply to pre gfx1030

Diff Detail

Event Timeline

dstuttard created this revision.Jun 15 2022, 8:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2022, 8:52 AM
dstuttard requested review of this revision.Jun 15 2022, 8:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2022, 8:52 AM

Forgot to update the tests. Stand by.

dstuttard updated this revision to Diff 437213.Jun 15 2022, 9:21 AM

Add test updates

rampitec added inline comments.Jun 15 2022, 10:52 AM
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
695

This should be allowed on gfx11 as well, I suppose. I.e. we may need a new subtarget function if null can be used as an sdst and alike.

llvm/test/CodeGen/AMDGPU/carryout-selection.ll
56–59

Add separate run lines for gfx1030 with wave32 and wave64?

llvm/test/CodeGen/AMDGPU/mad_u64_u32.ll
3

Change gfx1010 lines to gfx1030 maybe?

23

This is strange, I do not see FeatureGFX10_3Insts listed for gfx11.

dstuttard marked 3 inline comments as done.Jun 16 2022, 1:19 AM
dstuttard added inline comments.
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
695

gfx11 also has FeatureGFX10_3Insts so is covered with this change.

However, do you think a new subtarget function would be better? I was undecided. The current change works for now - if I submit this one and we decide to implement a new subtarget function that can go in as a separate commit?

llvm/test/CodeGen/AMDGPU/mad_u64_u32.ll
23

Yes, it is there.

dstuttard updated this revision to Diff 437469.Jun 16 2022, 1:19 AM
dstuttard marked an inline comment as done.

Updated tests to include 1030 specific run lines

foad accepted this revision.Jun 16 2022, 2:00 AM

LGTM apart from the missing checks in mad_u64_u32.ll

llvm/test/CodeGen/AMDGPU/mad_u64_u32.ll
14

These checks should not have disappeared

This revision is now accepted and ready to land.Jun 16 2022, 2:00 AM
dstuttard updated this revision to Diff 437480.Jun 16 2022, 2:35 AM

Adding check lines back into mad_u64_u32.ll

dstuttard marked an inline comment as done.Jun 16 2022, 2:37 AM
This revision was landed with ongoing or failed builds.Jun 16 2022, 2:45 AM
This revision was automatically updated to reflect the committed changes.