diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-03-31 23:19:51 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-03-31 23:19:51 +0000 |
commit | 4c7ab52dd1c8c290c89bc13f4351628a15ea9e7f (patch) | |
tree | dc250526b9a0b0024e77ee0067df56f6a4ea1623 /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 7174222a3bfffeec455ee2acd1c2570c017f39ec (diff) | |
download | external_llvm-4c7ab52dd1c8c290c89bc13f4351628a15ea9e7f.zip external_llvm-4c7ab52dd1c8c290c89bc13f4351628a15ea9e7f.tar.gz external_llvm-4c7ab52dd1c8c290c89bc13f4351628a15ea9e7f.tar.bz2 |
It's not safe to fold a load from GV stub or constantpool into a two-address use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 621c83d..f29b61b 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -757,8 +757,9 @@ bool LiveIntervals::tryFoldMemoryOperand(MachineInstr* &MI, if (FilterFoldedOps(MI, Ops, MRInfo, FoldOps)) return false; - // Can't fold a load from fixed stack slot into a two address instruction. - if (isSS && DefMI && (MRInfo & VirtRegMap::isMod)) + // The only time it's safe to fold into a two address instruction is when + // it's folding reload and spill from / into a spill stack slot. + if (DefMI && (MRInfo & VirtRegMap::isMod)) return false; MachineInstr *fmi = isSS ? tii_->foldMemoryOperand(*mf_, MI, FoldOps, Slot) |