[PATCH] D117253: [AMDGPU] Select VGPR versions of MFMA if possible

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 17 16:49:22 PST 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:103
+
+    if (ST.hasGFX90AInsts() && !HasCalls &&
+        ST.getMaxNumVGPRs(F) <= AMDGPU::VGPR_32RegClass.getNumRegs() &&
----------------
Relying on the calls check here is unreliable. Since you only really need to query this before selection, can't we just see when an asm statement containing AGPRs is hit?


================
Comment at: llvm/test/CodeGen/AMDGPU/mfma-bf16-vgpr-cd-select.ll:2
+; RUN: llc -march=amdgcn -mcpu=gfx90a -verify-machineinstrs < %s | FileCheck --enable-var-scope --check-prefixes=GCN %s
+; RUN: llc -march=amdgcn -mcpu=gfx90a -global-isel -verify-machineinstrs < %s | FileCheck --enable-var-scope --check-prefixes=GCN %s
+
----------------
Move the -global-isel flag to the first argument


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117253/new/

https://reviews.llvm.org/D117253



More information about the llvm-commits mailing list