summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-31 23:19:51 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-31 23:19:51 +0000
commite4f77c69ac8909f7272c5e25e4857c8f9305618e (patch)
treee5aa7654d7ee03ee264e6300db4c021c07d76e12 /llvm/lib/CodeGen
parent3bcfc6edc081df57ecb9f5fcd61b328630f2398b (diff)
downloadbcm5719-llvm-e4f77c69ac8909f7272c5e25e4857c8f9305618e.tar.gz
bcm5719-llvm-e4f77c69ac8909f7272c5e25e4857c8f9305618e.zip
It's not safe to fold a load from GV stub or constantpool into a two-address use.
llvm-svn: 49002
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 621c83df7aa..f29b61b59fc 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud