AMDGPU: Also track whether SGPRs were spilled
[oota-llvm.git] / lib / Target / AMDGPU / SIInstrInfo.cpp
index b6e1a9cbf6ae25842681f9ab8b27c5156d1a2eb2..9068c1778784916dcbf78f5e3937dbd663bb5226 100644 (file)
@@ -484,6 +484,8 @@ void SIInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
   int Opcode = -1;
 
   if (RI.isSGPRClass(RC)) {
+    MFI->setHasSpilledSGPRs();
+
     // We are only allowed to create one new instruction when spilling
     // registers, so we need to use pseudo instruction for spilling
     // SGPRs.