From: Matt Arsenault Date: Fri, 8 Dec 2017 20:00:45 +0000 (+0000) Subject: AMDGPU: Preserve MMO in adjustWritemask X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9958d78ea3ec1c182b11202c537ce3d29a0d1c9;p=llvm AMDGPU: Preserve MMO in adjustWritemask Follow up to r319705. Currently the MMO is produced after this in the custom inserter, so this doesn't change anything yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320186 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AMDGPU/SIISelLowering.cpp b/lib/Target/AMDGPU/SIISelLowering.cpp index 18dc0fb430b..9f9f0a9007f 100644 --- a/lib/Target/AMDGPU/SIISelLowering.cpp +++ b/lib/Target/AMDGPU/SIISelLowering.cpp @@ -6656,6 +6656,8 @@ SDNode *SITargetLowering::adjustWritemask(MachineSDNode *&Node, MachineSDNode *NewNode = DAG.getMachineNode(NewOpcode, SDLoc(Node), NewVTList, Ops); + NewNode->setMemRefs(Node->memoperands_begin(), Node->memoperands_end()); + // Update chain. DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 1), SDValue(NewNode, 1));