diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-10-22 03:03:20 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-10-22 03:03:20 +0000 |
commit | 42b08be973cc05a0718757308f8389882e167e79 (patch) | |
tree | e760de2d91bee9531957f94837bd719c50688107 /lib/Target | |
parent | cbfb9b27efd2b4fc1fbc02addf4d41a7d8d8d8eb (diff) | |
download | external_llvm-42b08be973cc05a0718757308f8389882e167e79.zip external_llvm-42b08be973cc05a0718757308f8389882e167e79.tar.gz external_llvm-42b08be973cc05a0718757308f8389882e167e79.tar.bz2 |
Fix an unfolding bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index c78db16..72e0fe4 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -1224,7 +1224,8 @@ bool X86RegisterInfo::unfoldMemoryOperand(MachineFunction &MF, MachineInstr *MI, MIB.addReg(Reg, true); for (unsigned i = 0, e = BeforeOps.size(); i != e; ++i) MIB = X86InstrAddOperand(MIB, BeforeOps[i]); - MIB.addReg(Reg); + if (FoldedLoad) + MIB.addReg(Reg); for (unsigned i = 0, e = AfterOps.size(); i != e; ++i) MIB = X86InstrAddOperand(MIB, AfterOps[i]); for (unsigned i = 0, e = ImpOps.size(); i != e; ++i) { |