This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC][GFX1013] Enable image_msaa_load
ClosedPublic

Authored by dp on Jun 7 2022, 4:09 AM.

Diff Detail

Event Timeline

dp created this revision.Jun 7 2022, 4:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2022, 4:09 AM
dp requested review of this revision.Jun 7 2022, 4:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2022, 4:09 AM
rampitec accepted this revision.Jun 7 2022, 11:56 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jun 7 2022, 11:56 AM
kosarev added inline comments.Jun 8 2022, 2:58 AM
llvm/test/MC/AMDGPU/gfx1011_supported.s
1 ↗(On Diff #434765)

Will it harm if we drop the _supported bit from the file name? +Same below.

dp marked an inline comment as done.Jun 8 2022, 3:22 AM
dp added inline comments.
llvm/test/MC/AMDGPU/gfx1011_supported.s
1 ↗(On Diff #434765)

These tests are a bit special and I added the suffix to distinguish them from regular tests. We also have tests with unsupported suffix which serve the same purpose. I'm planning to add supported tests for other GFX9 and GFX10 subtargets.

Another option I see is to move all supported tests to a separate folder (e.g. AMDGPU/subtargets), in this case the unsupported suffix will be unnecessary.

Any other ideas?

kosarev added inline comments.Jun 8 2022, 4:09 AM
llvm/test/MC/AMDGPU/gfx1011_supported.s
1 ↗(On Diff #434765)

It seems so far we have been adding tests that make sure instructions are supported for particular targets without seeing them any special? Also, if this is a 'supported' kind of test, then what should we think are other positive encoding tests? Feels like this may be unnecessary complication.

dp marked an inline comment as done.Jun 8 2022, 5:18 AM
dp added inline comments.
llvm/test/MC/AMDGPU/gfx1011_supported.s
1 ↗(On Diff #434765)

You gave me a better idea. I think the supported tests may be further simplified by removing encoding checks. Thus they will only check that the specified instructions are supported, i.e. may be assembled without errors. This will also make these tests run faster. And after this change they will be special.

If nobody likes the idea, I'll rename the tests as you suggested.

kosarev added inline comments.Jun 8 2022, 5:36 AM
llvm/test/MC/AMDGPU/gfx1011_supported.s
1 ↗(On Diff #434765)

If we want to make sure the support for the instructions is there, then why wouldn't we also want to check if they use the right encodings?

dp added inline comments.Jun 8 2022, 5:54 AM
llvm/test/MC/AMDGPU/gfx1011_supported.s
1 ↗(On Diff #434765)

The question is where to stop. Instead of adding these supported tests we could have added RUN lines for missing subtargets to existing tests, but that would double or even triple test time according to my estimations. Note that we have 9 GFX10 subtargets with poor to none test coverage.

kosarev added inline comments.Jun 8 2022, 6:14 AM
llvm/test/MC/AMDGPU/gfx1011_supported.s
1 ↗(On Diff #434765)

The point was, why where we have reasons to think the support for assembling instructions may be missed we shouldn't also assume the same applies to using the right encodings. And if it does apply, then the expected tests should be no special compared to what we already have.

To clarify, I don't suggest adding more RUN lines to those huge tests whose usefulness doesn't seem proportional to the amount of time they consume -- on top of that they make cases we are truly interested in less visible. The cases covered in the new tests do seem sufficient to me, and as long as we keep them this way, it should promise any problems in terms of testing times, shouldn't it?

dp updated this revision to Diff 435495.Jun 9 2022, 4:40 AM
dp edited the summary of this revision. (Show Details)

Removed irrelevant tests; updated GFX1013 specific tests.

The tests look good to me, thanks.

This revision was landed with ongoing or failed builds.Jun 10 2022, 3:42 AM
This revision was automatically updated to reflect the committed changes.