From 5c482cd38f83f6fc1b95f86478e684e5f072399e Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 5 Apr 2011 23:43:14 +0000 Subject: [PATCH] Don't crash when a value is defined after the last split point. llvm-svn: 128962 --- llvm/lib/CodeGen/SplitKit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index 4b642883d47a..a3e065d1bd9a 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/lib/CodeGen/SplitKit.cpp @@ -673,7 +673,8 @@ void SplitEditor::overlapIntv(SlotIndex Start, SlotIndex End) { "Range cannot span basic blocks"); // The complement interval will be extended as needed by extendRange(). - markComplexMapped(0, ParentVNI); + if (ParentVNI) + markComplexMapped(0, ParentVNI); DEBUG(dbgs() << " overlapIntv [" << Start << ';' << End << "):"); RegAssign.insert(Start, End, OpenIdx); DEBUG(dump());