[RegAllocGreedy] Fix an assertion and condition when last chance recoloring is used.
authorQuentin Colombet <qcolombet@apple.com>
Fri, 16 Sep 2016 22:00:42 +0000 (22:00 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Fri, 16 Sep 2016 22:00:42 +0000 (22:00 +0000)
commit631768659d02c57402f8f7bd0832a9fb5cdda048
tree01ff28cfa6ec17f94089c5d021d4f4b7eb4abe8a
parentbbeb45aff64e888cd7db72ca3dac862c7233490c
[RegAllocGreedy] Fix an assertion and condition when last chance recoloring is used.

When last chance recoloring is used, the list of NewVRegs may not be
empty when calling selectOrSplitImpl. Indeed, another coloring may have
taken place with splitting/spilling in the same recoloring session.

Relax an assertion to take this into account and adapt a condition to
act as if the NewVRegs were local to this selectOrSplitImpl instance.

Unfortunately I am unable to produce a test case for this, I was only
able to reproduce the conditions on an out-of-tree target.

llvm-svn: 281782
llvm/lib/CodeGen/RegAllocGreedy.cpp