aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 125a18dd24..c6dc2b92d4 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -271,14 +271,15 @@ addIntervalsForSpills(const LiveInterval &li, VirtRegMap &vrm, int slot) {
// can do this, we don't need to insert spill code.
if (lv_)
lv_->instructionChanged(MI, fmi);
- vrm.virtFolded(li.reg, MI, i, fmi);
+ MachineBasicBlock &MBB = *MI->getParent();
+ bool LiveOut = li.liveAt(getInstructionIndex(&MBB.back()) +
+ InstrSlots::NUM);
+ vrm.virtFolded(li.reg, MI, i, fmi, LiveOut);
mi2iMap_.erase(MI);
i2miMap_[index/InstrSlots::NUM] = fmi;
mi2iMap_[fmi] = index;
- MachineBasicBlock &MBB = *MI->getParent();
MI = MBB.insert(MBB.erase(MI), fmi);
++numFolded;
-
// Folding the load/store can completely change the instruction in
// unpredictable ways, rescan it from the beginning.
goto for_operand;