summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2017-02-03 19:36:00 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2017-02-03 19:36:00 +0000
commitd9cd7365853d99b98fe89ff0a09bc0ad9aa2996d (patch)
tree65d6218d1f8fa8fbda2753385341239be3902bd9 /llvm/lib/Target/AMDGPU
parent2a735b71b6a5f98086e2843b8e3b7ef328bb51cc (diff)
downloadbcm5719-llvm-d9cd7365853d99b98fe89ff0a09bc0ad9aa2996d.tar.gz
bcm5719-llvm-d9cd7365853d99b98fe89ff0a09bc0ad9aa2996d.zip
AMDGPU: Don't unroll for private with dynamic allocas
This won't be elimnated, so this will just bloat code if/when these are ever used/supported. llvm-svn: 294030
Diffstat (limited to 'llvm/lib/Target/AMDGPU')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
index e48c55457b0..1eeff6e16d2 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
@@ -54,7 +54,7 @@ void AMDGPUTTIImpl::getUnrollingPreferences(Loop *L,
const Value *Ptr = GEP->getPointerOperand();
const AllocaInst *Alloca =
dyn_cast<AllocaInst>(GetUnderlyingObject(Ptr, DL));
- if (Alloca) {
+ if (Alloca && Alloca->isStaticAlloca()) {
Type *Ty = Alloca->getAllocatedType();
unsigned AllocaSize = Ty->isSized() ? DL.getTypeAllocSize(Ty) : 0;
if (AllocaSize > MaxAlloca)
OpenPOWER on IntegriCloud