Skip to content

Commit 904e5e0

Browse files
committed
addressing feedback, move tests to promote-alloca-vector-dynamic-idx.ll, test different limit values
1 parent 8e31b85 commit 904e5e0

File tree

3 files changed

+536
-81
lines changed

3 files changed

+536
-81
lines changed

llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ static cl::opt<unsigned>
8585
"when sorting profitable allocas"),
8686
cl::init(4));
8787

88-
static cl::opt<unsigned> DynamicIndexNumberElementLimit(
89-
"amdgpu-dynamic-index-num-element-limit",
88+
static cl::opt<unsigned> PromoteAllocaDynamicIndexNumberElementLimit(
89+
"amdgpu-promote-alloca-dynamic-index-num-element-limit",
9090
cl::desc("Maximum number of elements for promoting alloca with dynamic"
9191
" index"),
9292
cl::init(8));
@@ -932,7 +932,7 @@ bool AMDGPUPromoteAllocaImpl::tryPromoteAllocaToVector(AllocaInst &Alloca) {
932932
if (auto *UserVecTy =
933933
dyn_cast<FixedVectorType>(GEP->getSourceElementType())) {
934934
if (UsedInLoad &&
935-
UserVecTy->getNumElements() > DynamicIndexNumberElementLimit) {
935+
UserVecTy->getNumElements() > PromoteAllocaDynamicIndexNumberElementLimit) {
936936
return RejectUser(Inst,
937937
"user has too many elements for dynamic index");
938938
}

0 commit comments

Comments
 (0)