aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-06 23:54:35 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-06 23:54:35 +0000
commit893ab5d7014dd112fb111a67504bd556be9bd393 (patch)
treee09103df888fc182f6ae61a195edb66cb3fefe53
parentc44c245d0cd70d6932eddd069c4e95c2754b7fd8 (diff)
Skip unused registers when verifying LiveIntervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115874 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/MachineVerifier.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineVerifier.cpp b/lib/CodeGen/MachineVerifier.cpp
index 5660e48b8e..644e3c06da 100644
--- a/lib/CodeGen/MachineVerifier.cpp
+++ b/lib/CodeGen/MachineVerifier.cpp
@@ -884,6 +884,11 @@ void MachineVerifier::verifyLiveIntervals() {
for (LiveIntervals::const_iterator LVI = LiveInts->begin(),
LVE = LiveInts->end(); LVI != LVE; ++LVI) {
const LiveInterval &LI = *LVI->second;
+
+ // Spilling and splitting may leave unused registers around. Skip them.
+ if (MRI->use_empty(LI.reg))
+ continue;
+
assert(LVI->first == LI.reg && "Invalid reg to interval mapping");
for (LiveInterval::const_vni_iterator I = LI.vni_begin(), E = LI.vni_end();