[all-commits] [llvm/llvm-project] 082e22: [AMDGPU] Always reserve flat scratch SGPR for arch...

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Fri Sep 24 09:47:04 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 082e22f3d72bd63f9b388d5566064cf3736da511
      https://github.com/llvm/llvm-project/commit/082e22f3d72bd63f9b388d5566064cf3736da511
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
    M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
    M llvm/test/CodeGen/AMDGPU/flat-scratch-reg.ll

  Log Message:
  -----------
  [AMDGPU] Always reserve flat scratch SGPR for architected flat scratch

With architected flat scratch it becomes readonly. We must always
reserve SGPR pair for it even if we do not use scratch at all since
an attempt to write to SGPRs mapped to FLAT_SCRATCH results in
memory violation.

This is not needed since GFX10 with architected flat scratch though
since special SGPRs are not carving space from normal SGPRs.

Differential Revision: https://reviews.llvm.org/D110376




More information about the All-commits mailing list