[AMDGPU] Cleanup assumptions about generated subregs
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 6 Feb 2020 22:47:10 +0000 (14:47 -0800)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 7 Feb 2020 01:39:24 +0000 (17:39 -0800)
commitcacc3b7a557af837a3ae01cd085e3d435aae6e1f
tree5fc81bb1b349c657a67235f9c5895ef923d84d83
parent2863c269683b89961025d8d5c61a87ade90d3be3
[AMDGPU] Cleanup assumptions about generated subregs

We are using countPopulation on a LaneBitmask to determine
a number of registers it covers. This is the assumption which
does not necessarily need to be true. It is not changed but
factored into a single call SIRegisterInfo::getNumCoveredRegs().

Some other places are cleaned up with respect to assumptions
about subreg indexes values and tablegen behavior.

Differential Revision: https://reviews.llvm.org/D74177
llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp
llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
llvm/lib/Target/AMDGPU/SIAddIMGInit.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.h
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.h
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp