[llvm] r338428 - DAG: Correct pointer type used for stack slot

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 31 12:51:20 PDT 2018


Author: arsenm
Date: Tue Jul 31 12:51:20 2018
New Revision: 338428

URL: http://llvm.org/viewvc/llvm-project?rev=338428&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=338428&r1=338427&r2=338428&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Jul 31 12:51:20 2018
@@ -8335,7 +8335,8 @@ TargetLowering::LowerCallTo(TargetLoweri
     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;




More information about the llvm-commits mailing list