From: Craig Topper Date: Tue, 10 Feb 2015 06:29:28 +0000 (+0000) Subject: [X86] Preserve mem refs on newly created 'Store' node instead of 'Load' node when... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=77b557430c1315ef50c3256cdc5e73ac54d0154e [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 --- 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;