[all-commits] [llvm/llvm-project] bd71e7: AMDGPU: Handle rewriting non-tied MFMA to AGPR form

Matt Arsenault via All-commits all-commits at lists.llvm.org
Wed Jul 16 00:02:21 PDT 2025


  Branch: refs/heads/users/arsenm/amdgpu/handle-untied-agpr-mfma-rewrite
  Home:   https://github.com/llvm/llvm-project
  Commit: bd71e73ff5a80d725c125fe5d1e583e3bcb5f214
      https://github.com/llvm/llvm-project/commit/bd71e73ff5a80d725c125fe5d1e583e3bcb5f214
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-07-16 (Wed, 16 Jul 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
    M llvm/test/CodeGen/AMDGPU/inflate-reg-class-vgpr-mfma-to-av-with-load-source.mir

  Log Message:
  -----------
  AMDGPU: Handle rewriting non-tied MFMA to AGPR form

If src2 and dst aren't the same register, to fold a copy
to AGPR into the instruction we also need to reassign src2
to an available AGPR. All the other uses of src2 also need
to be compatible with the AGPR replacement in order to avoid
inserting other copies somewhere else.

Perform this transform, after verifying all other uses are
compatible with AGPR, and have an available AGPR available at
all points (which effectively means rewriting a full chain of
mfmas and load/store at once).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list