all but CAS working on x86
[oota-llvm.git] / lib / CodeGen / LiveIntervalAnalysis.cpp
index 716c3701102f1b45c358e4328b2c31baa1570786..00ba2e770b05acdc2f291f422b07713b89c5001f 100644 (file)
@@ -764,6 +764,9 @@ bool LiveIntervals::tryFoldMemoryOperand(MachineInstr* &MI,
   MachineInstr *fmi = isSS ? tii_->foldMemoryOperand(*mf_, MI, FoldOps, Slot)
                            : tii_->foldMemoryOperand(*mf_, MI, FoldOps, DefMI);
   if (fmi) {
+    // Remember this instruction uses the spill slot.
+    if (isSS) vrm.addSpillSlotUse(Slot, fmi);
+
     // Attempt to fold the memory reference into the instruction. If
     // we can do this, we don't need to insert spill code.
     if (lv_)