diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-09-15 15:41:44 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-09-15 15:41:44 +0000 |
commit | 65f67e4dfe837d8aff8d9b30cecc7247466d6f52 (patch) | |
tree | d7bd826e8395902ceaea153ab1b448d7d361f888 | |
parent | 5c4d8409b32cb7e03a2a63dce210f57e99d2a768 (diff) | |
download | bcm5719-llvm-65f67e4dfe837d8aff8d9b30cecc7247466d6f52.tar.gz bcm5719-llvm-65f67e4dfe837d8aff8d9b30cecc7247466d6f52.zip |
R600/SI: Fix promote alloca pass breaking addrspacecast
llvm-svn: 217776
-rw-r--r-- | llvm/lib/Target/R600/AMDGPUPromoteAlloca.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUPromoteAlloca.cpp b/llvm/lib/Target/R600/AMDGPUPromoteAlloca.cpp index 620925a62b1..4a6c10455df 100644 --- a/llvm/lib/Target/R600/AMDGPUPromoteAlloca.cpp +++ b/llvm/lib/Target/R600/AMDGPUPromoteAlloca.cpp @@ -329,6 +329,13 @@ void AMDGPUPromoteAlloca::visitAlloca(AllocaInst &I) { if (!Call) { Type *EltTy = V->getType()->getPointerElementType(); PointerType *NewTy = PointerType::get(EltTy, AMDGPUAS::LOCAL_ADDRESS); + + // The operand's value should be corrected on its own. + if (isa<AddrSpaceCastInst>(V)) + continue; + + // FIXME: It doesn't really make sense to try to do this for all + // instructions. V->mutateType(NewTy); continue; } |