This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC] Don't accept attr > 32 for param_load
ClosedPublic

Authored by rovka on May 10 2023, 4:22 AM.

Details

Reviewers
foad
Group Reviewers
Restricted Project
Commits
rGbcbd9b021a2f: [AMDGPU][MC] Don't accept attr > 32 for param_load
Summary

The docs say the interpolation attribute should be between 0..32 [1][2],
but we currently accept values all the way up to 63.

This patch makes the ASMParser error out for values > 32. It does not
touch codegen though because we're currently not checking anything at
all for codegen (llvm.amdgcn.lds.param.load will happily accept even 128
as an attr, although that won't fit in the encoding).

[1] https://llvm.org/docs/AMDGPU/gfx8_attr.html#amdgpu-synid-gfx8-attr
[2] https://llvm.org/docs/AMDGPU/gfx11_attr.html#amdgpu-synid-gfx11-attr

Diff Detail

Event Timeline

rovka created this revision.May 10 2023, 4:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2023, 4:22 AM
rovka requested review of this revision.May 10 2023, 4:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2023, 4:22 AM
rovka added a reviewer: Restricted Project.May 10 2023, 4:23 AM
foad accepted this revision.May 12 2023, 3:16 AM

LGTM, thanks!

This revision is now accepted and ready to land.May 12 2023, 3:16 AM
This revision was landed with ongoing or failed builds.May 14 2023, 11:43 PM
This revision was automatically updated to reflect the committed changes.