File tree Expand file tree Collapse file tree 2 files changed +3
-70
lines changed
test/Transforms/LoopUnroll/AMDGPU Expand file tree Collapse file tree 2 files changed +3
-70
lines changed Original file line number Diff line number Diff line change @@ -217,13 +217,10 @@ void AMDGPUTTIImpl::getUnrollingPreferences(
217217 // a variable, most likely we will be unable to combine it.
218218 // Do not unroll too deep inner loops for local memory to give a chance
219219 // to unroll an outer loop for a more important reason.
220- if (LocalGEPsSeen > 1 || L->getLoopDepth () > 2 )
220+ if (LocalGEPsSeen > 1 || L->getLoopDepth () > 2 ||
221+ (!isa<GlobalVariable>(GEP->getPointerOperand ()) &&
222+ !isa<Argument>(GEP->getPointerOperand ())))
221223 continue ;
222-
223- const Value *V = getUnderlyingObject (GEP->getPointerOperand ());
224- if (!isa<GlobalVariable>(V) && !isa<Argument>(V))
225- continue ;
226-
227224 LLVM_DEBUG (dbgs () << " Allow unroll runtime for loop:\n "
228225 << *L << " due to LDS use.\n " );
229226 UP.Runtime = UnrollRuntimeLocal;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments