[llvm] 1f86deb - AMDGPU: Add debug printing for early exit if there are no AGPRs allocated

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 10 17:39:11 PDT 2025


Author: Matt Arsenault
Date: 2025-08-11T09:27:05+09:00
New Revision: 1f86deb5a42517444378442e7c38580622069081

URL: https://github.com/llvm/llvm-project/commit/1f86deb5a42517444378442e7c38580622069081
DIFF: https://github.com/llvm/llvm-project/commit/1f86deb5a42517444378442e7c38580622069081.diff

LOG: AMDGPU: Add debug printing for early exit if there are no AGPRs allocated

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp b/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
index c21a9a1894a32..0b6c32c45a9b8 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
@@ -96,8 +96,10 @@ bool AMDGPURewriteAGPRCopyMFMAImpl::run(MachineFunction &MF) const {
     return false;
 
   // Early exit if no AGPRs were assigned.
-  if (!LRM.isPhysRegUsed(AMDGPU::AGPR0))
+  if (!LRM.isPhysRegUsed(AMDGPU::AGPR0)) {
+    LLVM_DEBUG(dbgs() << "skipping function that did not allocate AGPRs\n");
     return false;
+  }
 
   bool MadeChange = false;
 


        


More information about the llvm-commits mailing list