13c0316 [AMDGPU] Restrict immediate scratch offsets

Authored and Committed by Sebastian Neubauer 2 years ago
    [AMDGPU] Restrict immediate scratch offsets
    
    gfx9 does not work with negative offsets, gfx10 works only with
    aligned negative offsets, but not with unaligned negative offsets.
    
    This is slightly more conservative than needed, gfx9 does support
    negative offsets when a VGPR address is used and gfx10 supports
    negative, unaligned offsets when an SGPR address is used, but we
    do not make use of that with this patch.
    
    Differential Revision: https://reviews.llvm.org/D101292