We are using flat scratch on CI as well, so we need to reserve registers for that.
It does, yes. I see however a test where 104 SGPRs are allocated on CI which exceeds the limit. MFI.hasFlatScratchInit() returns false, and whole spilling went to VGPRs, but we still mark scratch as used. I suppose that is already a separate problem of not releasing scratch.