From: Matt Arsenault Date: Tue, 31 Jul 2018 19:51:20 +0000 (+0000) Subject: DAG: Correct pointer type used for stack slot X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e946b0193e91188ec2f994f04407b9f68a64317c;p=llvm DAG: Correct pointer type used for stack slot Correct the address space for the inserted argument stack slot. AMDGPU seems to not do anything with this information, so I don't think this was breaking anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338428 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index e2a5316d09e..5f6b6010cae 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -8335,7 +8335,8 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const { unsigned Align = DL.getPrefTypeAlignment(CLI.RetTy); MachineFunction &MF = CLI.DAG.getMachineFunction(); DemoteStackIdx = MF.getFrameInfo().CreateStackObject(TySize, Align, false); - Type *StackSlotPtrType = PointerType::getUnqual(CLI.RetTy); + Type *StackSlotPtrType = PointerType::get(CLI.RetTy, + DL.getAllocaAddrSpace()); DemoteStackSlot = CLI.DAG.getFrameIndex(DemoteStackIdx, getFrameIndexTy(DL)); ArgListEntry Entry;