[llvm] [AMDGPU][Scheduler] Use `AMDGPU::NoSubRegister` instead of 0 (NFC) (PR #150610)

Lucas Ramirez via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 25 05:14:30 PDT 2025


https://github.com/lucas-rami created https://github.com/llvm/llvm-project/pull/150610

None

>From cc7fd1984c59fbcd139a3764159c092ec3b3fa29 Mon Sep 17 00:00:00 2001
From: Lucas Ramirez <lucas.rami at proton.me>
Date: Fri, 25 Jul 2025 12:13:28 +0000
Subject: [PATCH] Use AMDGPU::NoSubRegister instead of 0

---
 llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp b/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
index 3c3247a4a17c5..ce1ce687d0038 100644
--- a/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
@@ -1914,8 +1914,8 @@ void PreRARematStage::rematerialize() {
     unsigned DefRegion = MIRegion.at(DefMI);
 
     // Rematerialize DefMI to its use block.
-    TII->reMaterialize(*InsertPos->getParent(), InsertPos, Reg, 0, *DefMI,
-                       *DAG.TRI);
+    TII->reMaterialize(*InsertPos->getParent(), InsertPos, Reg,
+                       AMDGPU::NoSubRegister, *DefMI, *DAG.TRI);
     Remat.RematMI = &*std::prev(InsertPos);
     DAG.LIS->InsertMachineInstrInMaps(*Remat.RematMI);
 
@@ -2066,7 +2066,8 @@ void PreRARematStage::finalizeGCNSchedStage() {
     // Re-rematerialize MI at the end of its original region. Note that it may
     // not be rematerialized exactly in the same position as originally within
     // the region, but it should not matter much.
-    TII->reMaterialize(*MBB, InsertPos, Reg, 0, RematMI, *DAG.TRI);
+    TII->reMaterialize(*MBB, InsertPos, Reg, AMDGPU::NoSubRegister, RematMI,
+                       *DAG.TRI);
     MachineInstr *NewMI = &*std::prev(InsertPos);
     DAG.LIS->InsertMachineInstrInMaps(*NewMI);
 



More information about the llvm-commits mailing list