[all-commits] [llvm/llvm-project] 2877b8: [AMDGPU] Lower VGPR to physical SGPR COPY to S_MOV...

alex-t via All-commits all-commits at lists.llvm.org
Thu Dec 15 15:38:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2877b876666079b3af9714692790fd5e1b5f038c
      https://github.com/llvm/llvm-project/commit/2877b876666079b3af9714692790fd5e1b5f038c
  Author: Alexander Timofeev <alexander.timofeev at amd.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
    M llvm/lib/Target/AMDGPU/SIInstructions.td
    A llvm/test/CodeGen/AMDGPU/vgpr_constant64_to_sgpr.mir
    A llvm/test/CodeGen/AMDGPU/vgpr_constant_to_sgpr.ll

  Log Message:
  -----------
  [AMDGPU] Lower VGPR to physical SGPR COPY to S_MOV_B32 if VGPR contains the compile time constant

Sometimes we have a constant value loaded to VGPR. In case we further
need to rematrerialize it in the physical scalar register we may avoid VGPR to
SGPR copy replacing it with S_MOV_B32.

Reviewed By: JonChesterfield, arsenm

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




More information about the All-commits mailing list