From b3990d5e948769a16d4ee77dbdff8a2bed8fb126 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 27 Oct 2008 23:21:01 +0000 Subject: 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 --- lib/CodeGen/PreAllocSplitting.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/CodeGen/PreAllocSplitting.cpp') 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. -- cgit v1.2.3