[llvm] [AMDGPU][Scheduler] Refactor VGPR rematerialization during scheduling (PR #118722)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 09:25:55 PST 2024


================
@@ -1716,6 +1712,11 @@ bool PreRARematStage::isTriviallyReMaterializable(const MachineInstr &MI) {
   if (!DAG.TII->isTriviallyReMaterializable(MI))
     return false;
 
+  // Even though TargetInstrInfo::isReallyTriviallyReMaterializable already
+  // ensures that the instruction has no virtual register uses,
+  // SIInstrInfo::isReallyTriviallyReMaterializable may consider an instruction
+  // rematerializable and return before calling its parent's method, so we need
+  // to double-check here.
----------------
arsenm wrote:

I think 08d7eec06e8cf5c15a96ce11f311f1480291a441 never got finished / reapplied

https://github.com/llvm/llvm-project/pull/118722


More information about the llvm-commits mailing list