mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
R600/SI: Fix promote alloca pass breaking addrspacecast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e0a7bbcf40
commit
035f02cb23
@ -329,6 +329,13 @@ void AMDGPUPromoteAlloca::visitAlloca(AllocaInst &I) {
|
|||||||
if (!Call) {
|
if (!Call) {
|
||||||
Type *EltTy = V->getType()->getPointerElementType();
|
Type *EltTy = V->getType()->getPointerElementType();
|
||||||
PointerType *NewTy = PointerType::get(EltTy, AMDGPUAS::LOCAL_ADDRESS);
|
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);
|
V->mutateType(NewTy);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user