[llvm] [AMDGPU] Fix RewriteMFMAFormSchedStage (PR #193429)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 07:00:28 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 =
----------------
xgxanq wrote:
> Can move this to a separate helper function
ok
https://github.com/llvm/llvm-project/pull/193429
More information about the llvm-commits
mailing list