[llvm] r217776 - R600/SI: Fix promote alloca pass breaking addrspacecast
Matt Arsenault
Matthew.Arsenault at amd.com
Mon Sep 15 08:41:45 PDT 2014
Author: arsenm
Date: Mon Sep 15 10:41:44 2014
New Revision: 217776
URL: http://llvm.org/viewvc/llvm-project?rev=217776&view=rev
Log:
R600/SI: Fix promote alloca pass breaking addrspacecast
Modified:
llvm/trunk/lib/Target/R600/AMDGPUPromoteAlloca.cpp
Modified: llvm/trunk/lib/Target/R600/AMDGPUPromoteAlloca.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUPromoteAlloca.cpp?rev=217776&r1=217775&r2=217776&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUPromoteAlloca.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUPromoteAlloca.cpp Mon Sep 15 10:41:44 2014
@@ -329,6 +329,13 @@ void AMDGPUPromoteAlloca::visitAlloca(Al
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;
}
More information about the llvm-commits
mailing list