This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC][GFX11][NFC] Correct VINTERP src operands
ClosedPublic

Authored by dp on Nov 2 2022, 3:23 AM.

Details

Summary

VINTERP src operands must be VGPRs, but assembler accepts SGPRs as well.

Diff Detail

Event Timeline

dp created this revision.Nov 2 2022, 3:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2022, 3:23 AM
dp requested review of this revision.Nov 2 2022, 3:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2022, 3:23 AM
Joe_Nash added inline comments.Nov 2 2022, 11:42 AM
llvm/lib/Target/AMDGPU/VINTERPInstructions.td
67

I think setting the src operand type to VGPR_32 here is slightly wrong. The comment in SIRegisterInfo.td says use VRegSrc for operands that take only VGPRs and have enum{9} (are 9 bits in the encoding). The encoding for VINTERP has 9 bit fields. Functionally, it does not appear to make a difference.

dp updated this revision to Diff 472884.Nov 3 2022, 3:08 AM

Revert unnecessary (and incorrect) operand type changes as Joe suggested.

Joe_Nash accepted this revision.Nov 3 2022, 6:48 AM

LGTM

This revision is now accepted and ready to land.Nov 3 2022, 6:48 AM
This revision was automatically updated to reflect the committed changes.