[X86] Preserve mem refs on newly created 'Store' node instead of 'Load' node when handling store unfolding.

Bug spotted by Steve King.

I have no idea how to test this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228672 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2015-02-10 06:29:28 +00:00
parent 5fc4b96e62
commit 77b557430c

View File

@ -5335,7 +5335,7 @@ X86InstrInfo::unfoldMemoryOperand(SelectionDAG &DAG, SDNode *N,
NewNodes.push_back(Store);
// Preserve memory reference information.
cast<MachineSDNode>(Load)->setMemRefs(MMOs.first, MMOs.second);
cast<MachineSDNode>(Store)->setMemRefs(MMOs.first, MMOs.second);
}
return true;