[AMDGPU] Fixed isLegalRegOperand() with physregs
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 23 Oct 2020 18:06:18 +0000 (11:06 -0700)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 23 Oct 2020 18:33:34 +0000 (11:33 -0700)
commit2e64ad94948763a4f9a289265dbce4ce1d22591b
treeb45888f5a59f18638a1e11cae0e34673c1f73207
parent1602c6fd9294494aaa7461e258602d486166b303
[AMDGPU] Fixed isLegalRegOperand() with physregs

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.

Differential Revision: https://reviews.llvm.org/D90064
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp