summaryrefslogtreecommitdiff
path: root/lib/CodeGen/InlineSpiller.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-05 15:38:41 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-05 15:38:41 +0000
commit9693d4c3f0d0e8c91e4748eb1c18799b1de7551c (patch)
tree6eea6d38ca4f7fbe96131a5ddb11c263ded7e8a9 /lib/CodeGen/InlineSpiller.cpp
parent2b0f4abfbe1c651fe6bd233bf89373d276c535a8 (diff)
downloadllvm-9693d4c3f0d0e8c91e4748eb1c18799b1de7551c.tar.gz
llvm-9693d4c3f0d0e8c91e4748eb1c18799b1de7551c.tar.bz2
llvm-9693d4c3f0d0e8c91e4748eb1c18799b1de7551c.tar.xz
Fix PR10277.
Remat during spilling triggers dead code elimination. If a phi-def becomes unused, that may also cause live ranges to split into separate connected components. This type of splitting is different from normal live range splitting. In particular, there may not be a common original interval. When the split range is its own original, make sure that the new siblings are also their own originals. The range being split cannot be used as an original since it doesn't cover the new siblings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InlineSpiller.cpp')
-rw-r--r--lib/CodeGen/InlineSpiller.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp
index 0273891d69..4bd35c3812 100644
--- a/lib/CodeGen/InlineSpiller.cpp
+++ b/lib/CodeGen/InlineSpiller.cpp
@@ -425,6 +425,7 @@ void InlineSpiller::analyzeSiblingValues() {
// Check possible sibling copies.
if (VNI->isPHIDef() || VNI->getCopy()) {
VNInfo *OrigVNI = OrigLI.getVNInfoAt(VNI->def);
+ assert(OrigVNI && "Def outside original live range");
if (OrigVNI->def != VNI->def)
DefMI = traceSiblingValue(Reg, VNI, OrigVNI);
}