llvm-project
d81e8afe - [AMDGPU] RewriteMFMAFormStage: fix SpillCost early-return missing reset (#199708)

Commit
94 days ago
[AMDGPU] RewriteMFMAFormStage: fix SpillCost early-return missing reset (#199708) Extract resetRewriteCandsToVGPR() to consolidate the logic that restores MFMA candidates from AGPR form back to VGPR form after cost analysis. getRewriteCost() returned early when SpillCost > 0 without resetting the AGPR-form register classes set by initHeuristics(), leaving MRI in a corrupted state. Call resetRewriteCandsToVGPR() on both the early-return path and the normal exit path to fix this. Also change getRewriteCost() and rewrite() to take ArrayRef instead of const std::vector& for cleaner API. --------- Co-authored-by: Claude Sonnet 4 (1M context) <noreply@anthropic.com>
Author
Parents
Loading