[llvm] r333441 - AMDGPU: Add nuw to add off of kernarg ptr
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue May 29 10:42:38 PDT 2018
Author: arsenm
Date: Tue May 29 10:42:38 2018
New Revision: 333441
URL: http://llvm.org/viewvc/llvm-project?rev=333441&view=rev
Log:
AMDGPU: Add nuw to add off of kernarg ptr
Modified:
llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp?rev=333441&r1=333440&r2=333441&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp Tue May 29 10:42:38 2018
@@ -1035,8 +1035,7 @@ SDValue SITargetLowering::lowerKernArgPa
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,
More information about the llvm-commits
mailing list