[llvm] [AMDGPU] Gate runtime unroll of LDS loops instead of overriding it (PR #222853)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 04:03:39 PDT 2026
================
@@ -225,9 +225,9 @@ void AMDGPUTTIImpl::getUnrollingPreferences(
(!isa<GlobalVariable>(GEP->getPointerOperand()) &&
!isa<Argument>(GEP->getPointerOperand())))
continue;
- LLVM_DEBUG(dbgs() << "Allow unroll runtime for loop:\n"
+ LLVM_DEBUG(dbgs() << "Gating unroll runtime by local knob for loop:\n"
<< *L << " due to LDS use.\n");
- UP.Runtime = UnrollRuntimeLocal;
+ UP.Runtime &= UnrollRuntimeLocal;
----------------
arsenm wrote:
```suggestion
if (!UP.Runtime && UnrollRuntimeLocal) {
LLVM_DEBUG(dbgs() << "Gating unroll runtime by local knob for loop:\n"
<< *L << " due to LDS use.\n");
UP.Runtime = true;
```
Try to make the debug printing more accurate?
https://github.com/llvm/llvm-project/pull/222853
More information about the llvm-commits
mailing list