[llvm] [AMDGPU] Fix RewriteMFMAFormSchedStage (PR #193429)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 04:41:04 PDT 2026
================
@@ -2354,6 +2361,38 @@ int64_t RewriteMFMAFormStage::getRewriteCost(
unsigned AGPRThreshold = MaxVectorRegs.second;
unsigned CombinedThreshold = ST.getMaxNumVGPRs(MF);
+ // Reset the classes that were changed to AGPR for better RB analysis.
+ // We must do rewriting after copy-insertion, as some defs of the register
+ // may require VGPR. Additionally, if we bail out and don't perform the
+ // rewrite then these need to be restored anyway.
+ auto ResetRewriteCandsToVGPR =
----------------
arsenm wrote:
Can move this to a separate helper function
https://github.com/llvm/llvm-project/pull/193429
More information about the llvm-commits
mailing list