DataLayout is mandatory, update the API to reflect it with references.
[oota-llvm.git] / lib / Target / R600 / R600ISelLowering.cpp
index c7386118be95bc748f774024837d8c1837a0ef7e..d4f3145e6aef517dd4385b38e1b94e6e773a8a91 100644 (file)
@@ -1479,8 +1479,8 @@ SDValue R600TargetLowering::LowerLOAD(SDValue Op, SelectionDAG &DAG) const
 
   // Lower loads constant address space global variable loads
   if (LoadNode->getAddressSpace() == AMDGPUAS::CONSTANT_ADDRESS &&
-      isa<GlobalVariable>(
-          GetUnderlyingObject(LoadNode->getMemOperand()->getValue()))) {
+      isa<GlobalVariable>(GetUnderlyingObject(
+          LoadNode->getMemOperand()->getValue(), *getDataLayout()))) {
 
     SDValue Ptr = DAG.getZExtOrTrunc(LoadNode->getBasePtr(), DL,
         getPointerTy(AMDGPUAS::PRIVATE_ADDRESS));