Allow for loops in LiveIntervals::pruneValue().
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 13 Oct 2012 16:15:31 +0000 (16:15 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 13 Oct 2012 16:15:31 +0000 (16:15 +0000)
commitaf8969076083396f06431971cce867ea11fb968c
tree3c8d418f7ce114644ab96b6470531c9bf8bfa989
parentf8b65aaf39d84e5576c0579c19ba9998ebb634d2
Allow for loops in LiveIntervals::pruneValue().

It is possible that the live range of the value being pruned loops back
into the kill MBB where the search started. When that happens, make sure
that the beginning of KillMBB is also pruned.

Instead of starting a DFS at KillMBB and skipping the root of the
search, start a DFS at each KillMBB successor, and allow the search to
loop back to KillMBB.

This fixes PR14078.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165872 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveIntervalAnalysis.cpp
test/CodeGen/ARM/coalesce-subregs.ll