[llvm] [AMDGPU] Add scheduling stage to rewrite MFMA from VGPR to AGPR (PR #149367)
Lucas Ramirez via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 07:53:48 PDT 2025
================
@@ -1642,6 +1755,534 @@ void GCNSchedStage::revertScheduling() {
DAG.Regions[RegionIdx] = std::pair(DAG.RegionBegin, DAG.RegionEnd);
}
+bool RewriteScheduleStage::isRewriteCandidate(MachineInstr *MI) const {
+
+ if (!static_cast<const SIInstrInfo *>(DAG.TII)->isMAI(*MI))
+ return false;
+ return AMDGPU::getMFMASrcCVDstAGPROp(MI->getOpcode()) != -1;
----------------
lucas-rami wrote:
I think you can directly call `getMFMASrcCVDstAGPROp`; it will return -1 if the `MI` is not an MFMA.
https://github.com/llvm/llvm-project/pull/149367
More information about the llvm-commits
mailing list