[llvm] [AMDGPU][Scheduler] Fix inconsistent MI slots after rematerialization revert (PR #180646)
Dark Steve via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 10 21:51:00 PST 2026
================
@@ -3109,30 +3085,66 @@ void PreRARematStage::finalizeGCNSchedStage() {
commitRematerializations();
return;
}
+
+ // It is possible that re-scheduling lowers occupancy over the one achieved
+ // just through rematerializations, in which case we revert re-scheduling in
+ // all regions but do not roll back rematerializations.
+ const bool ShouldRollbackRemats = AchievedOcc < *TargetOcc;
+
+ // When we both need to revert re-scheduling and rollback rematerializations,
----------------
PrasoonMishra wrote:
What about when we are not rolling back the remats but reverting re-scheduling? Won't DefMIs still be DBG_VALUE during the revert, leading to the stale slot issue?
https://github.com/llvm/llvm-project/pull/180646
More information about the llvm-commits
mailing list