From 035f02cb2347eab22318f1bfce465edeaab20459 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 15 Sep 2014 15:41:44 +0000 Subject: [PATCH] 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 --- lib/Target/R600/AMDGPUPromoteAlloca.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Target/R600/AMDGPUPromoteAlloca.cpp b/lib/Target/R600/AMDGPUPromoteAlloca.cpp index 620925a62b1..4a6c10455df 100644 --- a/lib/Target/R600/AMDGPUPromoteAlloca.cpp +++ b/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(V)) + continue; + + // FIXME: It doesn't really make sense to try to do this for all + // instructions. V->mutateType(NewTy); continue; } -- 2.34.1