[llvm] r228672 - [X86] Preserve mem refs on newly created 'Store' node instead of 'Load' node when handling store unfolding.
Craig Topper
craig.topper at gmail.com
Mon Feb 9 22:29:29 PST 2015
Author: ctopper
Date: Tue Feb 10 00:29:28 2015
New Revision: 228672
URL: http://llvm.org/viewvc/llvm-project?rev=228672&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=228672&r1=228671&r2=228672&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Tue Feb 10 00:29:28 2015
@@ -5335,7 +5335,7 @@ X86InstrInfo::unfoldMemoryOperand(Select
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;
More information about the llvm-commits
mailing list