[all-commits] [llvm/llvm-project] 2973fe: [AMDGPU] Force the third source operand of the MAI...

alex-t via All-commits all-commits at lists.llvm.org
Mon Oct 23 10:41:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2973febe1087353be285d84afc82a5cbe49a5b9f
      https://github.com/llvm/llvm-project/commit/2973febe1087353be285d84afc82a5cbe49a5b9f
  Author: alex-t <alex-t at users.noreply.github.com>
  Date:   2023-10-23 (Mon, 23 Oct 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    A llvm/test/CodeGen/AMDGPU/smfmac_no_agprs.ll

  Log Message:
  -----------
  [AMDGPU] Force the third source operand of the MAI instructions to VGPR if no AGPRs are used. (#69720)

eaf85b9c28 "[AMDGPU] Select VGPR versions of MFMA if possible" prevents
the compiler from reserving AGPRs if a kernel has no inline asm
explicitly using AGPRs, no calls, and runs at least 2 waves with not
more than 256 VGPRs. This, in turn, makes it impossible to allocate AGPR
if necessary. As a result, regalloc fails in case we have an MAI
instruction that has at least one AGPR operand.
This change checks if we have AGPRs and forces operands to VGPR if we do
not have them.

---------

Co-authored-by: Alexander Timofeev <alexander.timofeev at amd.com>




More information about the All-commits mailing list