[llvm-branch-commits] [llvm] [AMDGPU] Fix (PR #115505)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Nov 8 08:09:45 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Shilei Tian (shiltian)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/115505.diff
1 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/SIFrameLowering.cpp (+10-1)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
index 13a2db7a87b437..8e3208abaec9a5 100644
--- a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
@@ -59,9 +59,18 @@ static MCRegister findScratchNonCalleeSaveRegister(
if (Unused)
return findUnusedRegister(MRI, LiveUnits, RC);
+ dbgs() << "--------\n";
+
for (MCRegister Reg : RC) {
- if (LiveUnits.available(Reg) && !MRI.isReserved(Reg))
+ dbgs() << "reg " << Reg << " avail? " << LiveUnits.available(Reg)
+ << ", reserved? " << MRI.isReserved(Reg) << "\n";
+ }
+
+ for (MCRegister Reg : RC) {
+ if (LiveUnits.available(Reg) && !MRI.isReserved(Reg)) {
+ dbgs() << "--------choose reg " << Reg << '\n';
return Reg;
+ }
}
return MCRegister();
``````````
</details>
https://github.com/llvm/llvm-project/pull/115505
More information about the llvm-branch-commits
mailing list