[PATCH] D21484: AMDGPU/SI: Add support for R_AMDGPU_GOTPCREL

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 20:40:41 PDT 2016

tstellarAMD added inline comments.

Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:1478-1483
@@ +1477,8 @@
+  // FIXME: Most targets use MachinePointerInfo::getGOT() here, but the address
+  // space for MachinePointerInfo with a PseudoSourceValue is hard-coded to 0,
+  // and we want the GOT to go in the constant address space.
+  Type *Ty = PtrVT.getTypeForEVT(*DAG.getContext());
+  PointerType *PtrTy = PointerType::get(Ty, AMDGPUAS::CONSTANT_ADDRESS);
+  MachinePointerInfo PtrInfo(UndefValue::get(PtrTy));
arsenm wrote:
> D13575 really needs to be committed
I don't think D13575 will help with this.  MachinePointerInfo assumes address space zero for all PseudoSourceValues.


More information about the llvm-commits mailing list