This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][Codegen] Unsupported image sample texture map instructions
ClosedPublic

Authored by gandhi21299 on Apr 9 2022, 9:36 PM.

Details

Summary

Disables image_sample_*_g16 instructions on architectures lacking g16 support. This patch fixes the issue 54672.

Diff Detail

Event Timeline

gandhi21299 created this revision.Apr 9 2022, 9:36 PM
Herald added a project: Restricted Project. · View Herald Transcript
gandhi21299 requested review of this revision.Apr 9 2022, 9:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2022, 9:36 PM
dp added a comment.Apr 12 2022, 3:31 AM

I believe the description of this change is incorrect. The bug 54762 is about disabling unsupported opcodes rather than improving error messages.
The change itself seems to work, but I want more experienced people to take a look. I'd contemplated using HasG16 feature instead of hardcoding isGFX10Plus.

Missing a few test cases? The tablegen touches 8 opcodes

gandhi21299 retitled this revision from [AMDGPU][Codegen] Unsupported image sample texture map instructions on gfx6-gfx9 to [AMDGPU][Codegen] Unsupported image sample texture map instructions.Apr 12 2022, 8:49 AM
gandhi21299 edited the summary of this revision. (Show Details)
  • replaced the feature to HasG16
  • added missing test cases
dp accepted this revision.Apr 12 2022, 9:14 AM

LGTM except for a minor typo

llvm/lib/Target/AMDGPU/MIMGInstructions.td
1086

This should be updated as well

This revision is now accepted and ready to land.Apr 12 2022, 9:14 AM

Thanks for the review.

This revision was landed with ongoing or failed builds.Apr 12 2022, 9:39 AM
This revision was automatically updated to reflect the committed changes.