This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix AddedComplexity for s_buffer_load patterns. NFCI.
ClosedPublic

Authored by foad on Mar 6 2023, 8:56 AM.

Details

Summary

We set AddedComplexity = 100 for s_load patterns to prefer them over
global loads, but for s_buffer_load patterns there is no need to do
this and it was quietly overriding the AddedComplexity of each
individual GCNPat that is defined inside SMLoad_Pattern (but in practice
that did not appear to make any difference).

Diff Detail

Event Timeline

foad created this revision.Mar 6 2023, 8:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2023, 8:56 AM
foad requested review of this revision.Mar 6 2023, 8:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2023, 8:56 AM
arsenm added inline comments.Mar 6 2023, 9:13 AM
llvm/lib/Target/AMDGPU/SMInstructions.td
904

Can you just move this up instead of indenting all the patterns?

foad updated this revision to Diff 502690.Mar 6 2023, 9:33 AM

Update

foad marked an inline comment as done.Mar 6 2023, 9:34 AM
arsenm accepted this revision.Apr 10 2023, 8:48 AM
This revision is now accepted and ready to land.Apr 10 2023, 8:48 AM
This revision was landed with ongoing or failed builds.Apr 10 2023, 9:36 AM
This revision was automatically updated to reflect the committed changes.