From 77b557430c1315ef50c3256cdc5e73ac54d0154e Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 10 Feb 2015 06:29:28 +0000 Subject: [PATCH] [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 --- lib/Target/X86/X86InstrInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index a5d3d27df4a..6f8405cf62c 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -5335,7 +5335,7 @@ X86InstrInfo::unfoldMemoryOperand(SelectionDAG &DAG, SDNode *N, NewNodes.push_back(Store); // Preserve memory reference information. - cast(Load)->setMemRefs(MMOs.first, MMOs.second); + cast(Store)->setMemRefs(MMOs.first, MMOs.second); } return true; -- 2.34.1