aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/PreAllocSplitting.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-10-27 23:21:01 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-10-27 23:21:01 +0000
commitb3990d5e948769a16d4ee77dbdff8a2bed8fb126 (patch)
tree576c709653e9a0f2655487d66bc267a007660b8d /lib/CodeGen/PreAllocSplitting.cpp
parent8e7fa916fe87733b3660466b3a1c91d650c473d3 (diff)
Remove val# defined by a remat'ed def that is now dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r--lib/CodeGen/PreAllocSplitting.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp
index 33e3e8054c..09694403e3 100644
--- a/lib/CodeGen/PreAllocSplitting.cpp
+++ b/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.