[llvm] [AMDGPU] Fix illegal AGPR reclassification in RewriteMFMAFormStage (PR #200972)
Petr Kurapov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 08:54:47 PDT 2026
================
@@ -2263,6 +2265,25 @@ static bool isReachingDefAGPRForm(MachineInstr *RD,
return false;
}
+bool RewriteMFMAFormStage::hasUseRequiringVGPR(
+ ArrayRef<SlotIndex> Src2ReachingDefs,
+ const SmallPtrSetImpl<MachineInstr *> &RewriteSet) {
+ for (SlotIndex RDIdx : Src2ReachingDefs) {
+ const MachineInstr *RD = DAG.LIS->getInstructionFromIndex(RDIdx);
+ SmallVector<MachineOperand *, 8> ReachingUses;
+ findReachingUses(RD, DAG.LIS, ReachingUses);
----------------
kurapov-peter wrote:
So this is gonna run per candidate and for each use look for reaching defs. Can the info be at least reused between heuristic init and the rewrite?
https://github.com/llvm/llvm-project/pull/200972
More information about the llvm-commits
mailing list