diff options
Diffstat (limited to 'llvm/lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PreAllocSplitting.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp index 33e3e8054ce..09694403e3f 100644 --- a/llvm/lib/CodeGen/PreAllocSplitting.cpp +++ b/llvm/lib/CodeGen/PreAllocSplitting.cpp @@ -561,6 +561,9 @@ bool PreAllocSplitting::SplitRegLiveInterval(LiveInterval *LI) { SpillMI = prior(SpillPt); LIs->InsertMachineInstrInMaps(SpillMI, SpillIndex); } else if (!PrevSpilled) { + if (!DefMI) + // Def is dead. Do nothing. + return false; // If it's already split, just restore the value. There is no need to spill // the def again. // Check if it's possible to insert a spill after the def MI. |