This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fixed isLegalRegOperand() with physregs
ClosedPublic

Authored by rampitec on Oct 23 2020, 11:13 AM.

Details

Summary

This does not change anything at the moment, but needed for
D89170. In that change I am probing a physical SGPR to see if
it is legal. RC is SReg_32, but DRC for scratch instructions
is SReg_32_XEXEC_HI and test fails.

That is sufficient just to check if DRC contains a register
here in case of physreg. Physregs also do not use subregs
so the subreg handling below is irrelevant for these.

Diff Detail

Event Timeline

rampitec created this revision.Oct 23 2020, 11:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 23 2020, 11:13 AM
rampitec requested review of this revision.Oct 23 2020, 11:13 AM
arsenm accepted this revision.Oct 23 2020, 11:30 AM
This revision is now accepted and ready to land.Oct 23 2020, 11:30 AM
This revision was automatically updated to reflect the committed changes.