AMDGPU: Add nuw to add off of kernarg ptr

llvm-svn: 333441
This commit is contained in:
Matt Arsenault 2018-05-29 17:42:38 +00:00
parent ab2b79cb97
commit 2fb9ccf770
1 changed files with 1 additions and 2 deletions

View File

@ -1035,8 +1035,7 @@ SDValue SITargetLowering::lowerKernArgParameterPtr(SelectionDAG &DAG,
SDValue BasePtr = DAG.getCopyFromReg(Chain, SL,
MRI.getLiveInVirtReg(InputPtrReg->getRegister()), PtrVT);
return DAG.getNode(ISD::ADD, SL, PtrVT, BasePtr,
DAG.getConstant(Offset, SL, PtrVT));
return DAG.getObjectPtrOffset(SL, BasePtr, Offset);
}
SDValue SITargetLowering::getImplicitArgPtr(SelectionDAG &DAG,