[all-commits] [llvm/llvm-project] 48ab3e: [AMDGPU] Avoid SCC clobbering before S_CSELECT_B32

alex-t via All-commits all-commits at lists.llvm.org
Tue Nov 22 10:08:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 48ab3e75279a7a7d0221e9dc3b60c59cdf41330d
      https://github.com/llvm/llvm-project/commit/48ab3e75279a7a7d0221e9dc3b60c59cdf41330d
  Author: Alexander Timofeev <alexander.timofeev at amd.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
    A llvm/test/CodeGen/AMDGPU/use_restore_frame_reg.mir
    M llvm/test/CodeGen/AMDGPU/vgpr-spill-scc-clobber.mir

  Log Message:
  -----------
  [AMDGPU] Avoid SCC clobbering before S_CSELECT_B32

Frame lowering inserts scalar addition to compute the offset to the
stack objects.  This instructions inserted in arbitrary place and may clobber
SCC between its definition and S_CSELECT_B32 instruction.  This change
workarounds this particular code pattern. It queries the scavenger for SGPR and
if available saves SCC to it and restore its value after frame lowering code
insertion.

Reviewed By: foad

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




More information about the All-commits mailing list