HomePhabricator

[AMDGPU] Cleanup assumptions about generated subregs

Authored by rampitec on Feb 6 2020, 2:47 PM.

Description

[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