1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

R600/SI: Fix promote alloca pass breaking addrspacecast

llvm-svn: 217776
This commit is contained in:
Matt Arsenault 2014-09-15 15:41:44 +00:00
parent ba32132ca5
commit f550e3cb27

View File

@ -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;
}