Test? I’m also note sure we get much value by tracking these here. I don’t think they are accurate for shaders
There are several places behaving slightly differently by checking getNumPreloadedSGPRs, which is the sum of NumUserSGPRs and NumSystemSGRPs. The test in https://reviews.llvm.org/D64145 relies on that to avoid assigning a preloaded register again.