]> granicus.if.org Git - llvm/commitdiff
AMDGPU/SI: Simplify code in SITargetLowering::LowerGlobalAddress()
authorTom Stellard <thomas.stellard@amd.com>
Fri, 17 Jun 2016 22:22:09 +0000 (22:22 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 17 Jun 2016 22:22:09 +0000 (22:22 +0000)
This change were suggested in http://reviews.llvm.org/D21154.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273059 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SIISelLowering.cpp

index 3fd002696c9c13c4ada5a0729b3f383beb06b5eb..acc712d6218695943ffaffd86bb2f68f1921c583 100644 (file)
@@ -1426,7 +1426,7 @@ SDValue SITargetLowering::LowerGlobalAddress(AMDGPUMachineFunction *MFI,
 
   SDLoc DL(GSD);
   const GlobalValue *GV = GSD->getGlobal();
-  MVT PtrVT = getPointerTy(DAG.getDataLayout(), GSD->getAddressSpace());
+  EVT PtrVT = Op.getValueType();
 
   // In order to support pc-relative addressing, the PC_ADD_REL_OFFSET SDNode is
   // lowered to the following code sequence: