[all-commits] [llvm/llvm-project] 08140d: [AMDGPU] Add optional tied-op for wwm-register's e...

Christudasan Devadasan via All-commits all-commits at lists.llvm.org
Mon May 15 22:37:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 08140d165e3d5b2257b26099469f7ae10c284dc7
      https://github.com/llvm/llvm-project/commit/08140d165e3d5b2257b26099469f7ae10c284dc7
  Author: Christudasan Devadasan <Christudasan.Devadasan at amd.com>
  Date:   2023-05-16 (Tue, 16 May 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
    M llvm/test/CodeGen/AMDGPU/preserve-only-inactive-lane.mir
    A llvm/test/CodeGen/AMDGPU/tied-op-for-wwm-scratch-reg-spill-restore.mir

  Log Message:
  -----------
  [AMDGPU] Add optional tied-op for wwm-register's epilog spill restore

The COPY inserted in the epilog block before return instruction as part
of ABI lowering, can get optimized during machine copy propagation if
the same register is used earlier in a wwm operation that demands the
prolog/epilog wwm-spill store/restore to preserve its inactive lanes.
With the spill restore in the epilog, the preceding COPY appears to be
dead during machine-cp. To avoid it, mark the same register as a tied-op
in the spill restore instruction to ensure a usage for the COPY.

Reviewed By: arsenm

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




More information about the All-commits mailing list